Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision df0ca1fe

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

  • ID df0ca1fe6013573e9ff37f262018ec9a5318b4ea
  • Vorgänger 66f7ff40
  • Nachfolger 5ea712a2

Artikelstammdatenmaske: bei "Erneuern" Fließkommazahlen exakt einmal parsen

Fixt #2341.

Unterschiede anzeigen:

bin/mozilla/ic.pl
# parse pricegroups. and no, don't rely on check_form for this...
map { $form->{"price_$_"} = $form->parse_amount(\%myconfig, $form->{"price_$_"}) } 1 .. $form->{price_rows};
$form->{sellprice} = $form->parse_amount(\%myconfig, $form->{sellprice});
$form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) for qw(sellprice listprice ve gv);
if ($form->{item} eq 'part') {
$form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) for qw(weight rop);
}
# same for makemodel lastcosts
# but parse_amount not necessary for assembly component lastcosts
unless ($form->{item} eq "assembly") {
map { $form->{"lastcost_$_"} = $form->parse_amount(\%myconfig, $form->{"lastcost_$_"}) } 1 .. $form->{"makemodel_rows"};
};
$form->{listprice} = $form->parse_amount(\%myconfig, $form->{listprice});
$form->{lastcost} = $form->parse_amount(\%myconfig, $form->{lastcost});
}
if ($form->{item} eq "assembly") {
my $i = $form->{assembly_rows};
bin/mozilla/io.pl
my $count = 0;
# remove any makes or model rows
if ($form->{item} eq 'part') {
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
qw(listprice sellprice lastcost weight rop);
} elsif ($form->{item} eq 'assembly') {
if ($form->{item} eq 'assembly') {
# fuer assemblies auskommentiert. seiteneffekte? ;-) wird die woanders benoetigt?
#$form->{sellprice} = 0;
......
$form->redo_rows(\@flds, \@a, $count, $form->{assembly_rows});
$form->{assembly_rows} = $count;
} elsif ($form->{item} eq 'service') {
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(listprice sellprice lastcost);
} else {
} elsif ($form->{item} !~ m{^(?:part|service)$}) {
remove_emptied_rows(1);
$form->{creditremaining} -= &invoicetotal;

Auch abrufbar als: Unified diff