Item-Positionen für Rechnungen in DB: DB-Upgrade-Skript; Rose
[kivitendo-erp.git] / SL / DB / InvoiceItem.pm
1 package SL::DB::InvoiceItem;
2
3 use strict;
4
5 use SL::DB::MetaSetup::InvoiceItem;
6 use SL::DB::Helper::ActsAsList;
7 use SL::DB::Helper::CustomVariables (
8   sub_module  => 'invoice',
9   cvars_alias => 1,
10   overloads   => {
11     parts_id => {
12      class => 'SL::DB::Part',
13      module => 'IC',
14     },
15   },
16 );
17
18 __PACKAGE__->meta->make_manager_class;
19
20 __PACKAGE__->configure_acts_as_list(group_by => [qw(trans_id)]);
21
22 __PACKAGE__->meta->add_relationships(
23   invoice          => {
24     type           => 'one to one',
25     class          => 'SL::DB::Invoice',
26     column_map     => { trans_id => 'id' },
27   },
28
29   purchase_invoice => {
30     type           => 'one to one',
31     class          => 'SL::DB::PurchaseInvoice',
32     column_map     => { trans_id => 'id' },
33   },
34 );
35
36 __PACKAGE__->meta->initialize;
37
38 1;