From: Sven Schöling Date: Fri, 10 Dec 2021 12:55:05 +0000 (+0100) Subject: DeliveryPlan: bei Umwandlung zu Beistelllieferschein die Positionen ignorieren X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~216^2~34 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4356a33c78b9ac53fefd7e03893efd6375fd26d5;p=kivitendo-erp.git DeliveryPlan: bei Umwandlung zu Beistelllieferschein die Positionen ignorieren --- diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index 3c293e027..45d658876 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -167,7 +167,8 @@ sub new_from { my $items = delete($params{items}) || $source->items_sorted; my %item_parents; - my @items = map { + # do not copy items when converting to supplier delivery order + my @items = $delivery_order->is_type(SUPPLIER_DELIVERY_ORDER_TYPE) ? () : map { my $source_item = $_; my $source_item_id = $_->$item_parent_id_column; my @custom_variables = map { _clone_orderitem_cvar($_) } @{ $source_item->custom_variables };