Revision 5775353e
Von Philip Reetz vor etwa 19 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
483 | 483 |
|
484 | 484 |
if ($form->{"qty_$i"}) { |
485 | 485 |
|
486 |
map { $form->{"${_}_$i"} =~ s/\'/\'\'/g } |
|
487 |
qw(partnumber description unit); |
|
488 |
|
|
489 | 486 |
# set values to 0 if nothing entered |
490 | 487 |
$form->{"discount_$i"} = |
491 |
$form->parse_amount($myconfig, $form->{"discount_$i"}) / 100;
|
|
488 |
$form->parse_amount($myconfig, $form->{"discount_$i"}); |
|
492 | 489 |
|
493 | 490 |
$form->{"sellprice_$i"} = |
494 | 491 |
$form->parse_amount($myconfig, $form->{"sellprice_$i"}); |
495 |
$fxsellprice = $form->{"sellprice_$i"}; |
|
496 |
|
|
497 |
my ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/); |
|
498 |
$dec = length $dec; |
|
499 |
my $decimalplaces = ($dec > 2) ? $dec : 2; |
|
500 |
|
|
501 |
$discount = |
|
502 |
$form->round_amount($form->{"sellprice_$i"} * $form->{"discount_$i"}, |
|
503 |
$decimalplaces); |
|
504 |
$form->{"sellprice_$i"} = |
|
505 |
$form->round_amount($form->{"sellprice_$i"} - $discount, |
|
506 |
$decimalplaces); |
|
507 |
|
|
508 |
$form->{"inventory_accno_$i"} *= 1; |
|
509 |
$form->{"expense_accno_$i"} *= 1; |
|
510 | 492 |
} |
511 | 493 |
} |
512 | 494 |
# get ids from $form |
Auch abrufbar als: Unified diff
Noch ein paar Formatierungsfehler bei Umwandlung von Sammelbestellung in Rechnung