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' },
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' },
+ },
],
);