From 325c539c21187087e5540646c3c4e9cabd52ee84 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 6 Feb 2014 14:23:07 +0100 Subject: [PATCH] =?utf8?q?Rose-Models=20Einkauf/Verkauf:=20Relationships?= =?utf8?q?=20f=C3=BCr=20angepasste=20Lieferadressen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/DeliveryOrder.pm | 6 ++++++ SL/DB/Invoice.pm | 6 ++++++ SL/DB/Order.pm | 6 ++++++ SL/DB/PurchaseInvoice.pm | 6 ++++++ 4 files changed, 24 insertions(+) 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; -- 2.20.1