Merge branch 'rb-wiederkehrende-rechnungen' into 263
[kivitendo-erp.git] / SL / DB / Vendor.pm
1 package SL::DB::Vendor;
2
3 use strict;
4
5 use SL::DB::MetaSetup::Vendor;
6
7 use SL::DB::VC;
8
9 __PACKAGE__->meta->add_relationship(
10   shipto => {
11     type         => 'one to many',
12     class        => 'SL::DB::Shipto',
13     column_map   => { id      => 'trans_id' },
14     manager_args => { sort_by => 'lower(shipto.shiptoname)' },
15     query_args   => [ 'shipto.module' => 'CT' ],
16   },
17   business => {
18     type         => 'one to one',
19     class        => 'SL::DB::Business',
20     column_map   => { business_id => 'id' },
21   },
22 );
23
24 __PACKAGE__->meta->make_manager_class;
25 __PACKAGE__->meta->initialize;
26
27 1;