From b987fa17f53deb2782f2ad7b35049c700c26f01a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 14 Jun 2021 09:46:41 +0200 Subject: [PATCH] fix #480 mark_as_delivered nach Wareneingang im LS berechnen --- SL/DO.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/SL/DO.pm b/SL/DO.pm index 53730d771..8f04ce7c5 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -557,10 +557,10 @@ SQL 'to_id' => $form->{id}, ); delete $form->{convert_from_oe_ids}; - - $self->mark_orders_if_delivered('do_id' => $form->{id}, - 'type' => $form->{type} eq 'sales_delivery_order' ? 'sales' : 'purchase', - 'dbh' => $dbh,); + unless ($::instance_conf->get_shipped_qty_require_stock_out) { + $self->mark_orders_if_delivered('do_id' => $form->{id}, + 'type' => $form->{type} eq 'sales_delivery_order' ? 'sales' : 'purchase'); + } $form->{saved_donumber} = $form->{donumber}; $form->{saved_ordnumber} = $form->{ordnumber}; @@ -1263,6 +1263,11 @@ sub transfer_in_out { WH->transfer(@transfers); + if ($::instance_conf->get_shipped_qty_require_stock_out) { + $self->mark_orders_if_delivered('do_id' => $form->{id}, + 'type' => $form->{type} eq 'sales_delivery_order' ? 'sales' : 'purchase'); + } + $main::lxdebug->leave_sub(); } -- 2.20.1