X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FInvoice.pm;h=b88c2f57c087afe3a6562c95709d8ce42b4ff9bb;hb=9fda7972d8dd37f1a760a7b430b638c202aac2b7;hp=eedecb4ad199a47b837c8d1aa36a3357b2918dac;hpb=3eb3d1b144adb92e62de08e67dc6ff3d39bf7483;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/Invoice.pm b/SL/DB/MetaSetup/Invoice.pm index eedecb4ad..b88c2f57c 100644 --- a/SL/DB/MetaSetup/Invoice.pm +++ b/SL/DB/MetaSetup/Invoice.pm @@ -4,18 +4,19 @@ 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 => 5, scale => 15 }, + amount => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 }, cp_id => { type => 'integer' }, currency_id => { type => 'integer', not_null => 1 }, cusordnumber => { type => 'text' }, customer_id => { type => 'integer' }, datepaid => { type => 'date' }, delivery_customer_id => { type => 'integer' }, + delivery_term_id => { type => 'integer' }, delivery_vendor_id => { type => 'integer' }, deliverydate => { type => 'date' }, department_id => { type => 'integer' }, @@ -33,14 +34,14 @@ __PACKAGE__->meta->columns( invoice => { type => 'boolean', default => 'false' }, itime => { type => 'timestamp', default => 'now()' }, language_id => { type => 'integer' }, - marge_percent => { type => 'numeric', precision => 5, scale => 15 }, - marge_total => { type => 'numeric', precision => 5, scale => 15 }, + marge_percent => { type => 'numeric', precision => 15, scale => 5 }, + marge_total => { type => 'numeric', precision => 15, scale => 5 }, mtime => { type => 'timestamp' }, - netamount => { type => 'numeric', precision => 5, scale => 15 }, + 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 => 5, scale => 15 }, + paid => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 }, payment_id => { type => 'integer' }, quodate => { type => 'date' }, quonumber => { type => 'text' }, @@ -51,8 +52,7 @@ __PACKAGE__->meta->columns( storno => { type => 'boolean', default => 'false' }, storno_id => { type => 'integer' }, 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' }, @@ -78,6 +78,11 @@ __PACKAGE__->meta->foreign_keys( key_columns => { customer_id => 'id' }, }, + delivery_term => { + class => 'SL::DB::DeliveryTerm', + key_columns => { delivery_term_id => 'id' }, + }, + department => { class => 'SL::DB::Department', key_columns => { department_id => 'id' }, @@ -122,6 +127,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;