X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/03d3d025ea4c8bea085fc7cdf1fe7be0b513eb63..e53511429e0f3c1b73f7e1262ae600aef0a43a2e:/SL/DB/MetaSetup/Invoice.pm diff --git a/SL/DB/MetaSetup/Invoice.pm b/SL/DB/MetaSetup/Invoice.pm index 1a8d1f00d..72aaa4505 100644 --- a/SL/DB/MetaSetup/Invoice.pm +++ b/SL/DB/MetaSetup/Invoice.pm @@ -9,7 +9,7 @@ use base qw(SL::DB::Object); __PACKAGE__->meta->table('ar'); __PACKAGE__->meta->columns( - amount => { type => 'numeric', precision => 5, scale => 15 }, + amount => { type => 'numeric', precision => 15, scale => 5 }, cp_id => { type => 'integer' }, currency_id => { type => 'integer', not_null => 1 }, cusordnumber => { type => 'text' }, @@ -34,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', precision => 15, scale => 5 }, notes => { type => 'text' }, orddate => { type => 'date' }, ordnumber => { type => 'text' }, - paid => { type => 'numeric', precision => 5, scale => 15 }, + paid => { type => 'numeric', precision => 15, scale => 5 }, payment_id => { type => 'integer' }, quodate => { type => 'date' }, quonumber => { type => 'text' }, @@ -52,7 +52,7 @@ __PACKAGE__->meta->columns( storno => { type => 'boolean', default => 'false' }, storno_id => { type => 'integer' }, taxincluded => { type => 'boolean' }, - taxzone_id => { type => 'integer' }, + taxzone_id => { type => 'integer', not_null => 1 }, terms => { type => 'integer', default => '0' }, transaction_description => { type => 'text' }, transdate => { type => 'date', default => 'now' }, @@ -128,6 +128,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;