X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/fd751746775f9da6743a3ac1de12cd48cc87bb9b..84db7f413b4e61dd6bbce432f9b4a05cfa8a90ca:/SL/DB/DeliveryOrder.pm diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index a7c20cb9b..068d6c419 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -155,7 +155,8 @@ sub new_from { # infer type from legacy fields if not given $params{order_type} //= $source->customer_id ? 'sales_delivery_order' : $source->vendor_id ? 'purchase_delivery_order' - : undef; + : $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($params{order_type}, "properties", "is_customer");