From 9cec711d2cb508438f5480857df5f049997b6d91 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 1 Oct 2021 17:50:48 +0200 Subject: [PATCH] DeliveryOrder: type roundtrip safety --- SL/Controller/DeliveryOrder.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}) { -- 2.20.1