From: Bernd Bleßmann Date: Thu, 22 Jan 2015 15:43:18 +0000 (+0100) Subject: Item-Positionen für Rechnungen in DB: items_sorted sortiert nach postition … X-Git-Tag: release-3.2.0beta~37 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8b17f06f580736d3ebcb120581ad20efffe9a678;p=kivitendo-erp.git Item-Positionen für Rechnungen in DB: items_sorted sortiert nach postition … --- diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index ae1c596d6..7626793c2 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -69,7 +69,7 @@ sub add_items { goto &add_invoiceitems; } sub items_sorted { my ($self) = @_; - return [ sort {$a->id <=> $b->id } @{ $self->items } ]; + return [ sort {$a->position <=> $b->position } @{ $self->items } ]; } sub is_sales { diff --git a/SL/DB/PurchaseInvoice.pm b/SL/DB/PurchaseInvoice.pm index bddaa6551..a54f1bd4c 100644 --- a/SL/DB/PurchaseInvoice.pm +++ b/SL/DB/PurchaseInvoice.pm @@ -41,7 +41,7 @@ sub add_items { goto &add_invoiceitems; } sub items_sorted { my ($self) = @_; - return [ sort {$a->id <=> $b->id } @{ $self->items } ]; + return [ sort {$a->position <=> $b->position } @{ $self->items } ]; } sub is_sales {