From: Moritz Bunkus Date: Mon, 22 Nov 2010 12:53:05 +0000 (+0100) Subject: Modelverknüpfungen X-Git-Tag: release-2.6.3~61^2~7^2~1^2~2^2~18 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=cc54185d1da8a3103668607c0c902b8314e3bfc4;p=kivitendo-erp.git Modelverknüpfungen --- diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index 724a01d7b..b65bf3eb6 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -15,6 +15,14 @@ __PACKAGE__->meta->add_relationship(orderitems => { type => 'one to many column_map => { id => 'trans_id' }, manager_args => { with_objects => [ 'part' ] } }, + shipto => { type => 'one to one', + class => 'SL::DB::Shipto', + column_map => { shipto_id => 'shipto_id' }, + }, + department => { type => 'one to one', + class => 'SL::DB::Department', + column_map => { department_id => 'id' }, + }, ); __PACKAGE__->meta->initialize; diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 401d08865..25393c6bc 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -33,6 +33,26 @@ __PACKAGE__->meta->add_relationship( class => 'SL::DB::PaymentTerm', column_map => { payment_id => 'id' }, }, + contact => { + type => 'one to one', + class => 'SL::DB::Contact', + column_map => { cp_id => 'cp_id' }, + }, + shipto => { + type => 'one to one', + class => 'SL::DB::Shipto', + column_map => { shipto_id => 'shipto_id' }, + }, + department => { + type => 'one to one', + class => 'SL::DB::Department', + column_map => { department_id => 'id' }, + }, + language => { + type => 'one to one', + class => 'SL::DB::Language', + column_map => { language_id => 'id' }, + }, ); __PACKAGE__->meta->initialize; diff --git a/SL/DB/Order.pm b/SL/DB/Order.pm index daab5dd7d..61a49d4ff 100644 --- a/SL/DB/Order.pm +++ b/SL/DB/Order.pm @@ -41,6 +41,26 @@ __PACKAGE__->meta->add_relationship( class => 'SL::DB::PaymentTerm', column_map => { payment_id => 'id' }, }, + contact => { + type => 'one to one', + class => 'SL::DB::Contact', + column_map => { cp_id => 'cp_id' }, + }, + shipto => { + type => 'one to one', + class => 'SL::DB::Shipto', + column_map => { shipto_id => 'shipto_id' }, + }, + department => { + type => 'one to one', + class => 'SL::DB::Department', + column_map => { department_id => 'id' }, + }, + language => { + type => 'one to one', + class => 'SL::DB::Language', + column_map => { language_id => 'id' }, + }, ); __PACKAGE__->meta->initialize;