From e070b6383cd90405970527fdb90f08fb1d96ba6d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 12 Jan 2018 17:16:47 +0100 Subject: [PATCH] Auftrags-Controller: Workflow Lieferschein: gelieferte Positionen filtern MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Dieser commit enthält einen Hack, der nochmal diskutiert und geändert werden sollte. --- bin/mozilla/oe.pl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 8c2af08af..6a3f81126 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -2042,9 +2042,17 @@ sub oe_delivery_order_from_order { my $order = SL::DB::Order->new(id => $::form->{id})->load; $order->flatten_to_form($::form, format_amounts => 1); + # hack: add partsgroup for first row if it does not exists, + # because _remove_billed_or_delivered_rows and _remove_full_delivered_rows + # determine fields to handled by existing fields for the first row. If partsgroup + # is missing there, for deleted rows the partsgroup_field is not emptied and in + # update_delivery_order it will not considered an empty row ... + $::form->{partsgroup_1} = '' if !exists $::form->{partsgroup_1}; + # fake last empty row $::form->{rowcount}++; + _update_ship(); delivery_order(); } @@ -2055,9 +2063,17 @@ sub oe_invoice_from_order { my $order = SL::DB::Order->new(id => $::form->{id})->load; $order->flatten_to_form($::form, format_amounts => 1); + # hack: add partsgroup for first row if it does not exists, + # because _remove_billed_or_delivered_rows and _remove_full_delivered_rows + # determine fields to handled by existing fields for the first row. If partsgroup + # is missing there, for deleted rows the partsgroup_field is not emptied and in + # update_delivery_order it will not considered an empty row ... + $::form->{partsgroup_1} = '' if !exists $::form->{partsgroup_1}; + # fake last empty row $::form->{rowcount}++; + _update_ship(); invoice(); } -- 2.20.1