X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FInvoice.pm;h=e80b110e4f1a44853c47c1f611605549eb5356fa;hb=b293ff8ad52fc76ba0c44783e3982418114d6b08;hp=f024a75e838ed2b2da350281e3e8c2f4bb217f1b;hpb=fb03d191f53516cbf1022e755665556e7f1acb82;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/Invoice.pm b/SL/DB/MetaSetup/Invoice.pm index f024a75e8..e80b110e4 100644 --- a/SL/DB/MetaSetup/Invoice.pm +++ b/SL/DB/MetaSetup/Invoice.pm @@ -4,12 +4,13 @@ package SL::DB::Invoice; use strict; -use base qw(SL::DB::Object); +use parent qw(SL::DB::Object); __PACKAGE__->meta->table('ar'); __PACKAGE__->meta->columns( - amount => { type => 'numeric', precision => 15, scale => 5 }, + amount => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 }, + billing_address_id => { type => 'integer' }, cp_id => { type => 'integer' }, currency_id => { type => 'integer', not_null => 1 }, cusordnumber => { type => 'text' }, @@ -37,12 +38,13 @@ __PACKAGE__->meta->columns( marge_percent => { type => 'numeric', precision => 15, scale => 5 }, marge_total => { type => 'numeric', precision => 15, scale => 5 }, mtime => { type => 'timestamp' }, - netamount => { type => 'numeric', precision => 15, scale => 5 }, + netamount => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 }, notes => { type => 'text' }, orddate => { type => 'date' }, ordnumber => { type => 'text' }, - paid => { type => 'numeric', precision => 15, scale => 5 }, + paid => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 }, payment_id => { type => 'integer' }, + qrbill_without_amount => { type => 'boolean', default => 'false' }, quodate => { type => 'date' }, quonumber => { type => 'text' }, salesman_id => { type => 'integer' }, @@ -51,9 +53,9 @@ __PACKAGE__->meta->columns( shipvia => { type => 'text' }, storno => { type => 'boolean', default => 'false' }, storno_id => { type => 'integer' }, + tax_point => { type => 'date' }, taxincluded => { type => 'boolean' }, - taxzone_id => { type => 'integer' }, - terms => { type => 'integer', default => '0' }, + taxzone_id => { type => 'integer', not_null => 1 }, transaction_description => { type => 'text' }, transdate => { type => 'date', default => 'now' }, type => { type => 'text' }, @@ -64,6 +66,11 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]); __PACKAGE__->meta->allow_inline_column_values(1); __PACKAGE__->meta->foreign_keys( + billing_address => { + class => 'SL::DB::AdditionalBillingAddress', + key_columns => { billing_address_id => 'id' }, + }, + contact => { class => 'SL::DB::Contact', key_columns => { cp_id => 'cp_id' }, @@ -128,6 +135,11 @@ __PACKAGE__->meta->foreign_keys( class => 'SL::DB::Invoice', key_columns => { storno_id => 'id' }, }, + + taxzone => { + class => 'SL::DB::TaxZone', + key_columns => { taxzone_id => 'id' }, + }, ); 1;