]> wagnertech.de Git - mfinanz.git/blobdiff - SL/OE.pm
Merge von 772,773 aus unstable: Bugfix 220
[mfinanz.git] / SL / OE.pm
index 4e3be4539bb735c066e0b101f083ac0568db2d36..6dec175bdded79b46998627a6683301b53ece16c 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -887,14 +887,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);