X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FVendor.pm;h=1dd936907d8d7b09939bc8b462fa2a57c36fb7cf;hb=d2550089aa9f5d321e025df59815b0eabc7037ab;hp=d1d972a1586e881f250f5c8e6223cbbdfc2fc952;hpb=f87763cd84d89aafc4c4110ba42d041b02ce4371;p=kivitendo-erp.git diff --git a/SL/DB/Vendor.pm b/SL/DB/Vendor.pm index d1d972a15..1dd936907 100644 --- a/SL/DB/Vendor.pm +++ b/SL/DB/Vendor.pm @@ -4,6 +4,10 @@ use strict; use SL::DB::MetaSetup::Vendor; use SL::DB::Helper::TransNumberGenerator; +use SL::DB::Helper::CustomVariables ( + module => 'CT', + cvars_alias => 1, +); use SL::DB::VC; @@ -13,12 +17,13 @@ __PACKAGE__->meta->add_relationship( class => 'SL::DB::Shipto', column_map => { id => 'trans_id' }, manager_args => { sort_by => 'lower(shipto.shiptoname)' }, - query_args => [ 'shipto.module' => 'CT' ], + query_args => [ module => 'CT' ], }, - business => { - type => 'one to one', - class => 'SL::DB::Business', - column_map => { business_id => 'id' }, + contacts => { + type => 'one to many', + class => 'SL::DB::Contact', + column_map => { id => 'cp_cv_id' }, + manager_args => { sort_by => 'lower(contacts.cp_name)' }, }, );