]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Order Controller - Sortimentsartikel mit Preis 0 hinzufügen
authorG. Richardson <information@kivitendo-premium.de>
Sun, 13 Nov 2016 11:45:53 +0000 (12:45 +0100)
committerG. Richardson <information@kivitendo-premium.de>
Tue, 22 Nov 2016 13:42:51 +0000 (14:42 +0100)
SL/Controller/Order.pm

index f785a7eca1e47e5ed8f8aca83b4a6739d5a963de..78e9e5436041a78664c7ae4040c84820b9a3f54f 100644 (file)
@@ -848,7 +848,11 @@ sub _new_item {
   $item->unit($part->unit) if !$item->unit;
 
   my $price_src;
-  if ($item->sellprice) {
+  if ( $part->is_assortment ) {
+    # add assortment items with price 0, as the components carry the price
+    $price_src = $price_source->price_from_source("");
+    $price_src->price(0);
+  } elsif ($item->sellprice) {
     $price_src = $price_source->price_from_source("");
     $price_src->price($item->sellprice);
   } else {