X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fio.pl;h=4b6cf26c76f6e7481780291ec34d9fae50eadc7c;hb=2391833dbbf3be1eb1822485171727a06da69475;hp=2f0fb95cdaf9ea4952671ac4a124bf5e59580c29;hpb=9f0c5105e2c79feead651fd0de5d9ba725a2c1ff;p=kivitendo-erp.git 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 *