X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FPart.pm;fp=SL%2FDB%2FMetaSetup%2FPart.pm;h=ef6ed69f5aaee46b54c96f76608c40d3329b5c21;hp=2008fef80f034209d794d86f457174b08fe9a10e;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hpb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44 diff --git a/SL/DB/MetaSetup/Part.pm b/SL/DB/MetaSetup/Part.pm index 2008fef80..ef6ed69f5 100644 --- a/SL/DB/MetaSetup/Part.pm +++ b/SL/DB/MetaSetup/Part.pm @@ -9,22 +9,18 @@ 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,19 +31,20 @@ __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' }, price_factor_id => { type => 'integer' }, priceupdate => { type => 'date', default => 'now' }, - rop => { type => 'float', scale => 4 }, + rop => { type => 'float', precision => 4, scale => 4 }, sellprice => { type => 'numeric', precision => 15, scale => 5 }, shop => { type => 'boolean', default => 'false' }, stockable => { type => 'boolean', default => 'false' }, unit => { type => 'varchar', length => 20, not_null => 1 }, ve => { type => 'integer' }, warehouse_id => { type => 'integer' }, - weight => { type => 'float', scale => 4 }, + weight => { type => 'float', precision => 4, scale => 4 }, ); __PACKAGE__->meta->primary_key_columns([ 'id' ]); @@ -67,6 +64,11 @@ __PACKAGE__->meta->foreign_keys( key_columns => { buchungsgruppen_id => 'id' }, }, + classification => { + class => 'SL::DB::PartClassification', + key_columns => { classification_id => 'id' }, + }, + partsgroup => { class => 'SL::DB::PartsGroup', key_columns => { partsgroup_id => 'id' },