From fd8558c8cfd92d3399401a7ca27cbb0faf2a021d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20K=C3=B6hler?= Date: Fri, 13 Jan 2006 13:48:33 +0000 Subject: [PATCH 1/1] Nachtrag zu Bug 220, Rabatt wurde nur fuer ein einzelnes Item berechnet. Korrektur bei Angeboten --- SL/OE.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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); -- 2.20.1