From 42e01a1aa0f5be9e984932de7b01357e14d74d09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 14 Jan 2015 22:36:21 +0100 Subject: [PATCH] =?utf8?q?Item-Positionen=20in=20DB:=20items=5Fsorted=20so?= =?utf8?q?rtiert=20nach=20postition=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit in Order und DeliveryOrder --- SL/DB/DeliveryOrder.pm | 2 +- SL/DB/Order.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index 9c405f52a..f5fb2d54e 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -49,7 +49,7 @@ sub add_items { goto &add_orderitems; } sub items_sorted { my ($self) = @_; - return [ sort {$a->id <=> $b->id } @{ $self->items } ]; + return [ sort {$a->position <=> $b->position } @{ $self->items } ]; } sub sales_order { diff --git a/SL/DB/Order.pm b/SL/DB/Order.pm index 5d88ad929..28b1b5726 100644 --- a/SL/DB/Order.pm +++ b/SL/DB/Order.pm @@ -66,7 +66,7 @@ sub add_items { goto &add_orderitems; } sub items_sorted { my ($self) = @_; - return [ sort {$a->id <=> $b->id } @{ $self->items } ]; + return [ sort {$a->position <=> $b->position } @{ $self->items } ]; } sub type { -- 2.20.1