From: Moritz Bunkus Date: Thu, 6 Feb 2014 13:23:07 +0000 (+0100) Subject: Rose-Models Einkauf/Verkauf: Relationships für angepasste Lieferadressen X-Git-Tag: release-3.2.0beta~491^2~22 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=325c539c21187087e5540646c3c4e9cabd52ee84;p=kivitendo-erp.git Rose-Models Einkauf/Verkauf: Relationships für angepasste Lieferadressen --- diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index 0a8f34851..8409c2b91 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -17,6 +17,12 @@ __PACKAGE__->meta->add_relationship(orderitems => { type => 'one to many column_map => { id => 'delivery_order_id' }, manager_args => { with_objects => [ 'part' ] } }, + custom_shipto => { + type => 'one to one', + class => 'SL::DB::Shipto', + column_map => { id => 'trans_id' }, + query_args => [ module => 'DO' ], + }, ); __PACKAGE__->meta->initialize; diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 72844b4db..a2b8d1aa3 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -38,6 +38,12 @@ __PACKAGE__->meta->add_relationship( column_map => { id => 'ar_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 => 'AR' ], + }, ); __PACKAGE__->meta->initialize; diff --git a/SL/DB/Order.pm b/SL/DB/Order.pm index e2516ea73..f037ed16a 100644 --- a/SL/DB/Order.pm +++ b/SL/DB/Order.pm @@ -30,6 +30,12 @@ __PACKAGE__->meta->add_relationship( class => 'SL::DB::PeriodicInvoicesConfig', column_map => { id => 'oe_id' }, }, + custom_shipto => { + type => 'one to one', + class => 'SL::DB::Shipto', + column_map => { id => 'trans_id' }, + query_args => [ module => 'OE' ], + }, ); __PACKAGE__->meta->initialize; diff --git a/SL/DB/PurchaseInvoice.pm b/SL/DB/PurchaseInvoice.pm index 61d93558b..2457cdefb 100644 --- a/SL/DB/PurchaseInvoice.pm +++ b/SL/DB/PurchaseInvoice.pm @@ -23,6 +23,12 @@ __PACKAGE__->meta->add_relationship( 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;