636a5d823a329499a3d7e3345287b1984f9e11ad
[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 base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->setup(
10   table   => 'ap',
11
12   columns => [
13     id                      => { type => 'integer', not_null => 1, sequence => 'glid' },
14     invnumber               => { type => 'text', not_null => 1 },
15     transdate               => { type => 'date', default => 'now' },
16     gldate                  => { type => 'date', default => 'now' },
17     vendor_id               => { type => 'integer' },
18     taxincluded             => { type => 'boolean', default => 'false' },
19     amount                  => { type => 'numeric', precision => 5, scale => 15 },
20     netamount               => { type => 'numeric', precision => 5, scale => 15 },
21     paid                    => { type => 'numeric', precision => 5, scale => 15 },
22     datepaid                => { type => 'date' },
23     duedate                 => { type => 'date' },
24     invoice                 => { type => 'boolean', default => 'false' },
25     ordnumber               => { type => 'text' },
26     curr                    => { type => 'text' },
27     notes                   => { type => 'text' },
28     employee_id             => { type => 'integer' },
29     quonumber               => { type => 'text' },
30     intnotes                => { type => 'text' },
31     department_id           => { type => 'integer' },
32     itime                   => { type => 'timestamp', default => 'now()' },
33     mtime                   => { type => 'timestamp' },
34     shipvia                 => { type => 'text' },
35     cp_id                   => { type => 'integer' },
36     language_id             => { type => 'integer' },
37     payment_id              => { type => 'integer' },
38     storno                  => { type => 'boolean', default => 'false' },
39     taxzone_id              => { type => 'integer' },
40     type                    => { type => 'text' },
41     orddate                 => { type => 'date' },
42     quodate                 => { type => 'date' },
43     globalproject_id        => { type => 'integer' },
44     transaction_description => { type => 'text' },
45     storno_id               => { type => 'integer' },
46   ],
47
48   primary_key_columns => [ 'id' ],
49
50   allow_inline_column_values => 1,
51
52   foreign_keys => [
53     contact => {
54       class       => 'SL::DB::Contact',
55       key_columns => { cp_id => 'cp_id' },
56     },
57
58     department => {
59       class       => 'SL::DB::Department',
60       key_columns => { department_id => 'id' },
61     },
62
63     employee => {
64       class       => 'SL::DB::Employee',
65       key_columns => { employee_id => 'id' },
66     },
67
68     globalproject => {
69       class       => 'SL::DB::Project',
70       key_columns => { globalproject_id => 'id' },
71     },
72
73     language => {
74       class       => 'SL::DB::Language',
75       key_columns => { language_id => 'id' },
76     },
77
78     payment => {
79       class       => 'SL::DB::PaymentTerm',
80       key_columns => { payment_id => 'id' },
81     },
82
83     storno_obj => {
84       class       => 'SL::DB::PurchaseInvoice',
85       key_columns => { storno_id => 'id' },
86     },
87
88     vendor => {
89       class       => 'SL::DB::Vendor',
90       key_columns => { vendor_id => 'id' },
91     },
92   ],
93 );
94
95 1;
96 ;