From: Sven Schöling Date: Fri, 1 Oct 2021 15:50:48 +0000 (+0200) Subject: DeliveryOrder: type roundtrip safety X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~216^2~75 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9cec711d2cb508438f5480857df5f049997b6d91;p=kivitendo-erp.git DeliveryOrder: type roundtrip safety --- diff --git a/SL/Controller/DeliveryOrder.pm b/SL/Controller/DeliveryOrder.pm index feeff1c9f..2d9328940 100644 --- a/SL/Controller/DeliveryOrder.pm +++ b/SL/Controller/DeliveryOrder.pm @@ -1161,7 +1161,7 @@ sub make_order { # order here solves this problem. my $order; $order = SL::DB::DeliveryOrder->new(id => $::form->{id})->load(with => [ 'orderitems', 'orderitems.part' ]) if $::form->{id}; - $order ||= SL::DB::DeliveryOrder->new(orderitems => [], currency_id => $::instance_conf->get_currency_id(),); + $order ||= SL::DB::DeliveryOrder->new(orderitems => [], currency_id => $::instance_conf->get_currency_id(), order_type => $self->type_data->validate_type($::form->{type})); my $cv_id_method = $self->cv . '_id'; if (!$::form->{id} && $::form->{$cv_id_method}) {