c9c74f0d493172d96d75e0448b8fe7b2162add1e
[kivitendo-erp.git] / SL / DB / MetaSetup / PurchaseInvoice.pm
1 # This file has been auto-generated. Do not modify it; it will be overwritten
2 # by rose_auto_create_model.pl automatically.
3 package SL::DB::PurchaseInvoice;
4
5 use strict;
6
7 use parent qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('ap');
10
11 __PACKAGE__->meta->columns(
12   amount                  => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
13   cp_id                   => { type => 'integer' },
14   currency_id             => { type => 'integer', not_null => 1 },
15   datepaid                => { type => 'date' },
16   delivery_term_id        => { type => 'integer' },
17   deliverydate            => { type => 'date' },
18   department_id           => { type => 'integer' },
19   direct_debit            => { type => 'boolean', default => 'false' },
20   duedate                 => { type => 'date' },
21   employee_id             => { type => 'integer' },
22   gldate                  => { type => 'date', default => 'now' },
23   globalproject_id        => { type => 'integer' },
24   id                      => { type => 'integer', not_null => 1, sequence => 'glid' },
25   intnotes                => { type => 'text' },
26   invnumber               => { type => 'text', not_null => 1 },
27   invoice                 => { type => 'boolean', default => 'false' },
28   itime                   => { type => 'timestamp', default => 'now()' },
29   language_id             => { type => 'integer' },
30   mtime                   => { type => 'timestamp' },
31   netamount               => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
32   notes                   => { type => 'text' },
33   orddate                 => { type => 'date' },
34   ordnumber               => { type => 'text' },
35   paid                    => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
36   payment_id              => { type => 'integer' },
37   quodate                 => { type => 'date' },
38   quonumber               => { type => 'text' },
39   shipvia                 => { type => 'text' },
40   storno                  => { type => 'boolean', default => 'false' },
41   storno_id               => { type => 'integer' },
42   taxincluded             => { type => 'boolean', default => 'false' },
43   taxzone_id              => { type => 'integer', not_null => 1 },
44   transaction_description => { type => 'text' },
45   transdate               => { type => 'date', default => 'now' },
46   type                    => { type => 'text' },
47   vendor_id               => { type => 'integer' },
48 );
49
50 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
51
52 __PACKAGE__->meta->allow_inline_column_values(1);
53
54 __PACKAGE__->meta->foreign_keys(
55   contact => {
56     class       => 'SL::DB::Contact',
57     key_columns => { cp_id => 'cp_id' },
58   },
59
60   currency => {
61     class       => 'SL::DB::Currency',
62     key_columns => { currency_id => 'id' },
63   },
64
65   delivery_term => {
66     class       => 'SL::DB::DeliveryTerm',
67     key_columns => { delivery_term_id => 'id' },
68   },
69
70   department => {
71     class       => 'SL::DB::Department',
72     key_columns => { department_id => 'id' },
73   },
74
75   employee => {
76     class       => 'SL::DB::Employee',
77     key_columns => { employee_id => 'id' },
78   },
79
80   globalproject => {
81     class       => 'SL::DB::Project',
82     key_columns => { globalproject_id => 'id' },
83   },
84
85   language => {
86     class       => 'SL::DB::Language',
87     key_columns => { language_id => 'id' },
88   },
89
90   payment_terms => {
91     class       => 'SL::DB::PaymentTerm',
92     key_columns => { payment_id => 'id' },
93   },
94
95   storno_obj => {
96     class       => 'SL::DB::PurchaseInvoice',
97     key_columns => { storno_id => 'id' },
98   },
99
100   taxzone => {
101     class       => 'SL::DB::TaxZone',
102     key_columns => { taxzone_id => 'id' },
103   },
104
105   vendor => {
106     class       => 'SL::DB::Vendor',
107     key_columns => { vendor_id => 'id' },
108   },
109 );
110
111 1;
112 ;