X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FPart.pm;h=7c79e2e0eeef724acb45071a40c8d929270763e8;hb=5067d7bd31514962af9730b33323b831d87164f8;hp=556ff8e30336198e115e97bcef782fb69e6e1e69;hpb=fb03d191f53516cbf1022e755665556e7f1acb82;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/Part.pm b/SL/DB/MetaSetup/Part.pm index 556ff8e30..7c79e2e0e 100644 --- a/SL/DB/MetaSetup/Part.pm +++ b/SL/DB/MetaSetup/Part.pm @@ -4,27 +4,23 @@ package SL::DB::Part; use strict; -use base qw(SL::DB::Object); +use parent qw(SL::DB::Object); __PACKAGE__->meta->table('parts'); __PACKAGE__->meta->columns( - alternate => { type => 'boolean', default => 'false' }, - assembly => { type => 'boolean', default => 'false' }, bin_id => { type => 'integer' }, bom => { type => 'boolean', default => 'false' }, buchungsgruppen_id => { type => 'integer' }, + classification_id => { type => 'integer', default => '0' }, 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 }, @@ -35,6 +31,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' }, @@ -67,6 +64,11 @@ __PACKAGE__->meta->foreign_keys( key_columns => { buchungsgruppen_id => 'id' }, }, + classification => { + class => 'SL::DB::PartsClassification', + key_columns => { classification_id => 'id' }, + }, + partsgroup => { class => 'SL::DB::PartsGroup', key_columns => { partsgroup_id => 'id' },