RDBO Support.
[kivitendo-erp.git] / SL / DB / InvoiceItem.pm
1 package SL::DB::InvoiceItem;
2
3 use strict;
4
5 use SL::DB::MetaSetup::InvoiceItem;
6
7 for my $field (qw(
8   qty allocated sellprice fxsellprice discount base_qty marge_total
9   marge_percent lastcost price_factor marge_price_factor
10 )) {
11   __PACKAGE__->attr_number($field, places => -2);
12 }
13
14 __PACKAGE__->meta->add_relationship(
15   part => {
16     type         => 'one to one',
17     class        => 'SL::DB::Part',
18     column_map   => { parts_id => 'id' },
19   }
20 );
21
22 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
23 __PACKAGE__->meta->make_manager_class;
24
25 __PACKAGE__->meta->initialize;
26
27 1;