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::PurchaseInvoice;
 
   7 use base qw(SL::DB::Object);
 
   9 __PACKAGE__->meta->table('ap');
 
  11 __PACKAGE__->meta->columns(
 
  12   amount                  => { type => 'numeric', precision => 5, scale => 15 },
 
  13   cp_id                   => { type => 'integer' },
 
  14   currency_id             => { type => 'integer', not_null => 1 },
 
  15   datepaid                => { type => 'date' },
 
  16   deliverydate            => { type => 'date' },
 
  17   department_id           => { type => 'integer' },
 
  18   direct_debit            => { type => 'boolean', default => 'false' },
 
  19   duedate                 => { type => 'date' },
 
  20   employee_id             => { type => 'integer' },
 
  21   gldate                  => { type => 'date', default => 'now' },
 
  22   globalproject_id        => { type => 'integer' },
 
  23   id                      => { type => 'integer', not_null => 1, sequence => 'glid' },
 
  24   intnotes                => { type => 'text' },
 
  25   invnumber               => { type => 'text', not_null => 1 },
 
  26   invoice                 => { type => 'boolean', default => 'false' },
 
  27   itime                   => { type => 'timestamp', default => 'now()' },
 
  28   language_id             => { type => 'integer' },
 
  29   mtime                   => { type => 'timestamp' },
 
  30   netamount               => { type => 'numeric', precision => 5, scale => 15 },
 
  31   notes                   => { type => 'text' },
 
  32   orddate                 => { type => 'date' },
 
  33   ordnumber               => { type => 'text' },
 
  34   paid                    => { type => 'numeric', precision => 5, scale => 15 },
 
  35   payment_id              => { type => 'integer' },
 
  36   quodate                 => { type => 'date' },
 
  37   quonumber               => { type => 'text' },
 
  38   shipvia                 => { type => 'text' },
 
  39   storno                  => { type => 'boolean', default => 'false' },
 
  40   storno_id               => { type => 'integer' },
 
  41   taxincluded             => { type => 'boolean', default => 'false' },
 
  42   taxzone_id              => { type => 'integer' },
 
  43   transaction_description => { type => 'text' },
 
  44   transdate               => { type => 'date', default => 'now' },
 
  45   type                    => { type => 'text' },
 
  46   vendor_id               => { type => 'integer' },
 
  49 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
  51 __PACKAGE__->meta->allow_inline_column_values(1);
 
  53 __PACKAGE__->meta->foreign_keys(
 
  55     class       => 'SL::DB::Contact',
 
  56     key_columns => { cp_id => 'cp_id' },
 
  60     class       => 'SL::DB::Currency',
 
  61     key_columns => { currency_id => 'id' },
 
  65     class       => 'SL::DB::Department',
 
  66     key_columns => { department_id => 'id' },
 
  70     class       => 'SL::DB::Employee',
 
  71     key_columns => { employee_id => 'id' },
 
  75     class       => 'SL::DB::Project',
 
  76     key_columns => { globalproject_id => 'id' },
 
  80     class       => 'SL::DB::Language',
 
  81     key_columns => { language_id => 'id' },
 
  85     class       => 'SL::DB::PaymentTerm',
 
  86     key_columns => { payment_id => 'id' },
 
  90     class       => 'SL::DB::PurchaseInvoice',
 
  91     key_columns => { storno_id => 'id' },
 
  95     class       => 'SL::DB::Vendor',
 
  96     key_columns => { vendor_id => 'id' },