X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FDeliveryOrderItem.pm;h=7d24d1ca28081edd3966ff8700f7cf7b215b6550;hb=2065624062cd59d7d21a6e1f39ae433a9668301e;hp=00bce88867214e00235bc4556fb2d517a3a8d2a2;hpb=a3511b2d8974c72e4d26b2d85c5cf1cd711ccb6f;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/DeliveryOrderItem.pm b/SL/DB/MetaSetup/DeliveryOrderItem.pm index 00bce8886..7d24d1ca2 100644 --- a/SL/DB/MetaSetup/DeliveryOrderItem.pm +++ b/SL/DB/MetaSetup/DeliveryOrderItem.pm @@ -4,34 +4,37 @@ package SL::DB::DeliveryOrderItem; use strict; -use base qw(SL::DB::Object); +use parent qw(SL::DB::Object); __PACKAGE__->meta->table('delivery_order_items'); __PACKAGE__->meta->columns( - base_qty => { type => 'float', scale => 4 }, - cusordnumber => { type => 'text' }, - delivery_order_id => { type => 'integer', not_null => 1 }, - description => { type => 'text' }, - discount => { type => 'float', scale => 4 }, - id => { type => 'integer', not_null => 1, sequence => 'delivery_order_items_id' }, - itime => { type => 'timestamp', default => 'now()' }, - lastcost => { type => 'numeric', precision => 15, scale => 5 }, - longdescription => { type => 'text' }, - marge_price_factor => { type => 'numeric', default => 1, precision => 15, scale => 5 }, - mtime => { type => 'timestamp' }, - ordnumber => { type => 'text' }, - parts_id => { type => 'integer', not_null => 1 }, - price_factor => { type => 'numeric', default => 1, precision => 15, scale => 5 }, - price_factor_id => { type => 'integer' }, - pricegroup_id => { type => 'integer' }, - project_id => { type => 'integer' }, - qty => { type => 'numeric', precision => 25, scale => 5 }, - reqdate => { type => 'date' }, - sellprice => { type => 'numeric', precision => 15, scale => 5 }, - serialnumber => { type => 'text' }, - transdate => { type => 'text' }, - unit => { type => 'varchar', length => 20 }, + active_discount_source => { type => 'text', default => '', not_null => 1 }, + active_price_source => { type => 'text', default => '', not_null => 1 }, + base_qty => { type => 'float', precision => 4, scale => 4 }, + cusordnumber => { type => 'text' }, + delivery_order_id => { type => 'integer', not_null => 1 }, + description => { type => 'text' }, + discount => { type => 'float', precision => 4, scale => 4 }, + id => { type => 'integer', not_null => 1, sequence => 'delivery_order_items_id' }, + itime => { type => 'timestamp', default => 'now()' }, + lastcost => { type => 'numeric', precision => 15, scale => 5 }, + longdescription => { type => 'text' }, + marge_price_factor => { type => 'numeric', default => 1, precision => 15, scale => 5 }, + mtime => { type => 'timestamp' }, + ordnumber => { type => 'text' }, + parts_id => { type => 'integer', not_null => 1 }, + position => { type => 'integer', not_null => 1 }, + price_factor => { type => 'numeric', default => 1, precision => 15, scale => 5 }, + price_factor_id => { type => 'integer' }, + pricegroup_id => { type => 'integer' }, + project_id => { type => 'integer' }, + qty => { type => 'numeric', precision => 25, scale => 5 }, + reqdate => { type => 'date' }, + sellprice => { type => 'numeric', precision => 15, scale => 5 }, + serialnumber => { type => 'text' }, + transdate => { type => 'text' }, + unit => { type => 'varchar', length => 20 }, ); __PACKAGE__->meta->primary_key_columns([ 'id' ]); @@ -63,6 +66,11 @@ __PACKAGE__->meta->foreign_keys( class => 'SL::DB::Project', key_columns => { project_id => 'id' }, }, + + unit_obj => { + class => 'SL::DB::Unit', + key_columns => { unit => 'name' }, + }, ); 1;