LXDebug: Flag SHOW_CALLER für Ausgabe Dateiname:Zeilennummer bei message() & dump()
[kivitendo-erp.git] / SL / DB / MetaSetup / Part.pm
index f3c33a6..65cd85d 100644 (file)
@@ -9,21 +9,17 @@ use parent qw(SL::DB::Object);
 __PACKAGE__->meta->table('parts');
 
 __PACKAGE__->meta->columns(
-  assembly           => { type => 'boolean', default => 'false' },
   bin_id             => { type => 'integer' },
   bom                => { type => 'boolean', default => 'false' },
   buchungsgruppen_id => { type => 'integer' },
   description        => { type => 'text' },
   drawing            => { type => 'text' },
   ean                => { type => 'text' },
-  expense_accno_id   => { type => 'integer' },
   formel             => { type => 'text' },
   gv                 => { type => 'numeric', precision => 15, scale => 5 },
   has_sernumber      => { type => 'boolean', default => 'false' },
   id                 => { type => 'integer', not_null => 1, sequence => 'id' },
   image              => { type => 'text' },
-  income_accno_id    => { type => 'integer' },
-  inventory_accno_id => { type => 'integer' },
   itime              => { type => 'timestamp', default => 'now()' },
   lastcost           => { type => 'numeric', precision => 15, scale => 5 },
   listprice          => { type => 'numeric', precision => 15, scale => 5 },
@@ -34,6 +30,7 @@ __PACKAGE__->meta->columns(
   notes              => { type => 'text' },
   obsolete           => { type => 'boolean', default => 'false' },
   onhand             => { type => 'numeric', default => '0', precision => 25, scale => 5 },
+  part_type          => { type => 'enum', check_in => [ 'part', 'service', 'assembly', 'assortment' ], db_type => 'part_type_enum', not_null => 1 },
   partnumber         => { type => 'text', not_null => 1 },
   partsgroup_id      => { type => 'integer' },
   payment_id         => { type => 'integer' },
@@ -66,21 +63,6 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { buchungsgruppen_id => 'id' },
   },
 
-  expense_account => {
-    class       => 'SL::DB::Chart',
-    key_columns => { expense_accno_id => 'id' },
-  },
-
-  income_account => {
-    class       => 'SL::DB::Chart',
-    key_columns => { income_accno_id => 'id' },
-  },
-
-  inventory_account => {
-    class       => 'SL::DB::Chart',
-    key_columns => { inventory_accno_id => 'id' },
-  },
-
   partsgroup => {
     class       => 'SL::DB::PartsGroup',
     key_columns => { partsgroup_id => 'id' },