From cce35acc654914bcd9bd06d2b361d8c3a0106c05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 10 Dec 2021 16:47:12 +0100 Subject: [PATCH] DeliveryOrder: record links beim Speichern setzen --- SL/Controller/DeliveryOrder.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SL/Controller/DeliveryOrder.pm b/SL/Controller/DeliveryOrder.pm index a0d9c19d6..1c1f4d006 100644 --- a/SL/Controller/DeliveryOrder.pm +++ b/SL/Controller/DeliveryOrder.pm @@ -36,7 +36,7 @@ use SL::Helper::UserPreferences::PositionsScrollbar; use SL::Helper::UserPreferences::UpdatePositions; use SL::Controller::Helper::GetModels; -use SL::Controller::DeliveryOrder::TypeData; +use SL::Controller::DeliveryOrder::TypeData qw(:types); use List::Util qw(first sum0); use List::UtilsBy qw(sort_by uniq_by); @@ -1576,8 +1576,8 @@ sub save { if ($::form->{converted_from_oe_id}) { my @converted_from_oe_ids = split ' ', $::form->{converted_from_oe_id}; foreach my $converted_from_oe_id (@converted_from_oe_ids) { - my $src = SL::DB::DeliveryOrder->new(id => $converted_from_oe_id)->load; - $src->update_attributes(closed => 1) if $src->type =~ /_quotation$/; + my $src = SL::DB::Order->new(id => $converted_from_oe_id)->load; + $src->update_attributes(closed => 1) if $src->type =~ /_quotation$/ && $self->order->is_type(PURCHASE_DELIVERY_ORDER_TYPE); $src->link_to_record($self->order); } if (scalar @{ $::form->{converted_from_orderitems_ids} || [] }) { -- 2.20.1