From 7335b28fb5c1761a2fa8589fd0018f58c3cfaa81 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 10 Dec 2021 13:54:13 +0100 Subject: [PATCH] DeliveryOrder::new_from: order_type statt new_from --- SL/DB/DeliveryOrder.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index 03b35b300..3c293e027 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -140,8 +140,8 @@ sub new_from { ordnumber payment_id reqdate salesman_id shippingpoint shipvia taxincluded taxzone_id transaction_description vendor_id billing_address_id )), closed => 0, - is_sales => !!$source->customer_id, delivered => 0, + order_type => $params{type}, transdate => DateTime->today_local, ); @@ -162,9 +162,6 @@ sub new_from { : $source->is_sales ? 'sales_delivery_order' : croak "need some way to set delivery order type from source"; - # overwrite legacy is_sales from type_data - $args{is_sales} = SL::Controller::DeliveryOrder::TypeData::get3($args{order_type}, "properties", "is_customer"); - my $delivery_order = $class->new(%args); $delivery_order->assign_attributes(%{ $params{attributes} }) if $params{attributes}; my $items = delete($params{items}) || $source->items_sorted; -- 2.20.1