From efac2a408d07588733698720f7198bc053821449 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 7 Jun 2013 13:31:08 +0200 Subject: [PATCH] Artikel-Reihenfolge beibehalten beim Erzeugen und autom. Drucken wiederkehrender Rechnungen. --- SL/DB/Helper/FlattenToForm.pm | 2 +- SL/DB/Invoice.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/DB/Helper/FlattenToForm.pm b/SL/DB/Helper/FlattenToForm.pm index 9754d2bb3..198aae5b7 100644 --- a/SL/DB/Helper/FlattenToForm.pm +++ b/SL/DB/Helper/FlattenToForm.pm @@ -52,7 +52,7 @@ sub flatten_to_form { my $idx = 0; my $format_amounts = $params{format_amounts} ? 1 : 0; my $format_notnull = $params{format_amounts} ? 2 : 0; - foreach my $item (@{ $self->items }) { + foreach my $item (@{ $self->items_sorted }) { next if _has($item, 'assemblyitem'); $idx++; diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 18aa8dbdb..2382c6e12 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -135,7 +135,7 @@ sub new_from { base_qty subtotal longdescription lastcost price_factor_id)), deliverydate => $source_item->reqdate, fxsellprice => $source_item->sellprice,); - } @{ $source->items }; + } @{ $source->items_sorted }; $invoice->invoiceitems(\@items); -- 2.20.1