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::Invoice;
 
   7 use parent qw(SL::DB::Object);
 
   9 __PACKAGE__->meta->table('ar');
 
  11 __PACKAGE__->meta->columns(
 
  12   amount                    => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
 
  13   cp_id                     => { type => 'integer' },
 
  14   currency_id               => { type => 'integer', not_null => 1 },
 
  15   cusordnumber              => { type => 'text' },
 
  16   customer_id               => { type => 'integer' },
 
  17   datepaid                  => { type => 'date' },
 
  18   delivery_customer_id      => { type => 'integer' },
 
  19   delivery_term_id          => { type => 'integer' },
 
  20   delivery_vendor_id        => { type => 'integer' },
 
  21   deliverydate              => { type => 'date' },
 
  22   department_id             => { type => 'integer' },
 
  23   direct_debit              => { type => 'boolean', default => 'false' },
 
  24   donumber                  => { type => 'text' },
 
  25   duedate                   => { type => 'date' },
 
  26   dunning_config_id         => { type => 'integer' },
 
  27   employee_id               => { type => 'integer' },
 
  28   gldate                    => { type => 'date', default => 'now' },
 
  29   globalproject_id          => { type => 'integer' },
 
  30   id                        => { type => 'integer', not_null => 1, sequence => 'glid' },
 
  31   intnotes                  => { type => 'text' },
 
  32   invnumber                 => { type => 'text', not_null => 1 },
 
  33   invnumber_for_credit_note => { type => 'text' },
 
  34   invoice                   => { type => 'boolean', default => 'false' },
 
  35   itime                     => { type => 'timestamp', default => 'now()' },
 
  36   language_id               => { type => 'integer' },
 
  37   marge_percent             => { type => 'numeric', precision => 15, scale => 5 },
 
  38   marge_total               => { type => 'numeric', precision => 15, scale => 5 },
 
  39   mtime                     => { type => 'timestamp' },
 
  40   netamount                 => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
 
  41   notes                     => { type => 'text' },
 
  42   orddate                   => { type => 'date' },
 
  43   ordnumber                 => { type => 'text' },
 
  44   paid                      => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
 
  45   payment_id                => { type => 'integer' },
 
  46   quodate                   => { type => 'date' },
 
  47   quonumber                 => { type => 'text' },
 
  48   salesman_id               => { type => 'integer' },
 
  49   shippingpoint             => { type => 'text' },
 
  50   shipto_id                 => { type => 'integer' },
 
  51   shipvia                   => { type => 'text' },
 
  52   storno                    => { type => 'boolean', default => 'false' },
 
  53   storno_id                 => { type => 'integer' },
 
  54   tax_point                 => { type => 'date' },
 
  55   taxincluded               => { type => 'boolean' },
 
  56   taxzone_id                => { type => 'integer', not_null => 1 },
 
  57   transaction_description   => { type => 'text' },
 
  58   transdate                 => { type => 'date', default => 'now' },
 
  59   type                      => { type => 'text' },
 
  62 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
  64 __PACKAGE__->meta->allow_inline_column_values(1);
 
  66 __PACKAGE__->meta->foreign_keys(
 
  68     class       => 'SL::DB::Contact',
 
  69     key_columns => { cp_id => 'cp_id' },
 
  73     class       => 'SL::DB::Currency',
 
  74     key_columns => { currency_id => 'id' },
 
  78     class       => 'SL::DB::Customer',
 
  79     key_columns => { customer_id => 'id' },
 
  83     class       => 'SL::DB::DeliveryTerm',
 
  84     key_columns => { delivery_term_id => 'id' },
 
  88     class       => 'SL::DB::Department',
 
  89     key_columns => { department_id => 'id' },
 
  93     class       => 'SL::DB::DunningConfig',
 
  94     key_columns => { dunning_config_id => 'id' },
 
  98     class       => 'SL::DB::Employee',
 
  99     key_columns => { employee_id => 'id' },
 
 103     class       => 'SL::DB::Project',
 
 104     key_columns => { globalproject_id => 'id' },
 
 108     class       => 'SL::DB::Language',
 
 109     key_columns => { language_id => 'id' },
 
 113     class       => 'SL::DB::PaymentTerm',
 
 114     key_columns => { payment_id => 'id' },
 
 118     class       => 'SL::DB::Employee',
 
 119     key_columns => { salesman_id => 'id' },
 
 123     class       => 'SL::DB::Shipto',
 
 124     key_columns => { shipto_id => 'shipto_id' },
 
 128     class       => 'SL::DB::Invoice',
 
 129     key_columns => { storno_id => 'id' },
 
 133     class       => 'SL::DB::TaxZone',
 
 134     key_columns => { taxzone_id => 'id' },