Kundenrabatte bei select_item/item_selected beachten
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 9 Jan 2012 13:01:34 +0000 (14:01 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 9 Jan 2012 13:01:34 +0000 (14:01 +0100)
Fix zu Bug 1762.

bin/mozilla/io.pl

index b42ddde..f73c179 100644 (file)
@@ -543,6 +543,11 @@ sub item_selected {
       $form->{"sellprice_$i"} =
         $form->round_amount($form->{"sellprice_$i"}, $decimalplaces);
     }
+
+    # tradediscount
+    if ($::form->{tradediscount}) {
+      $::form->{"sellprice_$i"} *= 1 - $::form->{tradediscount};
+    }
   }
 
   map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }