Item-Positionen in DB: items_sorted sortiert nach postition …
[kivitendo-erp.git] / SL / DB / DeliveryOrder.pm
index 9c405f5..f5fb2d5 100644 (file)
@@ -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 {