use strict;
-use base qw(SL::DB::Object);
+use parent qw(SL::DB::Object);
__PACKAGE__->meta->table('delivery_orders');
__PACKAGE__->meta->columns(
+ billing_address_id => { type => 'integer' },
closed => { type => 'boolean', default => 'false' },
cp_id => { type => 'integer' },
currency_id => { type => 'integer', not_null => 1 },
globalproject_id => { type => 'integer' },
id => { type => 'integer', not_null => 1, sequence => 'id' },
intnotes => { type => 'text' },
- is_sales => { type => 'boolean' },
itime => { type => 'timestamp', default => 'now()' },
language_id => { type => 'integer' },
mtime => { type => 'timestamp' },
notes => { type => 'text' },
+ order_type => { type => 'text', not_null => 1 },
ordnumber => { type => 'text' },
oreqnumber => { type => 'text' },
+ payment_id => { type => 'integer' },
reqdate => { type => 'date' },
salesman_id => { type => 'integer' },
shippingpoint => { type => 'text' },
shipto_id => { type => 'integer' },
shipvia => { type => 'text' },
+ tax_point => { type => 'date' },
taxincluded => { type => 'boolean' },
taxzone_id => { type => 'integer', not_null => 1 },
- terms => { type => 'integer' },
transaction_description => { type => 'text' },
transdate => { type => 'date', default => 'now()' },
vendor_id => { type => 'integer' },
__PACKAGE__->meta->allow_inline_column_values(1);
__PACKAGE__->meta->foreign_keys(
+ billing_address => {
+ class => 'SL::DB::AdditionalBillingAddress',
+ key_columns => { billing_address_id => 'id' },
+ },
+
contact => {
class => 'SL::DB::Contact',
key_columns => { cp_id => 'cp_id' },
key_columns => { language_id => 'id' },
},
+ payment => {
+ class => 'SL::DB::PaymentTerm',
+ key_columns => { payment_id => 'id' },
+ },
+
salesman => {
class => 'SL::DB::Employee',
key_columns => { salesman_id => 'id' },