]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Helper/PriceTaxCalculator.pm
PTC: item->discount auf 0, wenn nicht definiert, um Warnungen zu vermeiden
[mfinanz.git] / SL / DB / Helper / PriceTaxCalculator.pm
index 89173102a0c3a9df4c424de171e55c65368ee8a9..d0412c2bb999bd20ad77e30d7f4751acb7d970c3 100644 (file)
@@ -96,6 +96,7 @@ sub _calculate_item {
 
   my $num_dec   = max 2, _num_decimal_places($item->sellprice);
 
+  $item->discount(0) if !$item->discount;
 
   # don't include rounded discount into sellprice for calculation
   # any time the sellprice is multiplied with qty discount has to be considered as part of the multiplication