From fc1490e86f04bef1712a767ff53b4293abdb5aaf Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 30 Apr 2013 14:43:43 +0200 Subject: [PATCH] Relationships 'sepa_export_items' in Invoice & PurchaseInvoice --- SL/DB/Invoice.pm | 6 ++++++ SL/DB/PurchaseInvoice.pm | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 0d21ef8b2..09c7f86e7 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -33,6 +33,12 @@ __PACKAGE__->meta->add_relationship( class => 'SL::DB::Invoice', column_map => { id => 'storno_id' }, }, + sepa_export_items => { + type => 'one to many', + class => 'SL::DB::SepaExportItem', + column_map => { id => 'ar_id' }, + manager_args => { with_objects => [ 'sepa_export' ] } + }, ); __PACKAGE__->meta->initialize; diff --git a/SL/DB/PurchaseInvoice.pm b/SL/DB/PurchaseInvoice.pm index 42285335a..f74ee19e1 100644 --- a/SL/DB/PurchaseInvoice.pm +++ b/SL/DB/PurchaseInvoice.pm @@ -17,6 +17,12 @@ __PACKAGE__->meta->add_relationship( column_map => { id => 'trans_id' }, manager_args => { with_objects => [ 'part' ] } }, + sepa_export_items => { + type => 'one to many', + class => 'SL::DB::SepaExportItem', + column_map => { id => 'ap_id' }, + manager_args => { with_objects => [ 'sepa_export' ] } + }, ); __PACKAGE__->meta->initialize; -- 2.20.1