From: Bernd Bleßmann Date: Wed, 14 Jan 2015 21:36:21 +0000 (+0100) Subject: Item-Positionen in DB: items_sorted sortiert nach postition … X-Git-Tag: release-3.2.0beta~79 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=42e01a1aa0f5be9e984932de7b01357e14d74d09;p=kivitendo-erp.git Item-Positionen in DB: items_sorted sortiert nach postition … in Order und DeliveryOrder --- 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 {