From: Bernd Bleßmann Date: Fri, 7 Jun 2013 11:31:08 +0000 (+0200) Subject: Artikel-Reihenfolge beibehalten beim Erzeugen und autom. Drucken wiederkehrender... X-Git-Tag: release-3.1.0beta1~352 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=efac2a408d07588733698720f7198bc053821449;p=kivitendo-erp.git Artikel-Reihenfolge beibehalten beim Erzeugen und autom. Drucken wiederkehrender Rechnungen. --- 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);