X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FPart.pm;h=bdc726ef164f0df89697e78a47acda5f643ed3aa;hb=a34ae1630d888a6c824dad13db000bd7e0e1c3e6;hp=d6814e8d0716f78eecd26e9a8176f36728b0fb4a;hpb=f9676efea9ccfa01df2a57dca9c45cc8fde0d09e;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/Part.pm b/SL/DB/MetaSetup/Part.pm index d6814e8d0..bdc726ef1 100644 --- a/SL/DB/MetaSetup/Part.pm +++ b/SL/DB/MetaSetup/Part.pm @@ -26,7 +26,6 @@ __PACKAGE__->meta->setup( inventory_accno_id => { type => 'integer' }, income_accno_id => { type => 'integer' }, expense_accno_id => { type => 'integer' }, - bin => { type => 'text' }, shop => { type => 'boolean', default => 'false' }, obsolete => { type => 'boolean', default => 'false' }, bom => { type => 'boolean', default => 'false' }, @@ -48,17 +47,50 @@ __PACKAGE__->meta->setup( onhand => { type => 'numeric', default => '0', precision => 5, scale => 25 }, stockable => { type => 'boolean', default => 'false' }, has_sernumber => { type => 'boolean', default => 'false' }, + warehouse_id => { type => 'integer' }, + bin_id => { type => 'integer' }, ], primary_key_columns => [ 'id' ], allow_inline_column_values => 1, + unique_key => [ 'partnumber' ], foreign_keys => [ + bin => { + class => 'SL::DB::Bin', + key_columns => { bin_id => 'id' }, + }, + buchungsgruppen => { class => 'SL::DB::Buchungsgruppe', key_columns => { buchungsgruppen_id => 'id' }, }, + + partsgroup => { + class => 'SL::DB::PartsGroup', + key_columns => { partsgroup_id => 'id' }, + }, + + payment => { + class => 'SL::DB::PaymentTerm', + key_columns => { payment_id => 'id' }, + }, + + price_factor => { + class => 'SL::DB::PriceFactor', + key_columns => { price_factor_id => 'id' }, + }, + + unit_obj => { + class => 'SL::DB::Unit', + key_columns => { unit => 'name' }, + }, + + warehouse => { + class => 'SL::DB::Warehouse', + key_columns => { warehouse_id => 'id' }, + }, ], );