From: Sven Schöling Date: Mon, 31 Jan 2022 21:42:50 +0000 (+0100) Subject: DeliveryOrder: _make_record für den alten Controller X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~216^2~13 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a32fcad2cf3fabf15c9dd10ddc83ce703db66ad8;p=kivitendo-erp.git DeliveryOrder: _make_record für den alten Controller --- diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 2f0fb95cd..4b6cf26c7 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -60,6 +60,7 @@ use SL::DB::AuthUser; use SL::DB::Contact; use SL::DB::Currency; use SL::DB::Customer; +use SL::DB::DeliveryOrder::TypeData qw(); use SL::DB::Default; use SL::DB::Language; use SL::DB::Printer; @@ -2018,7 +2019,10 @@ sub _make_record { } $obj->items(@items) if @items; - $obj->is_sales(!!$obj->customer_id) if $class eq 'SL::DB::DeliveryOrder'; + + if ($class eq 'SL::DB::DeliveryOrder' && !$obj->order_type) { + $obj->order_type(SL::DB::DeliveryOrder::TypeData::validate_type($::form->{type})); + } if ($class eq 'SL::DB::Invoice') { my $paid = $factor *