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   billing_address_id        => { type => 'integer' },
 
  14   cp_id                     => { type => 'integer' },
 
  15   currency_id               => { type => 'integer', not_null => 1 },
 
  16   cusordnumber              => { type => 'text' },
 
  17   customer_id               => { type => 'integer' },
 
  18   datepaid                  => { type => 'date' },
 
  19   delivery_customer_id      => { type => 'integer' },
 
  20   delivery_term_id          => { type => 'integer' },
 
  21   delivery_vendor_id        => { type => 'integer' },
 
  22   deliverydate              => { type => 'date' },
 
  23   department_id             => { type => 'integer' },
 
  24   direct_debit              => { type => 'boolean', default => 'false' },
 
  25   donumber                  => { type => 'text' },
 
  26   duedate                   => { type => 'date' },
 
  27   dunning_config_id         => { type => 'integer' },
 
  28   employee_id               => { type => 'integer' },
 
  29   gldate                    => { type => 'date', default => 'now' },
 
  30   globalproject_id          => { type => 'integer' },
 
  31   id                        => { type => 'integer', not_null => 1, sequence => 'glid' },
 
  32   intnotes                  => { type => 'text' },
 
  33   invnumber                 => { type => 'text', not_null => 1 },
 
  34   invnumber_for_credit_note => { type => 'text' },
 
  35   invoice                   => { type => 'boolean', default => 'false' },
 
  36   itime                     => { type => 'timestamp', default => 'now()' },
 
  37   language_id               => { type => 'integer' },
 
  38   marge_percent             => { type => 'numeric', precision => 15, scale => 5 },
 
  39   marge_total               => { type => 'numeric', precision => 15, scale => 5 },
 
  40   mtime                     => { type => 'timestamp' },
 
  41   netamount                 => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
 
  42   notes                     => { type => 'text' },
 
  43   orddate                   => { type => 'date' },
 
  44   ordnumber                 => { type => 'text' },
 
  45   paid                      => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
 
  46   payment_id                => { type => 'integer' },
 
  47   qrbill_without_amount     => { type => 'boolean', default => 'false' },
 
  48   quodate                   => { type => 'date' },
 
  49   quonumber                 => { type => 'text' },
 
  50   salesman_id               => { type => 'integer' },
 
  51   shippingpoint             => { type => 'text' },
 
  52   shipto_id                 => { type => 'integer' },
 
  53   shipvia                   => { type => 'text' },
 
  54   storno                    => { type => 'boolean', default => 'false' },
 
  55   storno_id                 => { type => 'integer' },
 
  56   tax_point                 => { type => 'date' },
 
  57   taxincluded               => { type => 'boolean' },
 
  58   taxzone_id                => { type => 'integer', not_null => 1 },
 
  59   transaction_description   => { type => 'text' },
 
  60   transdate                 => { type => 'date', default => 'now' },
 
  61   type                      => { type => 'text' },
 
  64 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
  66 __PACKAGE__->meta->allow_inline_column_values(1);
 
  68 __PACKAGE__->meta->foreign_keys(
 
  70     class       => 'SL::DB::AdditionalBillingAddress',
 
  71     key_columns => { billing_address_id => 'id' },
 
  75     class       => 'SL::DB::Contact',
 
  76     key_columns => { cp_id => 'cp_id' },
 
  80     class       => 'SL::DB::Currency',
 
  81     key_columns => { currency_id => 'id' },
 
  85     class       => 'SL::DB::Customer',
 
  86     key_columns => { customer_id => 'id' },
 
  90     class       => 'SL::DB::DeliveryTerm',
 
  91     key_columns => { delivery_term_id => 'id' },
 
  95     class       => 'SL::DB::Department',
 
  96     key_columns => { department_id => 'id' },
 
 100     class       => 'SL::DB::DunningConfig',
 
 101     key_columns => { dunning_config_id => 'id' },
 
 105     class       => 'SL::DB::Employee',
 
 106     key_columns => { employee_id => 'id' },
 
 110     class       => 'SL::DB::Project',
 
 111     key_columns => { globalproject_id => 'id' },
 
 115     class       => 'SL::DB::Language',
 
 116     key_columns => { language_id => 'id' },
 
 120     class       => 'SL::DB::PaymentTerm',
 
 121     key_columns => { payment_id => 'id' },
 
 125     class       => 'SL::DB::Employee',
 
 126     key_columns => { salesman_id => 'id' },
 
 130     class       => 'SL::DB::Shipto',
 
 131     key_columns => { shipto_id => 'shipto_id' },
 
 135     class       => 'SL::DB::Invoice',
 
 136     key_columns => { storno_id => 'id' },
 
 140     class       => 'SL::DB::TaxZone',
 
 141     key_columns => { taxzone_id => 'id' },