From ea1df49dd6040f9b904759faa7f461fff3d95d7c Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Sun, 13 Nov 2016 12:45:53 +0100 Subject: [PATCH] =?utf8?q?Order=20Controller=20-=20Sortimentsartikel=20mit?= =?utf8?q?=20Preis=200=20hinzuf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Order.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index f785a7eca..78e9e5436 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -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 { -- 2.20.1