From: Bernd Bleßmann Date: Fri, 12 Jan 2018 16:16:47 +0000 (+0100) Subject: Auftrags-Controller: Workflow Lieferschein: gelieferte Positionen filtern X-Git-Tag: release-3.5.4~498 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e070b6383cd90405970527fdb90f08fb1d96ba6d;p=kivitendo-erp.git Auftrags-Controller: Workflow Lieferschein: gelieferte Positionen filtern Dieser commit enthält einen Hack, der nochmal diskutiert und geändert werden sollte. --- 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(); }