441f9c5907a3aa05e77e4e10eb317053b971ba13
[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 parent qw(SL::DB::Object);
8
9 __PACKAGE__->meta->table('ar');
10
11 __PACKAGE__->meta->columns(
12   amount                    => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
13   billing_address_id        => { type => 'integer' },
14   cp_id                     => { type => 'integer' },
15   currency_id               => { type => 'integer', not_null => 1 },
16   cusordnumber              => { type => 'text' },
17   customer_id               => { type => 'integer' },
18   datepaid                  => { type => 'date' },
19   delivery_customer_id      => { type => 'integer' },
20   delivery_term_id          => { type => 'integer' },
21   delivery_vendor_id        => { type => 'integer' },
22   deliverydate              => { type => 'date' },
23   department_id             => { type => 'integer' },
24   direct_debit              => { type => 'boolean', default => 'false' },
25   donumber                  => { type => 'text' },
26   duedate                   => { type => 'date' },
27   dunning_config_id         => { type => 'integer' },
28   employee_id               => { type => 'integer' },
29   gldate                    => { type => 'date', default => 'now' },
30   globalproject_id          => { type => 'integer' },
31   id                        => { type => 'integer', not_null => 1, sequence => 'glid' },
32   intnotes                  => { type => 'text' },
33   invnumber                 => { type => 'text', not_null => 1 },
34   invnumber_for_credit_note => { type => 'text' },
35   invoice                   => { type => 'boolean', default => 'false' },
36   itime                     => { type => 'timestamp', default => 'now()' },
37   language_id               => { type => 'integer' },
38   marge_percent             => { type => 'numeric', precision => 15, scale => 5 },
39   marge_total               => { type => 'numeric', precision => 15, scale => 5 },
40   mtime                     => { type => 'timestamp' },
41   netamount                 => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
42   notes                     => { type => 'text' },
43   orddate                   => { type => 'date' },
44   ordnumber                 => { type => 'text' },
45   paid                      => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
46   payment_id                => { type => 'integer' },
47   quodate                   => { type => 'date' },
48   quonumber                 => { type => 'text' },
49   salesman_id               => { type => 'integer' },
50   shippingpoint             => { type => 'text' },
51   shipto_id                 => { type => 'integer' },
52   shipvia                   => { type => 'text' },
53   storno                    => { type => 'boolean', default => 'false' },
54   storno_id                 => { type => 'integer' },
55   tax_point                 => { type => 'date' },
56   taxincluded               => { type => 'boolean' },
57   taxzone_id                => { type => 'integer', not_null => 1 },
58   transaction_description   => { type => 'text' },
59   transdate                 => { type => 'date', default => 'now' },
60   type                      => { type => 'text' },
61 );
62
63 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
64
65 __PACKAGE__->meta->allow_inline_column_values(1);
66
67 __PACKAGE__->meta->foreign_keys(
68   billing_address => {
69     class       => 'SL::DB::AdditionalBillingAddress',
70     key_columns => { billing_address_id => 'id' },
71   },
72
73   contact => {
74     class       => 'SL::DB::Contact',
75     key_columns => { cp_id => 'cp_id' },
76   },
77
78   currency => {
79     class       => 'SL::DB::Currency',
80     key_columns => { currency_id => 'id' },
81   },
82
83   customer => {
84     class       => 'SL::DB::Customer',
85     key_columns => { customer_id => 'id' },
86   },
87
88   delivery_term => {
89     class       => 'SL::DB::DeliveryTerm',
90     key_columns => { delivery_term_id => 'id' },
91   },
92
93   department => {
94     class       => 'SL::DB::Department',
95     key_columns => { department_id => 'id' },
96   },
97
98   dunning_config => {
99     class       => 'SL::DB::DunningConfig',
100     key_columns => { dunning_config_id => 'id' },
101   },
102
103   employee => {
104     class       => 'SL::DB::Employee',
105     key_columns => { employee_id => 'id' },
106   },
107
108   globalproject => {
109     class       => 'SL::DB::Project',
110     key_columns => { globalproject_id => 'id' },
111   },
112
113   language => {
114     class       => 'SL::DB::Language',
115     key_columns => { language_id => 'id' },
116   },
117
118   payment_terms => {
119     class       => 'SL::DB::PaymentTerm',
120     key_columns => { payment_id => 'id' },
121   },
122
123   salesman => {
124     class       => 'SL::DB::Employee',
125     key_columns => { salesman_id => 'id' },
126   },
127
128   shipto => {
129     class       => 'SL::DB::Shipto',
130     key_columns => { shipto_id => 'shipto_id' },
131   },
132
133   storno_obj => {
134     class       => 'SL::DB::Invoice',
135     key_columns => { storno_id => 'id' },
136   },
137
138   taxzone => {
139     class       => 'SL::DB::TaxZone',
140     key_columns => { taxzone_id => 'id' },
141   },
142 );
143
144 1;
145 ;