projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'berichte-bestellnummer-des-kunden'
[kivitendo-erp.git]
/
SL
/
DB
/
PurchaseInvoice.pm
diff --git
a/SL/DB/PurchaseInvoice.pm
b/SL/DB/PurchaseInvoice.pm
index
f74ee19
..
2457cde
100644
(file)
--- a/
SL/DB/PurchaseInvoice.pm
+++ b/
SL/DB/PurchaseInvoice.pm
@@
-23,12
+23,24
@@
__PACKAGE__->meta->add_relationship(
column_map => { id => 'ap_id' },
manager_args => { with_objects => [ 'sepa_export' ] }
},
column_map => { id => 'ap_id' },
manager_args => { with_objects => [ 'sepa_export' ] }
},
+ custom_shipto => {
+ type => 'one to one',
+ class => 'SL::DB::Shipto',
+ column_map => { id => 'trans_id' },
+ query_args => [ module => 'AP' ],
+ },
);
__PACKAGE__->meta->initialize;
sub items { goto &invoiceitems; }
);
__PACKAGE__->meta->initialize;
sub items { goto &invoiceitems; }
+sub items_sorted {
+ my ($self) = @_;
+
+ return [ sort {$a->id <=> $b->id } @{ $self->items } ];
+}
+
sub is_sales {
# For compatibility with Order, DeliveryOrder
croak 'not an accessor' if @_ > 1;
sub is_sales {
# For compatibility with Order, DeliveryOrder
croak 'not an accessor' if @_ > 1;