X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/56b91fb4030432fde4159c11a0ca97a7571535f3..90bb521a25eeb37c5bbae1ff68c38e6c142b6e6b:/SL/DB/Invoice.pm diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 18aa8dbdb..302179c80 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -50,8 +50,7 @@ sub items { goto &invoiceitems; } sub items_sorted { my ($self) = @_; - my @sorted = sort {$a->id <=> $b->id } @{ $self->items }; - return wantarray ? @sorted : \@sorted; + return [ sort {$a->id <=> $b->id } @{ $self->items } ]; } sub is_sales { @@ -135,7 +134,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);