Neues DB-Setup für Währungen
[kivitendo-erp.git] / SL / DB / MetaSetup / Invoice.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::Invoice;
4
5 use strict;
6
7 use base qw(SL::DB::Object);
8
9 __PACKAGE__->meta->setup(
10   table   => 'ar',
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     customer_id               => { type => 'integer' },
18     taxincluded               => { type => 'boolean' },
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     deliverydate              => { type => 'date' },
25     invoice                   => { type => 'boolean', default => 'false' },
26     shippingpoint             => { type => 'text' },
27     terms                     => { type => 'integer', default => '0' },
28     notes                     => { type => 'text' },
29     ordnumber                 => { type => 'text' },
30     employee_id               => { type => 'integer' },
31     quonumber                 => { type => 'text' },
32     cusordnumber              => { type => 'text' },
33     intnotes                  => { type => 'text' },
34     department_id             => { type => 'integer' },
35     shipvia                   => { type => 'text' },
36     itime                     => { type => 'timestamp', default => 'now()' },
37     mtime                     => { type => 'timestamp' },
38     cp_id                     => { type => 'integer' },
39     language_id               => { type => 'integer' },
40     payment_id                => { type => 'integer' },
41     delivery_customer_id      => { type => 'integer' },
42     delivery_vendor_id        => { type => 'integer' },
43     storno                    => { type => 'boolean', default => 'false' },
44     taxzone_id                => { type => 'integer' },
45     shipto_id                 => { type => 'integer' },
46     type                      => { type => 'text' },
47     dunning_config_id         => { type => 'integer' },
48     orddate                   => { type => 'date' },
49     quodate                   => { type => 'date' },
50     globalproject_id          => { type => 'integer' },
51     salesman_id               => { type => 'integer' },
52     transaction_description   => { type => 'text' },
53     storno_id                 => { type => 'integer' },
54     marge_total               => { type => 'numeric', precision => 5, scale => 15 },
55     marge_percent             => { type => 'numeric', precision => 5, scale => 15 },
56     donumber                  => { type => 'text' },
57     invnumber_for_credit_note => { type => 'text' },
58     direct_debit              => { type => 'boolean', default => 'false' },
59     currency_id               => { type => 'integer', not_null => 1 },
60   ],
61
62   primary_key_columns => [ 'id' ],
63
64   foreign_keys => [
65     contact => {
66       class       => 'SL::DB::Contact',
67       key_columns => { cp_id => 'cp_id' },
68     },
69
70     customer => {
71       class       => 'SL::DB::Customer',
72       key_columns => { customer_id => 'id' },
73     },
74
75     department => {
76       class       => 'SL::DB::Department',
77       key_columns => { department_id => 'id' },
78     },
79
80     dunning_config => {
81       class       => 'SL::DB::DunningConfig',
82       key_columns => { dunning_config_id => 'id' },
83     },
84
85     employee => {
86       class       => 'SL::DB::Employee',
87       key_columns => { employee_id => 'id' },
88     },
89
90     globalproject => {
91       class       => 'SL::DB::Project',
92       key_columns => { globalproject_id => 'id' },
93     },
94
95     language => {
96       class       => 'SL::DB::Language',
97       key_columns => { language_id => 'id' },
98     },
99
100     payment_terms => {
101       class       => 'SL::DB::PaymentTerm',
102       key_columns => { payment_id => 'id' },
103     },
104
105     salesman => {
106       class       => 'SL::DB::Employee',
107       key_columns => { salesman_id => 'id' },
108     },
109
110     shipto => {
111       class       => 'SL::DB::Shipto',
112       key_columns => { shipto_id => 'shipto_id' },
113     },
114
115     storno_obj => {
116       class       => 'SL::DB::Invoice',
117       key_columns => { storno_id => 'id' },
118     },
119   ],
120 );
121
122 1;
123 ;