Revision 5775353e
Von Philip Reetz vor etwa 19 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
|
||
if ($form->{"qty_$i"}) {
|
||
|
||
map { $form->{"${_}_$i"} =~ s/\'/\'\'/g }
|
||
qw(partnumber description unit);
|
||
|
||
# set values to 0 if nothing entered
|
||
$form->{"discount_$i"} =
|
||
$form->parse_amount($myconfig, $form->{"discount_$i"}) / 100;
|
||
$form->parse_amount($myconfig, $form->{"discount_$i"});
|
||
|
||
$form->{"sellprice_$i"} =
|
||
$form->parse_amount($myconfig, $form->{"sellprice_$i"});
|
||
$fxsellprice = $form->{"sellprice_$i"};
|
||
|
||
my ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
|
||
$dec = length $dec;
|
||
my $decimalplaces = ($dec > 2) ? $dec : 2;
|
||
|
||
$discount =
|
||
$form->round_amount($form->{"sellprice_$i"} * $form->{"discount_$i"},
|
||
$decimalplaces);
|
||
$form->{"sellprice_$i"} =
|
||
$form->round_amount($form->{"sellprice_$i"} - $discount,
|
||
$decimalplaces);
|
||
|
||
$form->{"inventory_accno_$i"} *= 1;
|
||
$form->{"expense_accno_$i"} *= 1;
|
||
}
|
||
}
|
||
# get ids from $form
|
Auch abrufbar als: Unified diff
Noch ein paar Formatierungsfehler bei Umwandlung von Sammelbestellung in Rechnung