From: Jan Büren Date: Mon, 14 Jun 2021 07:46:41 +0000 (+0200) Subject: fix #480 mark_as_delivered nach Wareneingang im LS berechnen X-Git-Tag: kivitendo-mebil_0.1-0~9^2~176 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b987fa17f53deb2782f2ad7b35049c700c26f01a;p=kivitendo-erp.git fix #480 mark_as_delivered nach Wareneingang im LS berechnen --- 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(); }