]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/MetaSetup/InvoiceItem.pm
restart apache2 in postinst
[mfinanz.git] / SL / DB / MetaSetup / InvoiceItem.pm
index 2da0d7f18a8b35b20e74603257d6813c00f97aa9..173392950d60c9b9a02b5a17bc8e677ff821bfd2 100644 (file)
@@ -11,16 +11,18 @@ __PACKAGE__->meta->table('invoice');
 __PACKAGE__->meta->columns(
   active_discount_source => { type => 'text', default => '', not_null => 1 },
   active_price_source    => { type => 'text', default => '', not_null => 1 },
-  allocated              => { type => 'float', scale => 4 },
+  allocated              => { type => 'float', precision => 4, scale => 4 },
   assemblyitem           => { type => 'boolean', default => 'false' },
-  base_qty               => { type => 'float', scale => 4 },
+  base_qty               => { type => 'float', precision => 4, scale => 4 },
   cusordnumber           => { type => 'text' },
   deliverydate           => { type => 'date' },
   description            => { type => 'text' },
-  discount               => { type => 'float', scale => 4 },
+  discount               => { type => 'float', precision => 4, scale => 4 },
   donumber               => { type => 'text' },
+  expense_chart_id       => { type => 'integer' },
   fxsellprice            => { type => 'numeric', precision => 15, scale => 5 },
   id                     => { type => 'integer', not_null => 1, sequence => 'invoiceid' },
+  inventory_chart_id     => { type => 'integer' },
   itime                  => { type => 'timestamp', default => 'now()' },
   lastcost               => { type => 'numeric', precision => 15, scale => 5 },
   longdescription        => { type => 'text' },
@@ -35,10 +37,12 @@ __PACKAGE__->meta->columns(
   price_factor_id        => { type => 'integer' },
   pricegroup_id          => { type => 'integer' },
   project_id             => { type => 'integer' },
-  qty                    => { type => 'float', scale => 4 },
+  qty                    => { type => 'numeric', precision => 25, scale => 5 },
   sellprice              => { type => 'numeric', precision => 15, scale => 5 },
   serialnumber           => { type => 'text' },
   subtotal               => { type => 'boolean', default => 'false' },
+  tax_chart_type         => { type => 'varchar', length => 20 },
+  tax_id                 => { type => 'integer' },
   trans_id               => { type => 'integer' },
   transdate              => { type => 'text' },
   unit                   => { type => 'varchar', length => 20 },
@@ -49,6 +53,16 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 __PACKAGE__->meta->allow_inline_column_values(1);
 
 __PACKAGE__->meta->foreign_keys(
+  expense_chart => {
+    class       => 'SL::DB::Chart',
+    key_columns => { expense_chart_id => 'id' },
+  },
+
+  inventory_chart => {
+    class       => 'SL::DB::Chart',
+    key_columns => { inventory_chart_id => 'id' },
+  },
+
   part => {
     class       => 'SL::DB::Part',
     key_columns => { parts_id => 'id' },
@@ -69,6 +83,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { project_id => 'id' },
   },
 
+  tax => {
+    class       => 'SL::DB::Tax',
+    key_columns => { tax_id => 'id' },
+  },
+
   unit_obj => {
     class       => 'SL::DB::Unit',
     key_columns => { unit => 'name' },