Merge branch 'b-3.6.1' into mebil
[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   qrbill_without_amount     => { type => 'boolean', default => 'false' },
48   quodate                   => { type => 'date' },
49   quonumber                 => { type => 'text' },
50   salesman_id               => { type => 'integer' },
51   shippingpoint             => { type => 'text' },
52   shipto_id                 => { type => 'integer' },
53   shipvia                   => { type => 'text' },
54   storno                    => { type => 'boolean', default => 'false' },
55   storno_id                 => { type => 'integer' },
56   tax_point                 => { type => 'date' },
57   taxincluded               => { type => 'boolean' },
58   taxzone_id                => { type => 'integer', not_null => 1 },
59   transaction_description   => { type => 'text' },
60   transdate                 => { type => 'date', default => 'now' },
61   type                      => { type => 'text' },
62 );
63
64 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
65
66 __PACKAGE__->meta->allow_inline_column_values(1);
67
68 __PACKAGE__->meta->foreign_keys(
69   billing_address => {
70     class       => 'SL::DB::AdditionalBillingAddress',
71     key_columns => { billing_address_id => 'id' },
72   },
73
74   contact => {
75     class       => 'SL::DB::Contact',
76     key_columns => { cp_id => 'cp_id' },
77   },
78
79   currency => {
80     class       => 'SL::DB::Currency',
81     key_columns => { currency_id => 'id' },
82   },
83
84   customer => {
85     class       => 'SL::DB::Customer',
86     key_columns => { customer_id => 'id' },
87   },
88
89   delivery_term => {
90     class       => 'SL::DB::DeliveryTerm',
91     key_columns => { delivery_term_id => 'id' },
92   },
93
94   department => {
95     class       => 'SL::DB::Department',
96     key_columns => { department_id => 'id' },
97   },
98
99   dunning_config => {
100     class       => 'SL::DB::DunningConfig',
101     key_columns => { dunning_config_id => 'id' },
102   },
103
104   employee => {
105     class       => 'SL::DB::Employee',
106     key_columns => { employee_id => 'id' },
107   },
108
109   globalproject => {
110     class       => 'SL::DB::Project',
111     key_columns => { globalproject_id => 'id' },
112   },
113
114   language => {
115     class       => 'SL::DB::Language',
116     key_columns => { language_id => 'id' },
117   },
118
119   payment_terms => {
120     class       => 'SL::DB::PaymentTerm',
121     key_columns => { payment_id => 'id' },
122   },
123
124   salesman => {
125     class       => 'SL::DB::Employee',
126     key_columns => { salesman_id => 'id' },
127   },
128
129   shipto => {
130     class       => 'SL::DB::Shipto',
131     key_columns => { shipto_id => 'shipto_id' },
132   },
133
134   storno_obj => {
135     class       => 'SL::DB::Invoice',
136     key_columns => { storno_id => 'id' },
137   },
138
139   taxzone => {
140     class       => 'SL::DB::TaxZone',
141     key_columns => { taxzone_id => 'id' },
142   },
143 );
144
145 1;
146 ;