X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/9f0c5105e2c79feead651fd0de5d9ba725a2c1ff..51a586e7fce096525d476919e809945a04dcf2ab:/bin/mozilla/io.pl 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 *