1 # This file has been auto-generated. Do not modify it; it will be overwritten
 
   2 # by rose_auto_create_model.pl automatically.
 
   3 package SL::DB::InvoiceItem;
 
   7 use base qw(SL::DB::Object);
 
   9 __PACKAGE__->meta->table('invoice');
 
  11 __PACKAGE__->meta->columns(
 
  12   allocated          => { type => 'float', scale => 4 },
 
  13   assemblyitem       => { type => 'boolean', default => 'false' },
 
  14   base_qty           => { type => 'float', scale => 4 },
 
  15   cusordnumber       => { type => 'text' },
 
  16   deliverydate       => { type => 'date' },
 
  17   description        => { type => 'text' },
 
  18   discount           => { type => 'float', scale => 4 },
 
  19   donumber           => { type => 'text' },
 
  20   fxsellprice        => { type => 'numeric', precision => 15, scale => 5 },
 
  21   id                 => { type => 'integer', not_null => 1, sequence => 'invoiceid' },
 
  22   itime              => { type => 'timestamp', default => 'now()' },
 
  23   lastcost           => { type => 'numeric', precision => 15, scale => 5 },
 
  24   longdescription    => { type => 'text' },
 
  25   marge_percent      => { type => 'numeric', precision => 15, scale => 5 },
 
  26   marge_price_factor => { type => 'numeric', default => 1, precision => 15, scale => 5 },
 
  27   marge_total        => { type => 'numeric', precision => 15, scale => 5 },
 
  28   mtime              => { type => 'timestamp' },
 
  29   ordnumber          => { type => 'text' },
 
  30   parts_id           => { type => 'integer' },
 
  31   price_factor       => { type => 'numeric', default => 1, precision => 15, scale => 5 },
 
  32   price_factor_id    => { type => 'integer' },
 
  33   pricegroup_id      => { type => 'integer' },
 
  34   project_id         => { type => 'integer' },
 
  35   qty                => { type => 'float', scale => 4 },
 
  36   sellprice          => { type => 'numeric', precision => 15, scale => 5 },
 
  37   serialnumber       => { type => 'text' },
 
  38   subtotal           => { type => 'boolean', default => 'false' },
 
  39   trans_id           => { type => 'integer' },
 
  40   transdate          => { type => 'text' },
 
  41   unit               => { type => 'varchar', length => 20 },
 
  44 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
  46 __PACKAGE__->meta->allow_inline_column_values(1);
 
  48 __PACKAGE__->meta->foreign_keys(
 
  50     class       => 'SL::DB::Part',
 
  51     key_columns => { parts_id => 'id' },
 
  55     class       => 'SL::DB::PriceFactor',
 
  56     key_columns => { price_factor_id => 'id' },
 
  60     class       => 'SL::DB::Pricegroup',
 
  61     key_columns => { pricegroup_id => 'id' },
 
  65     class       => 'SL::DB::Project',
 
  66     key_columns => { project_id => 'id' },
 
  70     class       => 'SL::DB::Unit',
 
  71     key_columns => { unit => 'name' },