From 11aeaa07186197c61dfe610d2a5c981754fd2e9d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 27 Apr 2022 13:34:16 +0200 Subject: [PATCH] Auftrags-Controller: Menge vor Preisquellenermittlung auf 1, wenn ungesetzt --- SL/Controller/Order.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 9454a1e13..e67576c3b 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -1704,6 +1704,7 @@ sub new_item { my $part = SL::DB::Part->new(id => $attr->{parts_id})->load; my $price_source = SL::PriceSource->new(record_item => $item, record => $record); + $item->qty(1.0) if !$item->qty; $item->unit($part->unit) if !$item->unit; my $price_src; @@ -1736,7 +1737,6 @@ sub new_item { my %new_attr; $new_attr{part} = $part; $new_attr{description} = $part->description if ! $item->description; - $new_attr{qty} = 1.0 if ! $item->qty; $new_attr{price_factor_id} = $part->price_factor_id if ! $item->price_factor_id; $new_attr{sellprice} = $price_src->price; $new_attr{discount} = $discount_src->discount; -- 2.20.1