From: Stephan Köhler Date: Fri, 13 Jan 2006 13:48:33 +0000 (+0000) Subject: Nachtrag zu Bug 220, Rabatt wurde nur fuer ein einzelnes Item berechnet. X-Git-Tag: release-2.4.0^2~390 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=fd8558c8cfd92d3399401a7ca27cbb0faf2a021d;hp=e01d7de0936bc43c0c7b60cb5ef604ba3755ecff;p=kivitendo-erp.git Nachtrag zu Bug 220, Rabatt wurde nur fuer ein einzelnes Item berechnet. Korrektur bei Angeboten --- diff --git a/SL/OE.pm b/SL/OE.pm index dc29ffaa1..4e16ed5f1 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -892,14 +892,14 @@ sub order_details { $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) - $form->{"netprice_$i"} = $sellprice - $discount; + #$form->{"netprice_$i"} = $sellprice - $discount; + $form->{"netprice_$i"} = $sellprice - $i_discount; my $linetotal = $form->round_amount($form->{"qty_$i"} * $form->{"netprice_$i"}, 2);