summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
25f4a73)
Man sollte dazu noch erwaehnen, dass das anscheinend kein Bug,
sondern eine Designentscheidung im SQL-Ledger ist.
$dec = length $dec;
my $decimalplaces = ($dec > 2) ? $dec : 2;
$dec = length $dec;
my $decimalplaces = ($dec > 2) ? $dec : 2;
- my $discount =
- $form->round_amount(
- $sellprice * $form->parse_amount($myconfig,
- $form->{"discount_$i"}) / 100,
- $decimalplaces);
+ my $i_discount = $form->round_amount($sellprice *
+ $form->parse_amount($myconfig, $form->{"discount_$i"}) / 100, $decimalplaces);
+
+ my $discount = $form->round_amount($form->{"qty_$i"} * $i_discount, $decimalplaces);
# keep a netprice as well, (sellprice - discount)
# keep a netprice as well, (sellprice - discount)
- $form->{"netprice_$i"} = $sellprice - $discount;
+ $form->{"netprice_$i"} = $sellprice - $i_discount;
+
push(@{ $form->{netprice} },
($form->{"netprice_$i"} != 0)
? $form->format_amount(
push(@{ $form->{netprice} },
($form->{"netprice_$i"} != 0)
? $form->format_amount(