__PACKAGE__->meta->columns(
acc_trans_id => { type => 'bigint', not_null => 1, sequence => 'acc_trans_id_seq' },
- trans_id => { type => 'integer', not_null => 1 },
- chart_id => { type => 'integer', not_null => 1 },
amount => { type => 'numeric', precision => 5, scale => 15 },
- transdate => { type => 'date', default => 'now' },
- gldate => { type => 'date', default => 'now' },
- source => { type => 'text' },
+ cb_transaction => { type => 'boolean', default => 'false', not_null => 1 },
+ chart_id => { type => 'integer', not_null => 1 },
+ chart_link => { type => 'text', not_null => 1 },
cleared => { type => 'boolean', default => 'false', not_null => 1 },
fx_transaction => { type => 'boolean', default => 'false', not_null => 1 },
- ob_transaction => { type => 'boolean', default => 'false', not_null => 1 },
- cb_transaction => { type => 'boolean', default => 'false', not_null => 1 },
- project_id => { type => 'integer' },
- memo => { type => 'text' },
- taxkey => { type => 'integer' },
+ gldate => { type => 'date', default => 'now' },
itime => { type => 'timestamp', default => 'now()' },
+ memo => { type => 'text' },
mtime => { type => 'timestamp' },
+ ob_transaction => { type => 'boolean', default => 'false', not_null => 1 },
+ project_id => { type => 'integer' },
+ source => { type => 'text' },
tax_id => { type => 'integer', not_null => 1 },
- chart_link => { type => 'text', not_null => 1 },
+ taxkey => { type => 'integer' },
+ trans_id => { type => 'integer', not_null => 1 },
+ transdate => { type => 'date', default => 'now' },
);
__PACKAGE__->meta->primary_key_columns([ 'acc_trans_id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('assembly');
__PACKAGE__->meta->columns(
- id => { type => 'integer' },
- parts_id => { type => 'integer' },
- qty => { type => 'float', precision => 4 },
+ assembly_id => { type => 'serial', not_null => 1 },
bom => { type => 'boolean' },
+ id => { type => 'integer' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
- assembly_id => { type => 'serial', not_null => 1 },
+ parts_id => { type => 'integer' },
+ qty => { type => 'float', precision => 4 },
);
__PACKAGE__->meta->primary_key_columns([ 'assembly_id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('audittrail');
__PACKAGE__->meta->columns(
- trans_id => { type => 'integer' },
- tablename => { type => 'text' },
- reference => { type => 'text' },
- formname => { type => 'text' },
action => { type => 'text' },
- transdate => { type => 'timestamp', default => 'now' },
employee_id => { type => 'integer' },
+ formname => { type => 'text' },
id => { type => 'serial', not_null => 1 },
+ reference => { type => 'text' },
+ tablename => { type => 'text' },
+ trans_id => { type => 'integer' },
+ transdate => { type => 'timestamp', default => 'now' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('background_jobs');
__PACKAGE__->meta->columns(
+ active => { type => 'boolean' },
+ cron_spec => { type => 'varchar', length => 255 },
+ data => { type => 'text' },
id => { type => 'serial', not_null => 1 },
- type => { type => 'varchar', length => 255 },
- package_name => { type => 'varchar', length => 255 },
last_run_at => { type => 'timestamp' },
next_run_at => { type => 'timestamp' },
- data => { type => 'text' },
- active => { type => 'boolean' },
- cron_spec => { type => 'varchar', length => 255 },
+ package_name => { type => 'varchar', length => 255 },
+ type => { type => 'varchar', length => 255 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('background_job_histories');
__PACKAGE__->meta->columns(
+ data => { type => 'text' },
+ error => { type => 'text', alias => 'error_col' },
id => { type => 'serial', not_null => 1 },
package_name => { type => 'varchar', length => 255 },
+ result => { type => 'text' },
run_at => { type => 'timestamp' },
status => { type => 'varchar', length => 255 },
- result => { type => 'text' },
- error => { type => 'text', alias => 'error_col' },
- data => { type => 'text' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('bank_accounts');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
account_number => { type => 'varchar', length => 100 },
+ bank => { type => 'text' },
bank_code => { type => 'varchar', length => 100 },
- iban => { type => 'varchar', length => 100 },
bic => { type => 'varchar', length => 100 },
- bank => { type => 'text' },
chart_id => { type => 'integer', not_null => 1 },
+ iban => { type => 'varchar', length => 100 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('bin');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- warehouse_id => { type => 'integer', not_null => 1 },
description => { type => 'text' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
+ warehouse_id => { type => 'integer', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('buchungsgruppen');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
description => { type => 'text' },
- inventory_accno_id => { type => 'integer' },
- income_accno_id_0 => { type => 'integer' },
expense_accno_id_0 => { type => 'integer' },
- income_accno_id_1 => { type => 'integer' },
expense_accno_id_1 => { type => 'integer' },
- income_accno_id_2 => { type => 'integer' },
expense_accno_id_2 => { type => 'integer' },
- income_accno_id_3 => { type => 'integer' },
expense_accno_id_3 => { type => 'integer' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ income_accno_id_0 => { type => 'integer' },
+ income_accno_id_1 => { type => 'integer' },
+ income_accno_id_2 => { type => 'integer' },
+ income_accno_id_3 => { type => 'integer' },
+ inventory_accno_id => { type => 'integer' },
sortkey => { type => 'integer', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('business');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
+ customernumberinit => { type => 'text' },
description => { type => 'text' },
discount => { type => 'float', precision => 4 },
- customernumberinit => { type => 'text' },
- salesman => { type => 'boolean', default => 'false' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
+ salesman => { type => 'boolean', default => 'false' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('chart');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
accno => { type => 'text', not_null => 1 },
- description => { type => 'text' },
- charttype => { type => 'character', default => 'A', length => 1 },
category => { type => 'character', length => 1 },
- link => { type => 'text', not_null => 1 },
- taxkey_id => { type => 'integer' },
- pos_bwa => { type => 'integer' },
- pos_bilanz => { type => 'integer' },
- pos_eur => { type => 'integer' },
+ charttype => { type => 'character', default => 'A', length => 1 },
datevautomatik => { type => 'boolean', default => 'false' },
+ description => { type => 'text' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
+ link => { type => 'text', not_null => 1 },
mtime => { type => 'timestamp' },
new_chart_id => { type => 'integer' },
+ pos_bilanz => { type => 'integer' },
+ pos_bwa => { type => 'integer' },
+ pos_eur => { type => 'integer' },
+ taxkey_id => { type => 'integer' },
valid_from => { type => 'date' },
);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('contacts');
__PACKAGE__->meta->columns(
- cp_id => { type => 'integer', not_null => 1, sequence => 'id' },
+ cp_abteilung => { type => 'text' },
+ cp_birthday => { type => 'date' },
+ cp_city => { type => 'text' },
cp_cv_id => { type => 'integer' },
- cp_title => { type => 'varchar', length => 75 },
- cp_givenname => { type => 'varchar', length => 75 },
- cp_name => { type => 'varchar', length => 75 },
cp_email => { type => 'text' },
- cp_phone1 => { type => 'varchar', length => 75 },
- cp_phone2 => { type => 'varchar', length => 75 },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
cp_fax => { type => 'text' },
+ cp_gender => { type => 'character', length => 1 },
+ cp_givenname => { type => 'varchar', length => 75 },
+ cp_id => { type => 'integer', not_null => 1, sequence => 'id' },
cp_mobile1 => { type => 'text' },
cp_mobile2 => { type => 'text' },
- cp_satphone => { type => 'text' },
- cp_satfax => { type => 'text' },
- cp_project => { type => 'text' },
- cp_privatphone => { type => 'text' },
+ cp_name => { type => 'varchar', length => 75 },
+ cp_phone1 => { type => 'varchar', length => 75 },
+ cp_phone2 => { type => 'varchar', length => 75 },
+ cp_position => { type => 'varchar', length => 75 },
cp_privatemail => { type => 'text' },
- cp_abteilung => { type => 'text' },
- cp_gender => { type => 'character', length => 1 },
+ cp_privatphone => { type => 'text' },
+ cp_project => { type => 'text' },
+ cp_satfax => { type => 'text' },
+ cp_satphone => { type => 'text' },
cp_street => { type => 'text' },
+ cp_title => { type => 'varchar', length => 75 },
cp_zipcode => { type => 'text' },
- cp_city => { type => 'text' },
- cp_birthday => { type => 'date' },
- cp_position => { type => 'varchar', length => 75 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
);
__PACKAGE__->meta->primary_key_columns([ 'cp_id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->columns(
id => { type => 'serial', not_null => 1 },
- name => { type => 'text', not_null => 1 },
- type => { type => 'varchar', length => 20, not_null => 1 },
is_default => { type => 'boolean', default => 'false' },
login => { type => 'text' },
+ name => { type => 'text', not_null => 1 },
+ type => { type => 'varchar', length => 20, not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('csv_import_profile_settings');
__PACKAGE__->meta->columns(
- id => { type => 'serial', not_null => 1 },
csv_import_profile_id => { type => 'integer', not_null => 1 },
+ id => { type => 'serial', not_null => 1 },
key => { type => 'text', not_null => 1 },
value => { type => 'text' },
);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('csv_import_reports');
__PACKAGE__->meta->columns(
+ file => { type => 'text', not_null => 1 },
id => { type => 'serial', not_null => 1 },
- session_id => { type => 'text', not_null => 1 },
+ numrows => { type => 'integer', not_null => 1 },
profile_id => { type => 'integer', not_null => 1 },
+ session_id => { type => 'text', not_null => 1 },
type => { type => 'text', not_null => 1 },
- file => { type => 'text', not_null => 1 },
- numrows => { type => 'integer', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('csv_import_report_rows');
__PACKAGE__->meta->columns(
- id => { type => 'serial', not_null => 1 },
- csv_import_report_id => { type => 'integer', not_null => 1 },
col => { type => 'integer', not_null => 1 },
+ csv_import_report_id => { type => 'integer', not_null => 1 },
+ id => { type => 'serial', not_null => 1 },
row => { type => 'integer', not_null => 1 },
value => { type => 'text' },
);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('csv_import_report_status');
__PACKAGE__->meta->columns(
- id => { type => 'serial', not_null => 1 },
csv_import_report_id => { type => 'integer', not_null => 1 },
+ id => { type => 'serial', not_null => 1 },
row => { type => 'integer', not_null => 1 },
type => { type => 'text', not_null => 1 },
value => { type => 'text' },
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->unique_keys([ 'name' ]);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('custom_variables');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'custom_variables_id' },
- config_id => { type => 'integer', not_null => 1 },
- trans_id => { type => 'integer', not_null => 1 },
bool_value => { type => 'boolean' },
- timestamp_value => { type => 'timestamp' },
- text_value => { type => 'text' },
- number_value => { type => 'numeric', precision => 5, scale => 25 },
+ config_id => { type => 'integer', not_null => 1 },
+ id => { type => 'integer', not_null => 1, sequence => 'custom_variables_id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
+ number_value => { type => 'numeric', precision => 5, scale => 25 },
sub_module => { type => 'text', default => '', not_null => 1 },
+ text_value => { type => 'text' },
+ timestamp_value => { type => 'timestamp' },
+ trans_id => { type => 'integer', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('custom_variable_configs');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'custom_variable_configs_id' },
- name => { type => 'text', not_null => 1 },
- description => { type => 'text', not_null => 1 },
- type => { type => 'text', not_null => 1 },
- module => { type => 'text', not_null => 1 },
default_value => { type => 'text' },
- options => { type => 'text' },
- searchable => { type => 'boolean', not_null => 1 },
+ description => { type => 'text', not_null => 1 },
+ flags => { type => 'text' },
+ id => { type => 'integer', not_null => 1, sequence => 'custom_variable_configs_id' },
includeable => { type => 'boolean', not_null => 1 },
included_by_default => { type => 'boolean', not_null => 1 },
- sortkey => { type => 'integer', not_null => 1 },
itime => { type => 'timestamp', default => 'now()' },
+ module => { type => 'text', not_null => 1 },
mtime => { type => 'timestamp' },
- flags => { type => 'text' },
+ name => { type => 'text', not_null => 1 },
+ options => { type => 'text' },
+ searchable => { type => 'boolean', not_null => 1 },
+ sortkey => { type => 'integer', not_null => 1 },
+ type => { type => 'text', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('custom_variables_validity');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
config_id => { type => 'integer', not_null => 1 },
- trans_id => { type => 'integer', not_null => 1 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
+ trans_id => { type => 'integer', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('customer');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- name => { type => 'text', not_null => 1 },
- department_1 => { type => 'varchar', length => 75 },
- department_2 => { type => 'varchar', length => 75 },
- street => { type => 'varchar', length => 75 },
- zipcode => { type => 'varchar', length => 10 },
+ account_number => { type => 'text' },
+ bank => { type => 'text' },
+ bank_code => { type => 'text' },
+ bcc => { type => 'text' },
+ bic => { type => 'varchar', length => 100 },
+ business_id => { type => 'integer' },
+ c_vendor_id => { type => 'text' },
+ cc => { type => 'text' },
city => { type => 'varchar', length => 75 },
- country => { type => 'varchar', length => 75 },
contact => { type => 'text' },
- phone => { type => 'text' },
- fax => { type => 'varchar', length => 30 },
- homepage => { type => 'text' },
- email => { type => 'text' },
- notes => { type => 'text' },
- discount => { type => 'float', precision => 4 },
- taxincluded => { type => 'boolean' },
+ country => { type => 'varchar', length => 75 },
creditlimit => { type => 'numeric', default => '0', precision => 5, scale => 15 },
- terms => { type => 'integer', default => '0' },
+ currency_id => { type => 'integer', not_null => 1 },
customernumber => { type => 'text' },
- cc => { type => 'text' },
- bcc => { type => 'text' },
- business_id => { type => 'integer' },
- taxnumber => { type => 'text' },
- account_number => { type => 'text' },
- bank_code => { type => 'text' },
- bank => { type => 'text' },
- language => { type => 'varchar', length => 5 },
+ department_1 => { type => 'varchar', length => 75 },
+ department_2 => { type => 'varchar', length => 75 },
+ direct_debit => { type => 'boolean', default => 'false' },
+ discount => { type => 'float', precision => 4 },
+ email => { type => 'text' },
+ fax => { type => 'varchar', length => 30 },
+ greeting => { type => 'text' },
+ homepage => { type => 'text' },
+ iban => { type => 'varchar', length => 100 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- obsolete => { type => 'boolean', default => 'false' },
- username => { type => 'varchar', length => 50 },
- user_password => { type => 'text' },
- salesman_id => { type => 'integer' },
- c_vendor_id => { type => 'text' },
klass => { type => 'integer', default => '0' },
+ language => { type => 'varchar', length => 5 },
language_id => { type => 'integer' },
+ mtime => { type => 'timestamp' },
+ name => { type => 'text', not_null => 1 },
+ notes => { type => 'text' },
+ obsolete => { type => 'boolean', default => 'false' },
payment_id => { type => 'integer' },
+ phone => { type => 'text' },
+ salesman_id => { type => 'integer' },
+ street => { type => 'varchar', length => 75 },
+ taxincluded => { type => 'boolean' },
+ taxincluded_checked => { type => 'boolean' },
+ taxnumber => { type => 'text' },
taxzone_id => { type => 'integer', default => '0', not_null => 1 },
- greeting => { type => 'text' },
+ terms => { type => 'integer', default => '0' },
+ user_password => { type => 'text' },
+ username => { type => 'varchar', length => 50 },
ustid => { type => 'text' },
- direct_debit => { type => 'boolean', default => 'false' },
- iban => { type => 'varchar', length => 100 },
- bic => { type => 'varchar', length => 100 },
- taxincluded_checked => { type => 'boolean' },
- currency_id => { type => 'integer', not_null => 1 },
+ zipcode => { type => 'varchar', length => 10 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('datev');
__PACKAGE__->meta->columns(
- beraternr => { type => 'varchar', length => 7 },
+ abrechnungsnr => { type => 'varchar', length => 6 },
beratername => { type => 'varchar', length => 9 },
- mandantennr => { type => 'varchar', length => 5 },
- dfvkz => { type => 'varchar', length => 2 },
+ beraternr => { type => 'varchar', length => 7 },
datentraegernr => { type => 'varchar', length => 3 },
- abrechnungsnr => { type => 'varchar', length => 6 },
+ dfvkz => { type => 'varchar', length => 2 },
+ id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => 'now()' },
+ mandantennr => { type => 'varchar', length => 5 },
mtime => { type => 'timestamp' },
- id => { type => 'serial', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('defaults');
__PACKAGE__->meta->columns(
- inventory_accno_id => { type => 'integer' },
- income_accno_id => { type => 'integer' },
- expense_accno_id => { type => 'integer' },
- fxgain_accno_id => { type => 'integer' },
- fxloss_accno_id => { type => 'integer' },
- invnumber => { type => 'text' },
- sonumber => { type => 'text' },
- weightunit => { type => 'varchar', length => 5 },
+ accounting_method => { type => 'text' },
+ address => { type => 'text' },
+ ap_changeable => { type => 'integer', default => 2, not_null => 1 },
+ ap_show_mark_as_paid => { type => 'boolean', default => 'true' },
+ ar_changeable => { type => 'integer', default => 2, not_null => 1 },
+ ar_paid_accno_id => { type => 'integer' },
+ ar_show_mark_as_paid => { type => 'boolean', default => 'true' },
+ articlenumber => { type => 'text' },
+ assemblynumber => { type => 'text' },
+ audittrail => { type => 'boolean', default => 'false' },
+ bin_id => { type => 'integer' },
+ bin_id_ignore_onhand => { type => 'integer' },
businessnumber => { type => 'text' },
- version => { type => 'varchar', length => 8 },
closedto => { type => 'date' },
- revtrans => { type => 'boolean', default => 'false' },
- ponumber => { type => 'text' },
- sqnumber => { type => 'text' },
- rfqnumber => { type => 'text' },
- customernumber => { type => 'text' },
- vendornumber => { type => 'text' },
- audittrail => { type => 'boolean', default => 'false' },
- articlenumber => { type => 'text' },
- servicenumber => { type => 'text' },
- coa => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- rmanumber => { type => 'text' },
cnnumber => { type => 'text' },
- accounting_method => { type => 'text' },
- inventory_system => { type => 'text' },
- profit_determination => { type => 'text' },
+ co_ustid => { type => 'text' },
+ coa => { type => 'text' },
+ company => { type => 'text' },
+ currency_id => { type => 'integer', not_null => 1 },
+ customernumber => { type => 'text' },
+ datev_check_on_ap_transaction => { type => 'boolean', default => 'true' },
+ datev_check_on_ar_transaction => { type => 'boolean', default => 'true' },
+ datev_check_on_gl_transaction => { type => 'boolean', default => 'true' },
+ datev_check_on_purchase_invoice => { type => 'boolean', default => 'true' },
+ datev_check_on_sales_invoice => { type => 'boolean', default => 'true' },
+ dunning_ar => { type => 'integer' },
dunning_ar_amount_fee => { type => 'integer' },
dunning_ar_amount_interest => { type => 'integer' },
- dunning_ar => { type => 'integer' },
- pdonumber => { type => 'text' },
- sdonumber => { type => 'text' },
- ar_paid_accno_id => { type => 'integer' },
+ duns => { type => 'text' },
+ expense_accno_id => { type => 'integer' },
+ fxgain_accno_id => { type => 'integer' },
+ fxloss_accno_id => { type => 'integer' },
+ gl_changeable => { type => 'integer', default => 2, not_null => 1 },
id => { type => 'serial', not_null => 1 },
+ income_accno_id => { type => 'integer' },
+ inventory_accno_id => { type => 'integer' },
+ inventory_system => { type => 'text' },
+ invnumber => { type => 'text' },
+ ir_changeable => { type => 'integer', default => 2, not_null => 1 },
+ ir_show_mark_as_paid => { type => 'boolean', default => 'true' },
+ is_changeable => { type => 'integer', default => 2, not_null => 1 },
+ is_show_mark_as_paid => { type => 'boolean', default => 'true' },
+ itime => { type => 'timestamp', default => 'now()' },
language_id => { type => 'integer' },
- datev_check_on_sales_invoice => { type => 'boolean', default => 'true' },
- datev_check_on_purchase_invoice => { type => 'boolean', default => 'true' },
- datev_check_on_ar_transaction => { type => 'boolean', default => 'true' },
- datev_check_on_ap_transaction => { type => 'boolean', default => 'true' },
- datev_check_on_gl_transaction => { type => 'boolean', default => 'true' },
+ max_future_booking_interval => { type => 'integer', default => 360 },
+ mtime => { type => 'timestamp' },
+ parts_image_css => { type => 'text', default => 'border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px;' },
+ parts_listing_image => { type => 'boolean', default => 'true' },
+ parts_show_image => { type => 'boolean', default => 'true' },
payments_changeable => { type => 'integer', default => '0', not_null => 1 },
- is_changeable => { type => 'integer', default => 2, not_null => 1 },
- ir_changeable => { type => 'integer', default => 2, not_null => 1 },
- ar_changeable => { type => 'integer', default => 2, not_null => 1 },
- ap_changeable => { type => 'integer', default => 2, not_null => 1 },
- gl_changeable => { type => 'integer', default => 2, not_null => 1 },
- show_bestbefore => { type => 'boolean', default => 'false' },
- sales_order_show_delete => { type => 'boolean', default => 'true' },
+ pdonumber => { type => 'text' },
+ ponumber => { type => 'text' },
+ profit_determination => { type => 'text' },
+ purchase_delivery_order_show_delete => { type => 'boolean', default => 'true' },
purchase_order_show_delete => { type => 'boolean', default => 'true' },
+ revtrans => { type => 'boolean', default => 'false' },
+ rfqnumber => { type => 'text' },
+ rmanumber => { type => 'text' },
sales_delivery_order_show_delete => { type => 'boolean', default => 'true' },
- purchase_delivery_order_show_delete => { type => 'boolean', default => 'true' },
- is_show_mark_as_paid => { type => 'boolean', default => 'true' },
- ir_show_mark_as_paid => { type => 'boolean', default => 'true' },
- ar_show_mark_as_paid => { type => 'boolean', default => 'true' },
- ap_show_mark_as_paid => { type => 'boolean', default => 'true' },
- warehouse_id => { type => 'integer' },
- bin_id => { type => 'integer' },
- max_future_booking_interval => { type => 'integer', default => 360 },
- assemblynumber => { type => 'text' },
+ sales_order_show_delete => { type => 'boolean', default => 'true' },
+ sdonumber => { type => 'text' },
+ sepa_creditor_id => { type => 'text' },
+ servicenumber => { type => 'text' },
+ show_bestbefore => { type => 'boolean', default => 'false' },
show_weight => { type => 'boolean', default => 'false', not_null => 1 },
+ sonumber => { type => 'text' },
+ sqnumber => { type => 'text' },
+ taxnumber => { type => 'text' },
+ templates => { type => 'text' },
transfer_default => { type => 'boolean', default => 'true' },
- transfer_default_use_master_default_bin => { type => 'boolean', default => 'false' },
transfer_default_ignore_onhand => { type => 'boolean', default => 'false' },
+ transfer_default_use_master_default_bin => { type => 'boolean', default => 'false' },
+ vendornumber => { type => 'text' },
+ version => { type => 'varchar', length => 8 },
+ vertreter => { type => 'boolean', default => 'false' },
+ warehouse_id => { type => 'integer' },
warehouse_id_ignore_onhand => { type => 'integer' },
- bin_id_ignore_onhand => { type => 'integer' },
- currency_id => { type => 'integer', not_null => 1 },
- company => { type => 'text' },
- address => { type => 'text' },
- taxnumber => { type => 'text' },
- co_ustid => { type => 'text' },
- duns => { type => 'text' },
- sepa_creditor_id => { type => 'text' },
- templates => { type => 'text' },
webdav => { type => 'boolean', default => 'false' },
webdav_documents => { type => 'boolean', default => 'false' },
- vertreter => { type => 'boolean', default => 'false' },
- parts_show_image => { type => 'boolean', default => 'true' },
- parts_listing_image => { type => 'boolean', default => 'true' },
- parts_image_css => { type => 'text', default => 'border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px;' },
+ weightunit => { type => 'varchar', length => 5 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('delivery_orders');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- donumber => { type => 'text', not_null => 1 },
- ordnumber => { type => 'text' },
- transdate => { type => 'date', default => 'now()' },
- vendor_id => { type => 'integer' },
- customer_id => { type => 'integer' },
- reqdate => { type => 'date' },
- shippingpoint => { type => 'text' },
- notes => { type => 'text' },
- intnotes => { type => 'text' },
- employee_id => { type => 'integer' },
closed => { type => 'boolean', default => 'false' },
- delivered => { type => 'boolean', default => 'false' },
+ cp_id => { type => 'integer' },
+ currency_id => { type => 'integer', not_null => 1 },
cusordnumber => { type => 'text' },
- oreqnumber => { type => 'text' },
+ customer_id => { type => 'integer' },
+ delivered => { type => 'boolean', default => 'false' },
department_id => { type => 'integer' },
- shipvia => { type => 'text' },
- cp_id => { type => 'integer' },
- language_id => { type => 'integer' },
- shipto_id => { type => 'integer' },
+ donumber => { type => 'text', not_null => 1 },
+ employee_id => { type => 'integer' },
globalproject_id => { type => 'integer' },
- salesman_id => { type => 'integer' },
- transaction_description => { type => 'text' },
+ 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' },
- taxzone_id => { type => 'integer' },
+ notes => { type => 'text' },
+ ordnumber => { type => 'text' },
+ oreqnumber => { type => 'text' },
+ reqdate => { type => 'date' },
+ salesman_id => { type => 'integer' },
+ shippingpoint => { type => 'text' },
+ shipto_id => { type => 'integer' },
+ shipvia => { type => 'text' },
taxincluded => { type => 'boolean' },
+ taxzone_id => { type => 'integer' },
terms => { type => 'integer' },
- currency_id => { type => 'integer', not_null => 1 },
+ transaction_description => { type => 'text' },
+ transdate => { type => 'date', default => 'now()' },
+ vendor_id => { type => 'integer' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('delivery_order_items');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'delivery_order_items_id' },
+ base_qty => { type => 'float', precision => 4 },
+ cusordnumber => { type => 'text' },
delivery_order_id => { type => 'integer', not_null => 1 },
- parts_id => { type => 'integer', not_null => 1 },
description => { type => 'text' },
- qty => { type => 'numeric', precision => 5, scale => 25 },
- sellprice => { type => 'numeric', precision => 5, scale => 15 },
discount => { type => 'float', precision => 4 },
+ id => { type => 'integer', not_null => 1, sequence => 'delivery_order_items_id' },
+ itime => { type => 'timestamp', default => 'now()' },
+ lastcost => { type => 'numeric', precision => 5, scale => 15 },
+ longdescription => { type => 'text' },
+ marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
+ mtime => { type => 'timestamp' },
+ ordnumber => { type => 'text' },
+ parts_id => { type => 'integer', not_null => 1 },
+ price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
+ price_factor_id => { type => 'integer' },
+ pricegroup_id => { type => 'integer' },
project_id => { type => 'integer' },
+ qty => { type => 'numeric', precision => 5, scale => 25 },
reqdate => { type => 'date' },
+ sellprice => { type => 'numeric', precision => 5, scale => 15 },
serialnumber => { type => 'text' },
- ordnumber => { type => 'text' },
transdate => { type => 'text' },
- cusordnumber => { type => 'text' },
unit => { type => 'varchar', length => 20 },
- base_qty => { type => 'float', precision => 4 },
- longdescription => { type => 'text' },
- lastcost => { type => 'numeric', precision => 5, scale => 15 },
- price_factor_id => { type => 'integer' },
- price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
- marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- pricegroup_id => { type => 'integer' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('delivery_order_items_stock');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- delivery_order_item_id => { type => 'integer', not_null => 1 },
- qty => { type => 'numeric', not_null => 1, precision => 5, scale => 15 },
- unit => { type => 'varchar', length => 20, not_null => 1 },
- warehouse_id => { type => 'integer', not_null => 1 },
+ bestbefore => { type => 'date' },
bin_id => { type => 'integer', not_null => 1 },
chargenumber => { type => 'text' },
+ delivery_order_item_id => { type => 'integer', not_null => 1 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
- bestbefore => { type => 'date' },
+ qty => { type => 'numeric', not_null => 1, precision => 5, scale => 15 },
+ unit => { type => 'varchar', length => 20, not_null => 1 },
+ warehouse_id => { type => 'integer', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('department');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
description => { type => 'text' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('drafts');
__PACKAGE__->meta->columns(
+ description => { type => 'text' },
+ employee_id => { type => 'integer' },
+ form => { type => 'text' },
id => { type => 'varchar', length => 50, not_null => 1 },
+ itime => { type => 'timestamp', default => 'now()' },
module => { type => 'varchar', length => 50, not_null => 1 },
submodule => { type => 'varchar', length => 50, not_null => 1 },
- description => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- form => { type => 'text' },
- employee_id => { type => 'integer' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('dunning');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- trans_id => { type => 'integer' },
+ duedate => { type => 'date' },
+ dunning_config_id => { type => 'integer' },
dunning_id => { type => 'integer' },
dunning_level => { type => 'integer' },
- transdate => { type => 'date' },
- duedate => { type => 'date' },
fee => { type => 'numeric', precision => 5, scale => 15 },
+ fee_interest_ar_id => { type => 'integer' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
interest => { type => 'numeric', precision => 5, scale => 15 },
- dunning_config_id => { type => 'integer' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
- fee_interest_ar_id => { type => 'integer' },
+ trans_id => { type => 'integer' },
+ transdate => { type => 'date' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('dunning_config');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- dunning_level => { type => 'integer' },
- dunning_description => { type => 'text' },
active => { type => 'boolean' },
auto => { type => 'boolean' },
+ create_invoices_for_fees => { type => 'boolean', default => 'true' },
+ dunning_description => { type => 'text' },
+ dunning_level => { type => 'integer' },
email => { type => 'boolean' },
- terms => { type => 'integer' },
- payment_terms => { type => 'integer' },
- fee => { type => 'numeric', precision => 5, scale => 15 },
- interest_rate => { type => 'numeric', precision => 5, scale => 15 },
+ email_attachment => { type => 'boolean' },
email_body => { type => 'text' },
email_subject => { type => 'text' },
- email_attachment => { type => 'boolean' },
+ fee => { type => 'numeric', precision => 5, scale => 15 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ interest_rate => { type => 'numeric', precision => 5, scale => 15 },
+ payment_terms => { type => 'integer' },
template => { type => 'text' },
- create_invoices_for_fees => { type => 'boolean', default => 'true' },
+ terms => { type => 'integer' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('employee');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- login => { type => 'text' },
- startdate => { type => 'date', default => 'now' },
- enddate => { type => 'date' },
- notes => { type => 'text' },
- sales => { type => 'boolean', default => 'true' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- name => { type => 'text' },
addr1 => { type => 'text' },
addr2 => { type => 'text' },
addr3 => { type => 'text' },
addr4 => { type => 'text' },
+ deleted => { type => 'boolean', default => 'false' },
+ enddate => { type => 'date' },
homephone => { type => 'text' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ itime => { type => 'timestamp', default => 'now()' },
+ login => { type => 'text' },
+ mtime => { type => 'timestamp' },
+ name => { type => 'text' },
+ notes => { type => 'text' },
+ sales => { type => 'boolean', default => 'true' },
+ startdate => { type => 'date', default => 'now' },
workphone => { type => 'text' },
- deleted => { type => 'boolean', default => 'false' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('exchangerate');
__PACKAGE__->meta->columns(
- transdate => { type => 'date' },
buy => { type => 'numeric', precision => 5, scale => 15 },
- sell => { type => 'numeric', precision => 5, scale => 15 },
+ currency_id => { type => 'integer', not_null => 1 },
+ id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
- id => { type => 'serial', not_null => 1 },
- currency_id => { type => 'integer', not_null => 1 },
+ sell => { type => 'numeric', precision => 5, scale => 15 },
+ transdate => { type => 'date' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('finanzamt');
__PACKAGE__->meta->columns(
- fa_land_nr => { type => 'text' },
+ fa_bankbezeichnung_1 => { type => 'text' },
+ fa_bankbezeichnung_2 => { type => 'text' },
+ fa_blz_1 => { type => 'text' },
+ fa_blz_2 => { type => 'text' },
fa_bufa_nr => { type => 'text' },
+ fa_email => { type => 'text' },
+ fa_fax => { type => 'text' },
+ fa_internet => { type => 'text' },
+ fa_kontonummer_1 => { type => 'text' },
+ fa_kontonummer_2 => { type => 'text' },
+ fa_land_nr => { type => 'text' },
fa_name => { type => 'text' },
- fa_strasse => { type => 'text' },
- fa_plz => { type => 'text' },
+ fa_oeffnungszeiten => { type => 'text' },
fa_ort => { type => 'text' },
- fa_telefon => { type => 'text' },
- fa_fax => { type => 'text' },
+ fa_plz => { type => 'text' },
fa_plz_grosskunden => { type => 'text' },
fa_plz_postfach => { type => 'text' },
fa_postfach => { type => 'text' },
- fa_blz_1 => { type => 'text' },
- fa_kontonummer_1 => { type => 'text' },
- fa_bankbezeichnung_1 => { type => 'text' },
- fa_blz_2 => { type => 'text' },
- fa_kontonummer_2 => { type => 'text' },
- fa_bankbezeichnung_2 => { type => 'text' },
- fa_oeffnungszeiten => { type => 'text' },
- fa_email => { type => 'text' },
- fa_internet => { type => 'text' },
+ fa_strasse => { type => 'text' },
+ fa_telefon => { type => 'text' },
id => { type => 'serial', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('follow_ups');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'follow_up_id' },
- follow_up_date => { type => 'date', not_null => 1 },
+ created_by => { type => 'integer', not_null => 1 },
created_for_user => { type => 'integer', not_null => 1 },
done => { type => 'boolean', default => 'false' },
- note_id => { type => 'integer', not_null => 1 },
- created_by => { type => 'integer', not_null => 1 },
+ follow_up_date => { type => 'date', not_null => 1 },
+ id => { type => 'integer', not_null => 1, sequence => 'follow_up_id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
+ note_id => { type => 'integer', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->foreign_keys(
employee => {
class => 'SL::DB::Employee',
- key_columns => { created_for_user => 'id' },
+ key_columns => { created_by => 'id' },
},
employee_obj => {
class => 'SL::DB::Employee',
- key_columns => { created_by => 'id' },
+ key_columns => { created_for_user => 'id' },
},
note => {
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('follow_up_access');
__PACKAGE__->meta->columns(
- who => { type => 'integer', not_null => 1 },
- what => { type => 'integer', not_null => 1 },
id => { type => 'serial', not_null => 1 },
+ what => { type => 'integer', not_null => 1 },
+ who => { type => 'integer', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->foreign_keys(
employee => {
class => 'SL::DB::Employee',
- key_columns => { who => 'id' },
+ key_columns => { what => 'id' },
},
employee_obj => {
class => 'SL::DB::Employee',
- key_columns => { what => 'id' },
+ key_columns => { who => 'id' },
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('follow_up_links');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'follow_up_link_id' },
follow_up_id => { type => 'integer', not_null => 1 },
- trans_id => { type => 'integer', not_null => 1 },
- trans_type => { type => 'text', not_null => 1 },
- trans_info => { type => 'text' },
+ id => { type => 'integer', not_null => 1, sequence => 'follow_up_link_id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
+ trans_id => { type => 'integer', not_null => 1 },
+ trans_info => { type => 'text' },
+ trans_type => { type => 'text', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('gl');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'glid' },
- reference => { type => 'text' },
+ cb_transaction => { type => 'boolean' },
+ department_id => { type => 'integer' },
description => { type => 'text' },
- transdate => { type => 'date', default => 'now' },
- gldate => { type => 'date', default => 'now' },
employee_id => { type => 'integer' },
- notes => { type => 'text' },
- department_id => { type => 'integer' },
- taxincluded => { type => 'boolean' },
+ gldate => { type => 'date', default => 'now' },
+ id => { type => 'integer', not_null => 1, sequence => 'glid' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
- type => { type => 'text' },
+ notes => { type => 'text' },
+ ob_transaction => { type => 'boolean' },
+ reference => { type => 'text' },
storno => { type => 'boolean', default => 'false' },
storno_id => { type => 'integer' },
- ob_transaction => { type => 'boolean' },
- cb_transaction => { type => 'boolean' },
+ taxincluded => { type => 'boolean' },
+ transdate => { type => 'date', default => 'now' },
+ type => { type => 'text' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->columns(
id => { type => 'serial', not_null => 1 },
language_id => { type => 'integer' },
- translation_type => { type => 'varchar', length => 100, not_null => 1 },
- translation_id => { type => 'integer' },
translation => { type => 'text' },
+ translation_id => { type => 'integer' },
+ translation_type => { type => 'varchar', length => 100, not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('history_erp');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- trans_id => { type => 'integer' },
- employee_id => { type => 'integer' },
addition => { type => 'text' },
- what_done => { type => 'text' },
+ employee_id => { type => 'integer' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
snumbers => { type => 'text' },
+ trans_id => { type => 'integer' },
+ what_done => { type => 'text' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('inventory');
__PACKAGE__->meta->columns(
- warehouse_id => { type => 'integer', not_null => 1 },
- parts_id => { type => 'integer', not_null => 1 },
- oe_id => { type => 'integer' },
- orderitems_id => { type => 'integer' },
- shippingdate => { type => 'date' },
+ bestbefore => { type => 'date' },
+ bin_id => { type => 'integer', not_null => 1 },
+ chargenumber => { type => 'text', default => '', not_null => 1 },
+ comment => { type => 'text' },
employee_id => { type => 'integer', not_null => 1 },
+ id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
- bin_id => { type => 'integer', not_null => 1 },
+ oe_id => { type => 'integer' },
+ orderitems_id => { type => 'integer' },
+ parts_id => { type => 'integer', not_null => 1 },
+ project_id => { type => 'integer' },
qty => { type => 'numeric', precision => 5, scale => 25 },
+ shippingdate => { type => 'date' },
trans_id => { type => 'integer', not_null => 1 },
trans_type_id => { type => 'integer', not_null => 1 },
- project_id => { type => 'integer' },
- chargenumber => { type => 'text', default => '', not_null => 1 },
- comment => { type => 'text' },
- bestbefore => { type => 'date' },
- id => { type => 'serial', not_null => 1 },
+ warehouse_id => { type => 'integer', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('ar');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'glid' },
- invnumber => { type => 'text', not_null => 1 },
- transdate => { type => 'date', default => 'now' },
- gldate => { type => 'date', default => 'now' },
- customer_id => { type => 'integer' },
- taxincluded => { type => 'boolean' },
amount => { type => 'numeric', precision => 5, scale => 15 },
- netamount => { type => 'numeric', precision => 5, scale => 15 },
- paid => { type => 'numeric', precision => 5, scale => 15 },
+ cp_id => { type => 'integer' },
+ currency_id => { type => 'integer', not_null => 1 },
+ cusordnumber => { type => 'text' },
+ customer_id => { type => 'integer' },
datepaid => { type => 'date' },
- duedate => { type => 'date' },
+ delivery_customer_id => { type => 'integer' },
+ delivery_vendor_id => { type => 'integer' },
deliverydate => { type => 'date' },
- invoice => { type => 'boolean', default => 'false' },
- shippingpoint => { type => 'text' },
- terms => { type => 'integer', default => '0' },
- notes => { type => 'text' },
- ordnumber => { type => 'text' },
+ department_id => { type => 'integer' },
+ direct_debit => { type => 'boolean', default => 'false' },
+ donumber => { type => 'text' },
+ duedate => { type => 'date' },
+ dunning_config_id => { type => 'integer' },
employee_id => { type => 'integer' },
- quonumber => { type => 'text' },
- cusordnumber => { type => 'text' },
+ gldate => { type => 'date', default => 'now' },
+ globalproject_id => { type => 'integer' },
+ id => { type => 'integer', not_null => 1, sequence => 'glid' },
intnotes => { type => 'text' },
- department_id => { type => 'integer' },
- shipvia => { type => 'text' },
+ invnumber => { type => 'text', not_null => 1 },
+ invnumber_for_credit_note => { type => 'text' },
+ invoice => { type => 'boolean', default => 'false' },
itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- cp_id => { type => 'integer' },
language_id => { type => 'integer' },
- payment_id => { type => 'integer' },
- delivery_customer_id => { type => 'integer' },
- delivery_vendor_id => { type => 'integer' },
- storno => { type => 'boolean', default => 'false' },
- taxzone_id => { type => 'integer' },
- shipto_id => { type => 'integer' },
- type => { type => 'text' },
- dunning_config_id => { type => 'integer' },
+ marge_percent => { type => 'numeric', precision => 5, scale => 15 },
+ marge_total => { type => 'numeric', precision => 5, scale => 15 },
+ mtime => { type => 'timestamp' },
+ netamount => { type => 'numeric', precision => 5, scale => 15 },
+ notes => { type => 'text' },
orddate => { type => 'date' },
+ ordnumber => { type => 'text' },
+ paid => { type => 'numeric', precision => 5, scale => 15 },
+ payment_id => { type => 'integer' },
quodate => { type => 'date' },
- globalproject_id => { type => 'integer' },
+ quonumber => { type => 'text' },
salesman_id => { type => 'integer' },
- transaction_description => { type => 'text' },
+ shippingpoint => { type => 'text' },
+ shipto_id => { type => 'integer' },
+ shipvia => { type => 'text' },
+ storno => { type => 'boolean', default => 'false' },
storno_id => { type => 'integer' },
- marge_total => { type => 'numeric', precision => 5, scale => 15 },
- marge_percent => { type => 'numeric', precision => 5, scale => 15 },
- donumber => { type => 'text' },
- invnumber_for_credit_note => { type => 'text' },
- direct_debit => { type => 'boolean', default => 'false' },
- currency_id => { type => 'integer', not_null => 1 },
+ taxincluded => { type => 'boolean' },
+ taxzone_id => { type => 'integer' },
+ terms => { type => 'integer', default => '0' },
+ transaction_description => { type => 'text' },
+ transdate => { type => 'date', default => 'now' },
+ type => { type => 'text' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('invoice');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'invoiceid' },
- trans_id => { type => 'integer' },
- parts_id => { type => 'integer' },
- description => { type => 'text' },
- qty => { type => 'float', precision => 4 },
allocated => { type => 'float', precision => 4 },
- sellprice => { type => 'numeric', precision => 5, scale => 15 },
- fxsellprice => { type => 'numeric', precision => 5, scale => 15 },
- discount => { type => 'float', precision => 4 },
assemblyitem => { type => 'boolean', default => 'false' },
- project_id => { type => 'integer' },
+ base_qty => { type => 'float', precision => 4 },
+ cusordnumber => { type => 'text' },
deliverydate => { type => 'date' },
- serialnumber => { type => 'text' },
+ description => { type => 'text' },
+ discount => { type => 'float', precision => 4 },
+ fxsellprice => { type => 'numeric', precision => 5, scale => 15 },
+ id => { type => 'integer', not_null => 1, sequence => 'invoiceid' },
itime => { type => 'timestamp', default => 'now()' },
+ lastcost => { type => 'numeric', precision => 5, scale => 15 },
+ longdescription => { type => 'text' },
+ marge_percent => { type => 'numeric', precision => 5, scale => 15 },
+ marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
+ marge_total => { type => 'numeric', precision => 5, scale => 15 },
mtime => { type => 'timestamp' },
- pricegroup_id => { type => 'integer' },
ordnumber => { type => 'text' },
+ parts_id => { type => 'integer' },
+ price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
+ price_factor_id => { type => 'integer' },
+ pricegroup_id => { type => 'integer' },
+ project_id => { type => 'integer' },
+ qty => { type => 'float', precision => 4 },
+ sellprice => { type => 'numeric', precision => 5, scale => 15 },
+ serialnumber => { type => 'text' },
+ subtotal => { type => 'boolean', default => 'false' },
+ trans_id => { type => 'integer' },
transdate => { type => 'text' },
- cusordnumber => { type => 'text' },
unit => { type => 'varchar', length => 20 },
- base_qty => { type => 'float', precision => 4 },
- subtotal => { type => 'boolean', default => 'false' },
- longdescription => { type => 'text' },
- marge_total => { type => 'numeric', precision => 5, scale => 15 },
- marge_percent => { type => 'numeric', precision => 5, scale => 15 },
- lastcost => { type => 'numeric', precision => 5, scale => 15 },
- price_factor_id => { type => 'integer' },
- price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
- marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('language');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- description => { type => 'text' },
- template_code => { type => 'text' },
article_code => { type => 'text' },
+ description => { type => 'text' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
- output_numberformat => { type => 'text' },
output_dateformat => { type => 'text' },
output_longdates => { type => 'boolean' },
+ output_numberformat => { type => 'text' },
+ template_code => { type => 'text' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('makemodel');
__PACKAGE__->meta->columns(
- parts_id => { type => 'integer' },
- model => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- make => { type => 'integer' },
id => { type => 'serial', not_null => 1 },
+ itime => { type => 'timestamp', default => 'now()' },
lastcost => { type => 'numeric', precision => 5, scale => 15 },
lastupdate => { type => 'date' },
+ make => { type => 'integer' },
+ model => { type => 'text' },
+ mtime => { type => 'timestamp' },
+ parts_id => { type => 'integer' },
sortorder => { type => 'integer' },
);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('notes');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'note_id' },
- subject => { type => 'text' },
body => { type => 'text' },
created_by => { type => 'integer', not_null => 1 },
- trans_id => { type => 'integer' },
- trans_module => { type => 'varchar', length => 10 },
+ id => { type => 'integer', not_null => 1, sequence => 'note_id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
+ subject => { type => 'text' },
+ trans_id => { type => 'integer' },
+ trans_module => { type => 'varchar', length => 10 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('oe');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- ordnumber => { type => 'text', not_null => 1 },
- transdate => { type => 'date', default => 'now' },
- vendor_id => { type => 'integer' },
- customer_id => { type => 'integer' },
amount => { type => 'numeric', precision => 5, scale => 15 },
- netamount => { type => 'numeric', precision => 5, scale => 15 },
- reqdate => { type => 'date' },
- taxincluded => { type => 'boolean' },
- shippingpoint => { type => 'text' },
- notes => { type => 'text' },
- employee_id => { type => 'integer' },
closed => { type => 'boolean', default => 'false' },
- quotation => { type => 'boolean', default => 'false' },
- quonumber => { type => 'text' },
+ cp_id => { type => 'integer' },
+ currency_id => { type => 'integer', not_null => 1 },
cusordnumber => { type => 'text' },
- intnotes => { type => 'text' },
+ customer_id => { type => 'integer' },
+ delivered => { type => 'boolean', default => 'false' },
+ delivery_customer_id => { type => 'integer' },
+ delivery_vendor_id => { type => 'integer' },
department_id => { type => 'integer' },
+ employee_id => { type => 'integer' },
+ globalproject_id => { type => 'integer' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ intnotes => { type => 'text' },
itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- shipvia => { type => 'text' },
- cp_id => { type => 'integer' },
language_id => { type => 'integer' },
+ marge_percent => { type => 'numeric', precision => 5, scale => 15 },
+ marge_total => { type => 'numeric', precision => 5, scale => 15 },
+ mtime => { type => 'timestamp' },
+ netamount => { type => 'numeric', precision => 5, scale => 15 },
+ notes => { type => 'text' },
+ ordnumber => { type => 'text', not_null => 1 },
payment_id => { type => 'integer' },
- delivery_customer_id => { type => 'integer' },
- delivery_vendor_id => { type => 'integer' },
- taxzone_id => { type => 'integer' },
proforma => { type => 'boolean', default => 'false' },
- shipto_id => { type => 'integer' },
- delivered => { type => 'boolean', default => 'false' },
- globalproject_id => { type => 'integer' },
+ quonumber => { type => 'text' },
+ quotation => { type => 'boolean', default => 'false' },
+ reqdate => { type => 'date' },
salesman_id => { type => 'integer' },
+ shippingpoint => { type => 'text' },
+ shipto_id => { type => 'integer' },
+ shipvia => { type => 'text' },
+ taxincluded => { type => 'boolean' },
+ taxzone_id => { type => 'integer' },
transaction_description => { type => 'text' },
- marge_total => { type => 'numeric', precision => 5, scale => 15 },
- marge_percent => { type => 'numeric', precision => 5, scale => 15 },
- currency_id => { type => 'integer', not_null => 1 },
+ transdate => { type => 'date', default => 'now' },
+ vendor_id => { type => 'integer' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('orderitems');
__PACKAGE__->meta->columns(
- trans_id => { type => 'integer' },
- parts_id => { type => 'integer' },
+ base_qty => { type => 'float', precision => 4 },
+ cusordnumber => { type => 'text' },
description => { type => 'text' },
- qty => { type => 'float', precision => 4 },
- sellprice => { type => 'numeric', precision => 5, scale => 15 },
discount => { type => 'float', precision => 4 },
- project_id => { type => 'integer' },
- reqdate => { type => 'date' },
- ship => { type => 'float', precision => 4 },
- serialnumber => { type => 'text' },
id => { type => 'integer', not_null => 1, sequence => 'orderitemsid' },
itime => { type => 'timestamp', default => 'now()' },
+ lastcost => { type => 'numeric', precision => 5, scale => 15 },
+ longdescription => { type => 'text' },
+ marge_percent => { type => 'numeric', precision => 5, scale => 15 },
+ marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
+ marge_total => { type => 'numeric', precision => 5, scale => 15 },
mtime => { type => 'timestamp' },
- pricegroup_id => { type => 'integer' },
ordnumber => { type => 'text' },
+ parts_id => { type => 'integer' },
+ price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
+ price_factor_id => { type => 'integer' },
+ pricegroup_id => { type => 'integer' },
+ project_id => { type => 'integer' },
+ qty => { type => 'float', precision => 4 },
+ reqdate => { type => 'date' },
+ sellprice => { type => 'numeric', precision => 5, scale => 15 },
+ serialnumber => { type => 'text' },
+ ship => { type => 'float', precision => 4 },
+ subtotal => { type => 'boolean', default => 'false' },
+ trans_id => { type => 'integer' },
transdate => { type => 'text' },
- cusordnumber => { type => 'text' },
unit => { type => 'varchar', length => 20 },
- base_qty => { type => 'float', precision => 4 },
- subtotal => { type => 'boolean', default => 'false' },
- longdescription => { type => 'text' },
- marge_total => { type => 'numeric', precision => 5, scale => 15 },
- marge_percent => { type => 'numeric', precision => 5, scale => 15 },
- lastcost => { type => 'numeric', precision => 5, scale => 15 },
- price_factor_id => { type => 'integer' },
- price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
- marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
__PACKAGE__->meta->foreign_keys(
+ order => {
+ class => 'SL::DB::Order',
+ key_columns => { trans_id => 'id' },
+ },
+
part => {
class => 'SL::DB::Part',
key_columns => { parts_id => 'id' },
class => 'SL::DB::Project',
key_columns => { project_id => 'id' },
},
-
- order => {
- class => 'SL::DB::Order',
- key_columns => { trans_id => 'id' },
- },
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('parts');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- partnumber => { type => 'text', not_null => 1 },
- description => { type => 'text' },
- listprice => { type => 'numeric', precision => 5, scale => 15 },
- sellprice => { type => 'numeric', precision => 5, scale => 15 },
- lastcost => { type => 'numeric', precision => 5, scale => 15 },
- priceupdate => { type => 'date', default => 'now' },
- weight => { type => 'float', precision => 4 },
- notes => { type => 'text' },
- makemodel => { type => 'boolean', default => 'false' },
- assembly => { type => 'boolean', default => 'false' },
alternate => { type => 'boolean', default => 'false' },
- rop => { type => 'float', precision => 4 },
- inventory_accno_id => { type => 'integer' },
- income_accno_id => { type => 'integer' },
- expense_accno_id => { type => 'integer' },
- shop => { type => 'boolean', default => 'false' },
- obsolete => { type => 'boolean', default => 'false' },
+ assembly => { type => 'boolean', default => 'false' },
+ bin_id => { type => 'integer' },
bom => { type => 'boolean', default => 'false' },
- image => { type => 'text' },
+ buchungsgruppen_id => { type => 'integer' },
+ description => { type => 'text' },
drawing => { type => 'text' },
- microfiche => { type => 'text' },
- partsgroup_id => { type => 'integer' },
- ve => { type => 'integer' },
+ ean => { type => 'text' },
+ expense_accno_id => { type => 'integer' },
+ formel => { type => 'text' },
gv => { type => 'numeric', precision => 5, scale => 15 },
+ has_sernumber => { type => 'boolean', default => 'false' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ image => { type => 'text' },
+ income_accno_id => { type => 'integer' },
+ inventory_accno_id => { type => 'integer' },
itime => { type => 'timestamp', default => 'now()' },
+ lastcost => { type => 'numeric', precision => 5, scale => 15 },
+ listprice => { type => 'numeric', precision => 5, scale => 15 },
+ makemodel => { type => 'boolean', default => 'false' },
+ microfiche => { type => 'text' },
mtime => { type => 'timestamp' },
- unit => { type => 'varchar', length => 20, not_null => 1 },
- formel => { type => 'text' },
not_discountable => { type => 'boolean', default => 'false' },
- buchungsgruppen_id => { type => 'integer' },
+ notes => { type => 'text' },
+ obsolete => { type => 'boolean', default => 'false' },
+ onhand => { type => 'numeric', default => '0', precision => 5, scale => 25 },
+ partnumber => { type => 'text', not_null => 1 },
+ partsgroup_id => { type => 'integer' },
payment_id => { type => 'integer' },
- ean => { type => 'text' },
price_factor_id => { type => 'integer' },
- onhand => { type => 'numeric', default => '0', precision => 5, scale => 25 },
+ priceupdate => { type => 'date', default => 'now' },
+ rop => { type => 'float', precision => 4 },
+ sellprice => { type => 'numeric', precision => 5, scale => 15 },
+ shop => { type => 'boolean', default => 'false' },
stockable => { type => 'boolean', default => 'false' },
- has_sernumber => { type => 'boolean', default => 'false' },
+ unit => { type => 'varchar', length => 20, not_null => 1 },
+ ve => { type => 'integer' },
warehouse_id => { type => 'integer' },
- bin_id => { type => 'integer' },
+ weight => { type => 'float', precision => 4 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->columns(
id => { type => 'integer', not_null => 1, sequence => 'id' },
- partsgroup => { type => 'text' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
+ partsgroup => { type => 'text' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('payment_terms');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
description => { type => 'text' },
description_long => { type => 'text' },
- terms_netto => { type => 'integer' },
- terms_skonto => { type => 'integer' },
- percent_skonto => { type => 'float', precision => 4 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
+ percent_skonto => { type => 'float', precision => 4 },
ranking => { type => 'integer' },
sortkey => { type => 'integer', not_null => 1 },
+ terms_netto => { type => 'integer' },
+ terms_skonto => { type => 'integer' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('periodic_invoices');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- config_id => { type => 'integer', not_null => 1 },
ar_id => { type => 'integer', not_null => 1 },
- period_start_date => { type => 'date', not_null => 1 },
+ config_id => { type => 'integer', not_null => 1 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
+ period_start_date => { type => 'date', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('periodic_invoices_configs');
__PACKAGE__->meta->columns(
+ active => { type => 'boolean', default => 'true' },
+ ar_chart_id => { type => 'integer', not_null => 1 },
+ copies => { type => 'integer' },
+ end_date => { type => 'date' },
+ extend_automatically_by => { type => 'integer' },
id => { type => 'integer', not_null => 1, sequence => 'id' },
oe_id => { type => 'integer', not_null => 1 },
periodicity => { type => 'varchar', length => 10, not_null => 1 },
print => { type => 'boolean', default => 'false' },
printer_id => { type => 'integer' },
- copies => { type => 'integer' },
- active => { type => 'boolean', default => 'true' },
- terminated => { type => 'boolean', default => 'false' },
start_date => { type => 'date' },
- end_date => { type => 'date' },
- ar_chart_id => { type => 'integer', not_null => 1 },
- extend_automatically_by => { type => 'integer' },
+ terminated => { type => 'boolean', default => 'false' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('prices');
__PACKAGE__->meta->columns(
+ id => { type => 'serial', not_null => 1 },
parts_id => { type => 'integer' },
- pricegroup_id => { type => 'integer' },
price => { type => 'numeric', precision => 5, scale => 15 },
- id => { type => 'serial', not_null => 1 },
+ pricegroup_id => { type => 'integer' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('price_factors');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
description => { type => 'text' },
factor => { type => 'numeric', precision => 5, scale => 15 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
sortkey => { type => 'integer' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->columns(
id => { type => 'integer', not_null => 1, sequence => 'id' },
- printer_description => { type => 'text', not_null => 1 },
printer_command => { type => 'text' },
+ printer_description => { type => 'text', not_null => 1 },
template_code => { type => 'text' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('project');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- projectnumber => { type => 'text' },
+ active => { type => 'boolean', default => 'true' },
+ customer_id => { type => 'integer' },
description => { type => 'text' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
- active => { type => 'boolean', default => 'true' },
- customer_id => { type => 'integer' },
+ projectnumber => { type => 'text' },
type => { type => 'text' },
valid => { type => 'boolean', default => 'true' },
);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('ap');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'glid' },
- invnumber => { type => 'text', not_null => 1 },
- transdate => { type => 'date', default => 'now' },
- gldate => { type => 'date', default => 'now' },
- vendor_id => { type => 'integer' },
- taxincluded => { type => 'boolean', default => 'false' },
amount => { type => 'numeric', precision => 5, scale => 15 },
- netamount => { type => 'numeric', precision => 5, scale => 15 },
- paid => { type => 'numeric', precision => 5, scale => 15 },
+ cp_id => { type => 'integer' },
+ currency_id => { type => 'integer', not_null => 1 },
datepaid => { type => 'date' },
+ deliverydate => { type => 'date' },
+ department_id => { type => 'integer' },
+ direct_debit => { type => 'boolean', default => 'false' },
duedate => { type => 'date' },
- invoice => { type => 'boolean', default => 'false' },
- ordnumber => { type => 'text' },
- notes => { type => 'text' },
employee_id => { type => 'integer' },
- quonumber => { type => 'text' },
+ gldate => { type => 'date', default => 'now' },
+ globalproject_id => { type => 'integer' },
+ id => { type => 'integer', not_null => 1, sequence => 'glid' },
intnotes => { type => 'text' },
- department_id => { type => 'integer' },
+ invnumber => { type => 'text', not_null => 1 },
+ invoice => { type => 'boolean', default => 'false' },
itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- shipvia => { type => 'text' },
- cp_id => { type => 'integer' },
language_id => { type => 'integer' },
+ mtime => { type => 'timestamp' },
+ netamount => { type => 'numeric', precision => 5, scale => 15 },
+ notes => { type => 'text' },
+ orddate => { type => 'date' },
+ ordnumber => { type => 'text' },
+ paid => { type => 'numeric', precision => 5, scale => 15 },
payment_id => { type => 'integer' },
+ quodate => { type => 'date' },
+ quonumber => { type => 'text' },
+ shipvia => { type => 'text' },
storno => { type => 'boolean', default => 'false' },
+ storno_id => { type => 'integer' },
+ taxincluded => { type => 'boolean', default => 'false' },
taxzone_id => { type => 'integer' },
- type => { type => 'text' },
- orddate => { type => 'date' },
- quodate => { type => 'date' },
- globalproject_id => { type => 'integer' },
transaction_description => { type => 'text' },
- storno_id => { type => 'integer' },
- direct_debit => { type => 'boolean', default => 'false' },
- deliverydate => { type => 'date' },
- currency_id => { type => 'integer', not_null => 1 },
+ transdate => { type => 'date', default => 'now' },
+ type => { type => 'text' },
+ vendor_id => { type => 'integer' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('record_links');
__PACKAGE__->meta->columns(
- from_table => { type => 'varchar', length => 50, not_null => 1 },
from_id => { type => 'integer', not_null => 1 },
- to_table => { type => 'varchar', length => 50, not_null => 1 },
- to_id => { type => 'integer', not_null => 1 },
- itime => { type => 'timestamp', default => 'now()' },
+ from_table => { type => 'varchar', length => 50, not_null => 1 },
id => { type => 'serial', not_null => 1 },
+ itime => { type => 'timestamp', default => 'now()' },
+ to_id => { type => 'integer', not_null => 1 },
+ to_table => { type => 'varchar', length => 50, not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('schema_info');
__PACKAGE__->meta->columns(
- tag => { type => 'text', not_null => 1 },
- login => { type => 'text' },
itime => { type => 'timestamp', default => 'now()' },
+ login => { type => 'text' },
+ tag => { type => 'text', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'tag' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('sepa_export');
__PACKAGE__->meta->columns(
- id => { type => 'serial', not_null => 1 },
+ closed => { type => 'boolean', default => 'false' },
employee_id => { type => 'integer', not_null => 1 },
executed => { type => 'boolean', default => 'false' },
- closed => { type => 'boolean', default => 'false' },
+ id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => 'now()' },
vc => { type => 'varchar', length => 10 },
);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('sepa_export_items');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- sepa_export_id => { type => 'integer', not_null => 1 },
+ amount => { type => 'numeric', precision => 5, scale => 25 },
ap_id => { type => 'integer' },
+ ar_id => { type => 'integer' },
chart_id => { type => 'integer', not_null => 1 },
- amount => { type => 'numeric', precision => 5, scale => 25 },
- reference => { type => 'varchar', length => 35 },
- requested_execution_date => { type => 'date' },
+ end_to_end_id => { type => 'varchar', length => 35 },
executed => { type => 'boolean', default => 'false' },
execution_date => { type => 'date' },
- our_iban => { type => 'varchar', length => 100 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
our_bic => { type => 'varchar', length => 100 },
- vc_iban => { type => 'varchar', length => 100 },
+ our_iban => { type => 'varchar', length => 100 },
+ reference => { type => 'varchar', length => 35 },
+ requested_execution_date => { type => 'date' },
+ sepa_export_id => { type => 'integer', not_null => 1 },
vc_bic => { type => 'varchar', length => 100 },
- end_to_end_id => { type => 'varchar', length => 35 },
- ar_id => { type => 'integer' },
+ vc_iban => { type => 'varchar', length => 100 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('shipto');
__PACKAGE__->meta->columns(
- trans_id => { type => 'integer' },
- shiptoname => { type => 'varchar', length => 75 },
- shiptodepartment_1 => { type => 'varchar', length => 75 },
- shiptodepartment_2 => { type => 'varchar', length => 75 },
- shiptostreet => { type => 'varchar', length => 75 },
- shiptozipcode => { type => 'varchar', length => 75 },
- shiptocity => { type => 'varchar', length => 75 },
- shiptocountry => { type => 'varchar', length => 75 },
- shiptocontact => { type => 'varchar', length => 75 },
- shiptophone => { type => 'varchar', length => 30 },
- shiptofax => { type => 'varchar', length => 30 },
- shiptoemail => { type => 'text' },
itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
module => { type => 'text' },
+ mtime => { type => 'timestamp' },
shipto_id => { type => 'integer', not_null => 1, sequence => 'id' },
+ shiptocity => { type => 'varchar', length => 75 },
+ shiptocontact => { type => 'varchar', length => 75 },
+ shiptocountry => { type => 'varchar', length => 75 },
shiptocp_gender => { type => 'text' },
+ shiptodepartment_1 => { type => 'varchar', length => 75 },
+ shiptodepartment_2 => { type => 'varchar', length => 75 },
+ shiptoemail => { type => 'text' },
+ shiptofax => { type => 'varchar', length => 30 },
+ shiptoname => { type => 'varchar', length => 75 },
+ shiptophone => { type => 'varchar', length => 30 },
+ shiptostreet => { type => 'varchar', length => 75 },
+ shiptozipcode => { type => 'varchar', length => 75 },
+ trans_id => { type => 'integer' },
);
__PACKAGE__->meta->primary_key_columns([ 'shipto_id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('status');
__PACKAGE__->meta->columns(
- trans_id => { type => 'integer' },
- formname => { type => 'text' },
- printed => { type => 'boolean', default => 'false' },
- emailed => { type => 'boolean', default => 'false' },
- spoolfile => { type => 'text' },
chart_id => { type => 'integer' },
+ emailed => { type => 'boolean', default => 'false' },
+ formname => { type => 'text' },
+ id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
- id => { type => 'serial', not_null => 1 },
+ printed => { type => 'boolean', default => 'false' },
+ spoolfile => { type => 'text' },
+ trans_id => { type => 'integer' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('tax');
__PACKAGE__->meta->columns(
+ chart_categories => { type => 'text', not_null => 1 },
chart_id => { type => 'integer' },
- rate => { type => 'numeric', default => '0', not_null => 1, precision => 5, scale => 15 },
- taxnumber => { type => 'text' },
- taxkey => { type => 'integer', not_null => 1 },
- taxdescription => { type => 'text', not_null => 1 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- chart_categories => { type => 'text', not_null => 1 },
+ rate => { type => 'numeric', default => '0', not_null => 1, precision => 5, scale => 15 },
+ taxdescription => { type => 'text', not_null => 1 },
+ taxkey => { type => 'integer', not_null => 1 },
+ taxnumber => { type => 'text' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('taxkeys');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
chart_id => { type => 'integer', not_null => 1 },
- tax_id => { type => 'integer', not_null => 1 },
- taxkey_id => { type => 'integer', not_null => 1 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
pos_ustva => { type => 'integer' },
startdate => { type => 'date', not_null => 1 },
+ tax_id => { type => 'integer', not_null => 1 },
+ taxkey_id => { type => 'integer', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('tax_zones');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1 },
description => { type => 'text' },
+ id => { type => 'integer', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->columns(
employee_id => { type => 'integer', not_null => 1 },
+ id => { type => 'serial', not_null => 1 },
show_after_login => { type => 'boolean', default => 'true' },
show_follow_ups => { type => 'boolean', default => 'true' },
show_follow_ups_login => { type => 'boolean', default => 'true' },
show_overdue_sales_quotations => { type => 'boolean', default => 'true' },
show_overdue_sales_quotations_login => { type => 'boolean', default => 'true' },
- id => { type => 'serial', not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('transfer_type');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- direction => { type => 'varchar', length => 10, not_null => 1 },
description => { type => 'text' },
- sortkey => { type => 'integer' },
+ direction => { type => 'varchar', length => 10, not_null => 1 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
+ sortkey => { type => 'integer' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('translation');
__PACKAGE__->meta->columns(
- parts_id => { type => 'integer' },
- language_id => { type => 'integer' },
- translation => { type => 'text' },
+ id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
+ language_id => { type => 'integer' },
longdescription => { type => 'text' },
- id => { type => 'serial', not_null => 1 },
+ mtime => { type => 'timestamp' },
+ parts_id => { type => 'integer' },
+ translation => { type => 'text' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('units');
__PACKAGE__->meta->columns(
- name => { type => 'varchar', length => 20, not_null => 1 },
base_unit => { type => 'varchar', length => 20 },
factor => { type => 'numeric', precision => 5, scale => 20 },
- type => { type => 'varchar', length => 20 },
- sortkey => { type => 'integer', not_null => 1 },
id => { type => 'serial', not_null => 1 },
+ name => { type => 'varchar', length => 20, not_null => 1 },
+ sortkey => { type => 'integer', not_null => 1 },
+ type => { type => 'varchar', length => 20 },
);
__PACKAGE__->meta->primary_key_columns([ 'name' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('units_language');
__PACKAGE__->meta->columns(
- unit => { type => 'varchar', length => 20, not_null => 1 },
+ id => { type => 'serial', not_null => 1 },
language_id => { type => 'integer', not_null => 1 },
localized => { type => 'varchar', length => 20 },
localized_plural => { type => 'varchar', length => 20 },
- id => { type => 'serial', not_null => 1 },
+ unit => { type => 'varchar', length => 20, not_null => 1 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('vendor');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- name => { type => 'varchar', length => 75, not_null => 1 },
- department_1 => { type => 'varchar', length => 75 },
- department_2 => { type => 'varchar', length => 75 },
- street => { type => 'varchar', length => 75 },
- zipcode => { type => 'varchar', length => 10 },
+ account_number => { type => 'varchar', length => 15 },
+ bank => { type => 'text' },
+ bank_code => { type => 'varchar', length => 10 },
+ bcc => { type => 'text' },
+ bic => { type => 'varchar', length => 100 },
+ business_id => { type => 'integer' },
+ cc => { type => 'text' },
city => { type => 'varchar', length => 75 },
- country => { type => 'varchar', length => 75 },
contact => { type => 'varchar', length => 75 },
- phone => { type => 'text' },
+ country => { type => 'varchar', length => 75 },
+ creditlimit => { type => 'numeric', precision => 5, scale => 15 },
+ currency_id => { type => 'integer', not_null => 1 },
+ department_1 => { type => 'varchar', length => 75 },
+ department_2 => { type => 'varchar', length => 75 },
+ direct_debit => { type => 'boolean', default => 'false' },
+ discount => { type => 'float', precision => 4 },
+ email => { type => 'text' },
fax => { type => 'varchar', length => 30 },
+ greeting => { type => 'text' },
homepage => { type => 'text' },
- email => { type => 'text' },
- notes => { type => 'text' },
- terms => { type => 'integer', default => '0' },
- taxincluded => { type => 'boolean' },
- vendornumber => { type => 'text' },
- cc => { type => 'text' },
- bcc => { type => 'text' },
- business_id => { type => 'integer' },
- taxnumber => { type => 'text' },
- discount => { type => 'float', precision => 4 },
- creditlimit => { type => 'numeric', precision => 5, scale => 15 },
- account_number => { type => 'varchar', length => 15 },
- bank_code => { type => 'varchar', length => 10 },
- bank => { type => 'text' },
- language => { type => 'varchar', length => 5 },
+ iban => { type => 'varchar', length => 100 },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
itime => { type => 'timestamp', default => 'now()' },
+ language => { type => 'varchar', length => 5 },
+ language_id => { type => 'integer' },
mtime => { type => 'timestamp' },
+ name => { type => 'varchar', length => 75, not_null => 1 },
+ notes => { type => 'text' },
obsolete => { type => 'boolean', default => 'false' },
- username => { type => 'varchar', length => 50 },
- user_password => { type => 'varchar', length => 12 },
- salesman_id => { type => 'integer' },
- v_customer_id => { type => 'text' },
- language_id => { type => 'integer' },
payment_id => { type => 'integer' },
+ phone => { type => 'text' },
+ salesman_id => { type => 'integer' },
+ street => { type => 'varchar', length => 75 },
+ taxincluded => { type => 'boolean' },
+ taxnumber => { type => 'text' },
taxzone_id => { type => 'integer', default => '0', not_null => 1 },
- greeting => { type => 'text' },
+ terms => { type => 'integer', default => '0' },
+ user_password => { type => 'varchar', length => 12 },
+ username => { type => 'varchar', length => 50 },
ustid => { type => 'varchar', length => 14 },
- direct_debit => { type => 'boolean', default => 'false' },
- iban => { type => 'varchar', length => 100 },
- bic => { type => 'varchar', length => 100 },
- currency_id => { type => 'integer', not_null => 1 },
+ v_customer_id => { type => 'text' },
+ vendornumber => { type => 'text' },
+ zipcode => { type => 'varchar', length => 10 },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
},
);
-# __PACKAGE__->meta->initialize;
-
1;
;
__PACKAGE__->meta->table('warehouse');
__PACKAGE__->meta->columns(
- id => { type => 'integer', not_null => 1, sequence => 'id' },
description => { type => 'text' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ invalid => { type => 'boolean' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
sortkey => { type => 'integer' },
- invalid => { type => 'boolean' },
);
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
-# __PACKAGE__->meta->initialize;
-
1;
;
my %args = (indent => 2, use_setup => 0);
my $definition = "SL::DB::AUTO::$package"->meta->perl_class_definition(%args);
- $definition =~ s/(__PACKAGE__->meta->initialize;)/# $1/;
+ $definition =~ s/\n+__PACKAGE__->meta->initialize;\n+/\n\n/;
$definition =~ s/::AUTO::/::/g;
+
+ # Sort column definitions alphabetically
+ if ($definition =~ m/__PACKAGE__->meta->columns\( \n (.+?) \n \);/msx) {
+ my ($start, $end) = ($-[1], $+[1]);
+ my $sorted_columns = join "\n", sort split m/\n/, $1;
+ substr $definition, $start, $end - $start, $sorted_columns;
+ }
+
# patch foreign keys
my $foreign_key_definition = "SL::DB::AUTO::$package"->meta->perl_foreign_keys_definition(%args);
$foreign_key_definition =~ s/::AUTO::/::/g;
- if ($definition =~ /\Q$foreign_key_definition\E/) {
+ if ($foreign_key_definition && ($definition =~ /\Q$foreign_key_definition\E/)) {
my ($start, $end) = ($-[0], $+[0]);
while (my ($auto_generated_name, $desired_name) = each %{ $foreign_key_name_map{$table} || {} }) {
$foreign_key_definition =~ s/^ \s \s ${auto_generated_name} \b/ ${desired_name}/msx;
}
+ # Sort foreign key definitions alphabetically
+ if ($foreign_key_definition =~ m/\(\n(.+)\n\)/s) {
+ my ($list_start, $list_end) = ($-[0], $+[0]);
+ my @foreign_keys = split m/\n\n/m, $1;
+ my $sorted_foreign_keys = "(\n" . join("\n\n", sort @foreign_keys) . "\n)";
+
+ substr $foreign_key_definition, $list_start, $list_end - $list_start, $sorted_foreign_keys;;
+ }
+
substr($definition, $start, $end - $start) = $foreign_key_definition;
}