From 8b17f06f580736d3ebcb120581ad20efffe9a678 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Thu, 22 Jan 2015 16:43:18 +0100 Subject: [PATCH] =?utf8?q?Item-Positionen=20f=C3=BCr=20Rechnungen=20in=20D?= =?utf8?q?B:=20items=5Fsorted=20sortiert=20nach=20postition=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Invoice.pm | 2 +- SL/DB/PurchaseInvoice.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 { -- 2.20.1