X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/4bcf880408fcc4270084f36520d4fd2cfd509fbc..f63bc3db2b0dc62707d4fc75d882e68c06bbcec5:/SL/DB/MetaSetup/Part.pm diff --git a/SL/DB/MetaSetup/Part.pm b/SL/DB/MetaSetup/Part.pm index 3c5eb76b7..f3c33a606 100644 --- a/SL/DB/MetaSetup/Part.pm +++ b/SL/DB/MetaSetup/Part.pm @@ -4,50 +4,49 @@ 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( - id => { type => 'integer', not_null => 1, sequence => 'id' }, - partnumber => { type => 'text', not_null => 1 }, - description => { type => 'text' }, - listprice => { type => 'numeric', precision => 5, scale => 15 }, - sellprice => { type => 'numeric', precision => 5, scale => 15 }, - lastcost => { type => 'numeric', precision => 5, scale => 15 }, - priceupdate => { type => 'date', default => 'now' }, - weight => { type => 'float', precision => 4 }, - notes => { type => 'text' }, - makemodel => { type => 'boolean', default => 'false' }, assembly => { type => 'boolean', default => 'false' }, - alternate => { type => 'boolean', default => 'false' }, - rop => { type => 'float', precision => 4 }, - inventory_accno_id => { type => 'integer' }, - income_accno_id => { type => 'integer' }, - expense_accno_id => { type => 'integer' }, - shop => { type => 'boolean', default => 'false' }, - obsolete => { type => 'boolean', default => 'false' }, + bin_id => { type => 'integer' }, bom => { type => 'boolean', default => 'false' }, - image => { type => 'text' }, + buchungsgruppen_id => { type => 'integer' }, + description => { type => 'text' }, drawing => { type => 'text' }, - microfiche => { type => 'text' }, - partsgroup_id => { type => 'integer' }, - ve => { type => 'integer' }, - gv => { type => 'numeric', precision => 5, scale => 15 }, + 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 }, + makemodel => { type => 'boolean', default => 'false' }, + microfiche => { type => 'text' }, mtime => { type => 'timestamp' }, - unit => { type => 'varchar', length => 20, not_null => 1 }, - formel => { type => 'text' }, not_discountable => { type => 'boolean', default => 'false' }, - buchungsgruppen_id => { type => 'integer' }, + notes => { type => 'text' }, + obsolete => { type => 'boolean', default => 'false' }, + onhand => { type => 'numeric', default => '0', precision => 25, scale => 5 }, + partnumber => { type => 'text', not_null => 1 }, + partsgroup_id => { type => 'integer' }, payment_id => { type => 'integer' }, - ean => { type => 'text' }, price_factor_id => { type => 'integer' }, - onhand => { type => 'numeric', default => '0', precision => 5, scale => 25 }, + priceupdate => { type => 'date', default => 'now' }, + rop => { type => 'float', scale => 4 }, + sellprice => { type => 'numeric', precision => 15, scale => 5 }, + shop => { type => 'boolean', default => 'false' }, stockable => { type => 'boolean', default => 'false' }, - has_sernumber => { type => 'boolean', default => 'false' }, + unit => { type => 'varchar', length => 20, not_null => 1 }, + ve => { type => 'integer' }, warehouse_id => { type => 'integer' }, - bin_id => { type => 'integer' }, + weight => { type => 'float', scale => 4 }, ); __PACKAGE__->meta->primary_key_columns([ 'id' ]); @@ -67,6 +66,21 @@ __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' }, @@ -93,7 +107,5 @@ __PACKAGE__->meta->foreign_keys( }, ); -# __PACKAGE__->meta->initialize; - 1; ;