projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
neue Methode items_sorted für Order, DeliveryOrder, Invoice, PurchaseInvoice
[kivitendo-erp.git]
/
SL
/
DB
/
Order.pm
diff --git
a/SL/DB/Order.pm
b/SL/DB/Order.pm
index
63d23f7
..
f4ca003
100644
(file)
--- a/
SL/DB/Order.pm
+++ b/
SL/DB/Order.pm
@@
-39,6
+39,13
@@
__PACKAGE__->meta->initialize;
sub items { goto &orderitems; }
+sub items_sorted {
+ my ($self) = @_;
+
+ my @sorted = sort {$a->id <=> $b->id } @{ $self->items };
+ return wantarray ? @sorted : \@sorted;
+}
+
sub type {
my $self = shift;