use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'acc_trans',
-
- 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' },
- 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' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- tax_id => { type => 'integer', not_null => 1 },
- chart_link => { type => 'text', not_null => 1 },
- ],
-
- primary_key_columns => [ 'acc_trans_id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- chart => {
- class => 'SL::DB::Chart',
- key_columns => { chart_id => 'id' },
- },
-
- project => {
- class => 'SL::DB::Project',
- key_columns => { project_id => 'id' },
- },
-
- tax => {
- class => 'SL::DB::Tax',
- key_columns => { tax_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('acc_trans');
+
+__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' },
+ 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' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ tax_id => { type => 'integer', not_null => 1 },
+ chart_link => { type => 'text', not_null => 1 },
);
+__PACKAGE__->meta->primary_key_columns([ 'acc_trans_id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ chart => {
+ class => 'SL::DB::Chart',
+ key_columns => { chart_id => 'id' },
+ },
+
+ project => {
+ class => 'SL::DB::Project',
+ key_columns => { project_id => 'id' },
+ },
+
+ tax => {
+ class => 'SL::DB::Tax',
+ key_columns => { tax_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'assembly',
-
- columns => [
- id => { type => 'integer' },
- parts_id => { type => 'integer' },
- qty => { type => 'float', precision => 4 },
- bom => { type => 'boolean' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- assembly_id => { type => 'serial', not_null => 1 },
- ],
-
- primary_key_columns => [ 'assembly_id' ],
-
- allow_inline_column_values => 1,
+__PACKAGE__->meta->table('assembly');
+
+__PACKAGE__->meta->columns(
+ id => { type => 'integer' },
+ parts_id => { type => 'integer' },
+ qty => { type => 'float', precision => 4 },
+ bom => { type => 'boolean' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ assembly_id => { type => 'serial', not_null => 1 },
);
+__PACKAGE__->meta->primary_key_columns([ 'assembly_id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'audittrail',
+__PACKAGE__->meta->table('audittrail');
- 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' },
- id => { type => 'serial', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
+__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' },
+ id => { type => 'serial', not_null => 1 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'clients',
- schema => 'auth',
-
- columns => [
- id => { type => 'serial', not_null => 1 },
- name => { type => 'text', not_null => 1 },
- dbhost => { type => 'text', not_null => 1 },
- dbport => { type => 'integer', default => 5432, not_null => 1 },
- dbname => { type => 'text', not_null => 1 },
- dbuser => { type => 'text', not_null => 1 },
- dbpasswd => { type => 'text', not_null => 1 },
- is_default => { type => 'boolean', default => 'false', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- unique_keys => [
- [ 'dbhost', 'dbport', 'dbname' ],
- [ 'name' ],
- ],
+__PACKAGE__->meta->table('clients');
+__PACKAGE__->meta->schema('auth');
+
+__PACKAGE__->meta->columns(
+ id => { type => 'serial', not_null => 1 },
+ name => { type => 'text', not_null => 1 },
+ dbhost => { type => 'text', not_null => 1 },
+ dbport => { type => 'integer', default => 5432, not_null => 1 },
+ dbname => { type => 'text', not_null => 1 },
+ dbuser => { type => 'text', not_null => 1 },
+ dbpasswd => { type => 'text', not_null => 1 },
+ is_default => { type => 'boolean', default => 'false', not_null => 1 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->unique_keys(
+ [ 'dbhost', 'dbport', 'dbname' ],
+ [ 'name' ],
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'clients_groups',
- schema => 'auth',
-
- columns => [
- client_id => { type => 'integer', not_null => 1 },
- group_id => { type => 'integer', not_null => 1 },
- ],
-
- primary_key_columns => [ 'client_id', 'group_id' ],
-
- foreign_keys => [
- client => {
- class => 'SL::DB::AuthClient',
- key_columns => { client_id => 'id' },
- },
-
- group => {
- class => 'SL::DB::AuthGroup',
- key_columns => { group_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('clients_groups');
+__PACKAGE__->meta->schema('auth');
+
+__PACKAGE__->meta->columns(
+ client_id => { type => 'integer', not_null => 1 },
+ group_id => { type => 'integer', not_null => 1 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'client_id', 'group_id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ client => {
+ class => 'SL::DB::AuthClient',
+ key_columns => { client_id => 'id' },
+ },
+
+ group => {
+ class => 'SL::DB::AuthGroup',
+ key_columns => { group_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'clients_users',
- schema => 'auth',
-
- columns => [
- client_id => { type => 'integer', not_null => 1 },
- user_id => { type => 'integer', not_null => 1 },
- ],
-
- primary_key_columns => [ 'client_id', 'user_id' ],
-
- foreign_keys => [
- client => {
- class => 'SL::DB::AuthClient',
- key_columns => { client_id => 'id' },
- },
-
- user => {
- class => 'SL::DB::AuthUser',
- key_columns => { user_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('clients_users');
+__PACKAGE__->meta->schema('auth');
+
+__PACKAGE__->meta->columns(
+ client_id => { type => 'integer', not_null => 1 },
+ user_id => { type => 'integer', not_null => 1 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'client_id', 'user_id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ client => {
+ class => 'SL::DB::AuthClient',
+ key_columns => { client_id => 'id' },
+ },
+
+ user => {
+ class => 'SL::DB::AuthUser',
+ key_columns => { user_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'group',
- schema => 'auth',
+__PACKAGE__->meta->table('group');
+__PACKAGE__->meta->schema('auth');
- columns => [
- id => { type => 'serial', not_null => 1 },
- name => { type => 'text', not_null => 1 },
- description => { type => 'text' },
- ],
+__PACKAGE__->meta->columns(
+ id => { type => 'serial', not_null => 1 },
+ name => { type => 'text', not_null => 1 },
+ description => { type => 'text' },
+);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- unique_key => [ 'name' ],
-);
+__PACKAGE__->meta->unique_keys([ 'name' ]);
+
+# __PACKAGE__->meta->initialize;
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'group_rights',
- schema => 'auth',
-
- columns => [
- group_id => { type => 'integer', not_null => 1 },
- right => { type => 'text', not_null => 1 },
- granted => { type => 'boolean', not_null => 1 },
- ],
-
- primary_key_columns => [ 'group_id', 'right' ],
-
- foreign_keys => [
- group => {
- class => 'SL::DB::AuthGroup',
- key_columns => { group_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('group_rights');
+__PACKAGE__->meta->schema('auth');
+
+__PACKAGE__->meta->columns(
+ group_id => { type => 'integer', not_null => 1 },
+ right => { type => 'text', not_null => 1 },
+ granted => { type => 'boolean', not_null => 1 },
);
+__PACKAGE__->meta->primary_key_columns([ 'group_id', 'right' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ group => {
+ class => 'SL::DB::AuthGroup',
+ key_columns => { group_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'user',
- schema => 'auth',
+__PACKAGE__->meta->table('user');
+__PACKAGE__->meta->schema('auth');
- columns => [
- id => { type => 'serial', not_null => 1 },
- login => { type => 'text', not_null => 1 },
- password => { type => 'text' },
- ],
+__PACKAGE__->meta->columns(
+ id => { type => 'serial', not_null => 1 },
+ login => { type => 'text', not_null => 1 },
+ password => { type => 'text' },
+);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- unique_key => [ 'login' ],
-);
+__PACKAGE__->meta->unique_keys([ 'login' ]);
+
+# __PACKAGE__->meta->initialize;
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'user_config',
- schema => 'auth',
-
- columns => [
- user_id => { type => 'integer', not_null => 1 },
- cfg_key => { type => 'text', not_null => 1 },
- cfg_value => { type => 'text' },
- ],
-
- primary_key_columns => [ 'user_id', 'cfg_key' ],
-
- foreign_keys => [
- user => {
- class => 'SL::DB::AuthUser',
- key_columns => { user_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('user_config');
+__PACKAGE__->meta->schema('auth');
+
+__PACKAGE__->meta->columns(
+ user_id => { type => 'integer', not_null => 1 },
+ cfg_key => { type => 'text', not_null => 1 },
+ cfg_value => { type => 'text' },
);
+__PACKAGE__->meta->primary_key_columns([ 'user_id', 'cfg_key' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ user => {
+ class => 'SL::DB::AuthUser',
+ key_columns => { user_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'user_group',
- schema => 'auth',
-
- columns => [
- user_id => { type => 'integer', not_null => 1 },
- group_id => { type => 'integer', not_null => 1 },
- ],
-
- primary_key_columns => [ 'user_id', 'group_id' ],
-
- foreign_keys => [
- group => {
- class => 'SL::DB::AuthGroup',
- key_columns => { group_id => 'id' },
- },
-
- user => {
- class => 'SL::DB::AuthUser',
- key_columns => { user_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('user_group');
+__PACKAGE__->meta->schema('auth');
+
+__PACKAGE__->meta->columns(
+ user_id => { type => 'integer', not_null => 1 },
+ group_id => { type => 'integer', not_null => 1 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'user_id', 'group_id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ group => {
+ class => 'SL::DB::AuthGroup',
+ key_columns => { group_id => 'id' },
+ },
+
+ user => {
+ class => 'SL::DB::AuthUser',
+ key_columns => { user_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'background_jobs',
+__PACKAGE__->meta->table('background_jobs');
- columns => [
- 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 },
- ],
-
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->columns(
+ 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__->meta->primary_key_columns([ 'id' ]);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'background_job_histories',
+__PACKAGE__->meta->table('background_job_histories');
- columns => [
- id => { type => 'serial', not_null => 1 },
- package_name => { type => 'varchar', length => 255 },
- run_at => { type => 'timestamp' },
- status => { type => 'varchar', length => 255 },
- result => { type => 'text' },
- error => { type => 'text', alias => 'error_col' },
- data => { type => 'text' },
- ],
-
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->columns(
+ id => { type => 'serial', not_null => 1 },
+ package_name => { type => 'varchar', length => 255 },
+ 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;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'bank_accounts',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- account_number => { type => 'varchar', length => 100 },
- 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 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- foreign_keys => [
- chart => {
- class => 'SL::DB::Chart',
- key_columns => { chart_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('bank_accounts');
+
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ account_number => { type => 'varchar', length => 100 },
+ 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 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ chart => {
+ class => 'SL::DB::Chart',
+ key_columns => { chart_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'bin',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- warehouse_id => { type => 'integer', not_null => 1 },
- description => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- warehouse => {
- class => 'SL::DB::Warehouse',
- key_columns => { warehouse_id => 'id' },
- },
- ],
+__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' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ warehouse => {
+ class => 'SL::DB::Warehouse',
+ key_columns => { warehouse_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'buchungsgruppen',
+__PACKAGE__->meta->table('buchungsgruppen');
- 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' },
- sortkey => { type => 'integer', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
+__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' },
+ sortkey => { type => 'integer', not_null => 1 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'business',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- description => { type => 'text' },
- discount => { type => 'float', precision => 4 },
- customernumberinit => { type => 'text' },
- salesman => { type => 'boolean', default => 'false' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
+__PACKAGE__->meta->table('business');
+
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ description => { type => 'text' },
+ discount => { type => 'float', precision => 4 },
+ customernumberinit => { type => 'text' },
+ salesman => { type => 'boolean', default => 'false' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'chart',
-
- 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' },
- datevautomatik => { type => 'boolean', default => 'false' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- new_chart_id => { type => 'integer' },
- valid_from => { type => 'date' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- unique_key => [ 'accno' ],
-
- allow_inline_column_values => 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' },
+ datevautomatik => { type => 'boolean', default => 'false' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ new_chart_id => { type => 'integer' },
+ valid_from => { type => 'date' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->unique_keys([ 'accno' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'contacts',
-
- columns => [
- cp_id => { type => 'integer', not_null => 1, sequence => 'id' },
- 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_mobile1 => { type => 'text' },
- cp_mobile2 => { type => 'text' },
- cp_satphone => { type => 'text' },
- cp_satfax => { type => 'text' },
- cp_project => { type => 'text' },
- cp_privatphone => { type => 'text' },
- cp_privatemail => { type => 'text' },
- cp_abteilung => { type => 'text' },
- cp_gender => { type => 'character', length => 1 },
- cp_street => { type => 'text' },
- cp_zipcode => { type => 'text' },
- cp_city => { type => 'text' },
- cp_birthday => { type => 'date' },
- cp_position => { type => 'varchar', length => 75 },
- ],
-
- primary_key_columns => [ 'cp_id' ],
-
- allow_inline_column_values => 1,
+__PACKAGE__->meta->table('contacts');
+
+__PACKAGE__->meta->columns(
+ cp_id => { type => 'integer', not_null => 1, sequence => 'id' },
+ 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_mobile1 => { type => 'text' },
+ cp_mobile2 => { type => 'text' },
+ cp_satphone => { type => 'text' },
+ cp_satfax => { type => 'text' },
+ cp_project => { type => 'text' },
+ cp_privatphone => { type => 'text' },
+ cp_privatemail => { type => 'text' },
+ cp_abteilung => { type => 'text' },
+ cp_gender => { type => 'character', length => 1 },
+ cp_street => { type => 'text' },
+ cp_zipcode => { type => 'text' },
+ cp_city => { type => 'text' },
+ cp_birthday => { type => 'date' },
+ cp_position => { type => 'varchar', length => 75 },
);
+__PACKAGE__->meta->primary_key_columns([ 'cp_id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'csv_import_profiles',
+__PACKAGE__->meta->table('csv_import_profiles');
- 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' },
- ],
-
- primary_key_columns => [ 'id' ],
+__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' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'csv_import_profile_settings',
-
- columns => [
- id => { type => 'serial', not_null => 1 },
- csv_import_profile_id => { type => 'integer', not_null => 1 },
- key => { type => 'text', not_null => 1 },
- value => { type => 'text' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- unique_key => [ 'csv_import_profile_id', 'key' ],
-
- foreign_keys => [
- csv_import_profile => {
- class => 'SL::DB::CsvImportProfile',
- key_columns => { csv_import_profile_id => 'id' },
- },
- ],
+__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 },
+ key => { type => 'text', not_null => 1 },
+ value => { type => 'text' },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->unique_keys([ 'csv_import_profile_id', 'key' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ csv_import_profile => {
+ class => 'SL::DB::CsvImportProfile',
+ key_columns => { csv_import_profile_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'csv_import_reports',
-
- columns => [
- id => { type => 'serial', not_null => 1 },
- session_id => { type => 'text', not_null => 1 },
- profile_id => { type => 'integer', not_null => 1 },
- type => { type => 'text', not_null => 1 },
- file => { type => 'text', not_null => 1 },
- numrows => { type => 'integer' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- foreign_keys => [
- profile => {
- class => 'SL::DB::CsvImportProfile',
- key_columns => { profile_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('csv_import_reports');
+
+__PACKAGE__->meta->columns(
+ id => { type => 'serial', not_null => 1 },
+ session_id => { type => 'text', not_null => 1 },
+ profile_id => { type => 'integer', not_null => 1 },
+ type => { type => 'text', not_null => 1 },
+ file => { type => 'text', not_null => 1 },
+ numrows => { type => 'integer' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ profile => {
+ class => 'SL::DB::CsvImportProfile',
+ key_columns => { profile_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'csv_import_report_rows',
-
- columns => [
- id => { type => 'serial', not_null => 1 },
- csv_import_report_id => { type => 'integer', not_null => 1 },
- col => { type => 'integer', not_null => 1 },
- row => { type => 'integer', not_null => 1 },
- value => { type => 'text' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- foreign_keys => [
- csv_import_report => {
- class => 'SL::DB::CsvImportReport',
- key_columns => { csv_import_report_id => 'id' },
- },
- ],
+__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 },
+ row => { type => 'integer', not_null => 1 },
+ value => { type => 'text' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ csv_import_report => {
+ class => 'SL::DB::CsvImportReport',
+ key_columns => { csv_import_report_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'csv_import_report_status',
-
- columns => [
- id => { type => 'serial', not_null => 1 },
- csv_import_report_id => { type => 'integer', not_null => 1 },
- row => { type => 'integer', not_null => 1 },
- type => { type => 'text', not_null => 1 },
- value => { type => 'text' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- foreign_keys => [
- csv_import_report => {
- class => 'SL::DB::CsvImportReport',
- key_columns => { csv_import_report_id => 'id' },
- },
- ],
+__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 },
+ row => { type => 'integer', not_null => 1 },
+ type => { type => 'text', not_null => 1 },
+ value => { type => 'text' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ csv_import_report => {
+ class => 'SL::DB::CsvImportReport',
+ key_columns => { csv_import_report_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'currencies',
+__PACKAGE__->meta->table('currencies');
- columns => [
- id => { type => 'serial', not_null => 1 },
- name => { type => 'text', not_null => 1 },
- ],
+__PACKAGE__->meta->columns(
+ id => { type => 'serial', not_null => 1 },
+ name => { type => 'text', not_null => 1 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->unique_keys([ 'name' ]);
- unique_key => [ 'name' ],
+__PACKAGE__->meta->relationships(
+ ap => {
+ class => 'SL::DB::PurchaseInvoice',
+ column_map => { id => 'currency_id' },
+ type => 'one to many',
+ },
+
+ ar => {
+ class => 'SL::DB::Invoice',
+ column_map => { id => 'currency_id' },
+ type => 'one to many',
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'custom_variables',
-
- 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 },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- sub_module => { type => 'text', default => '', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- config => {
- class => 'SL::DB::CustomVariableConfig',
- key_columns => { config_id => 'id' },
- },
- ],
+__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 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ sub_module => { type => 'text', default => '', not_null => 1 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ config => {
+ class => 'SL::DB::CustomVariableConfig',
+ key_columns => { config_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'custom_variable_configs',
-
- 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 },
- 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()' },
- mtime => { type => 'timestamp' },
- flags => { type => 'text' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 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 },
+ 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()' },
+ mtime => { type => 'timestamp' },
+ flags => { type => 'text' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'custom_variables_validity',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- config_id => { type => 'integer', not_null => 1 },
- trans_id => { type => 'integer', not_null => 1 },
- itime => { type => 'timestamp', default => 'now()' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- config => {
- class => 'SL::DB::CustomVariableConfig',
- key_columns => { config_id => 'id' },
- },
- ],
+__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 },
+ itime => { type => 'timestamp', default => 'now()' },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ config => {
+ class => 'SL::DB::CustomVariableConfig',
+ key_columns => { config_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'customer',
+__PACKAGE__->meta->table('customer');
- 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 },
- 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' },
- creditlimit => { type => 'numeric', default => '0', precision => 5, scale => 15 },
- terms => { type => 'integer', default => '0' },
- 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 },
- 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_id => { type => 'integer' },
- payment_id => { type => 'integer' },
- taxzone_id => { type => 'integer', default => '0', not_null => 1 },
- greeting => { type => 'text' },
- ustid => { type => 'text' },
- iban => { type => 'varchar', length => 100 },
- bic => { type => 'varchar', length => 100 },
- direct_debit => { type => 'boolean', default => 'false' },
- taxincluded_checked => { type => 'boolean' },
- currency_id => { type => 'integer', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
+__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 },
+ 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' },
+ creditlimit => { type => 'numeric', default => '0', precision => 5, scale => 15 },
+ terms => { type => 'integer', default => '0' },
+ 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 },
+ 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_id => { type => 'integer' },
+ payment_id => { type => 'integer' },
+ taxzone_id => { type => 'integer', default => '0', not_null => 1 },
+ greeting => { type => 'text' },
+ 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 },
+);
- foreign_keys => [
- business => {
- class => 'SL::DB::Business',
- key_columns => { business_id => 'id' },
- },
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- currency => {
- class => 'SL::DB::Currency',
- key_columns => { currency_id => 'id' },
- },
+__PACKAGE__->meta->allow_inline_column_values(1);
- language_obj => {
- class => 'SL::DB::Language',
- key_columns => { language_id => 'id' },
- },
+__PACKAGE__->meta->foreign_keys(
+ business => {
+ class => 'SL::DB::Business',
+ key_columns => { business_id => 'id' },
+ },
- payment => {
- class => 'SL::DB::PaymentTerm',
- key_columns => { payment_id => 'id' },
- },
- ],
+ currency => {
+ class => 'SL::DB::Currency',
+ key_columns => { currency_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'datev',
-
- columns => [
- beraternr => { type => 'varchar', length => 7 },
- beratername => { type => 'varchar', length => 9 },
- mandantennr => { type => 'varchar', length => 5 },
- dfvkz => { type => 'varchar', length => 2 },
- datentraegernr => { type => 'varchar', length => 3 },
- abrechnungsnr => { type => 'varchar', length => 6 },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- id => { type => 'serial', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
+__PACKAGE__->meta->table('datev');
+
+__PACKAGE__->meta->columns(
+ beraternr => { type => 'varchar', length => 7 },
+ beratername => { type => 'varchar', length => 9 },
+ mandantennr => { type => 'varchar', length => 5 },
+ dfvkz => { type => 'varchar', length => 2 },
+ datentraegernr => { type => 'varchar', length => 3 },
+ abrechnungsnr => { type => 'varchar', length => 6 },
+ itime => { type => 'timestamp', default => 'now()' },
+ 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;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'defaults',
+__PACKAGE__->meta->table('defaults');
- 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 },
- 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' },
- 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' },
- id => { type => 'serial', not_null => 1 },
- language_id => { type => 'integer' },
- accounting_method => { type => 'text' },
- inventory_system => { type => 'text' },
- profit_determination => { type => 'text' },
- 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' },
- 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' },
- purchase_order_show_delete => { type => 'boolean', default => 'true' },
- 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' },
- max_future_booking_interval => { type => 'integer', default => 360 },
- assemblynumber => { type => 'text' },
- warehouse_id => { type => 'integer' },
- bin_id => { type => 'integer' },
- company => { type => 'text' },
- address => { type => 'text' },
- taxnumber => { type => 'text' },
- co_ustid => { type => 'text' },
- duns => { type => 'text' },
- sepa_creditor_id => { type => 'text' },
- templates => { type => 'text' },
- show_weight => { type => 'boolean', default => 'false', not_null => 1 },
- transfer_default => { type => 'boolean', default => 'true' },
- transfer_default_use_master_default_bin => { type => 'boolean', default => 'false' },
- transfer_default_ignore_onhand => { type => 'boolean', default => 'false' },
- warehouse_id_ignore_onhand => { type => 'integer' },
- bin_id_ignore_onhand => { type => 'integer' },
- currency_id => { type => 'integer', not_null => 1 },
- ],
+__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 },
+ 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' },
+ dunning_ar_amount_fee => { type => 'integer' },
+ dunning_ar_amount_interest => { type => 'integer' },
+ dunning_ar => { type => 'integer' },
+ pdonumber => { type => 'text' },
+ sdonumber => { type => 'text' },
+ id => { type => 'serial', not_null => 1 },
+ ar_paid_accno_id => { type => 'integer' },
+ language_id => { type => 'integer' },
+ accounting_method => { type => 'text' },
+ inventory_system => { type => 'text' },
+ profit_determination => { type => 'text' },
+ 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' },
+ 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' },
+ purchase_order_show_delete => { type => 'boolean', default => 'true' },
+ 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' },
+ assemblynumber => { type => 'text' },
+ currency_id => { type => 'integer', not_null => 1 },
+ warehouse_id => { type => 'integer' },
+ bin_id => { type => 'integer' },
+ show_weight => { type => 'boolean', default => 'false', not_null => 1 },
+ transfer_default => { type => 'boolean', default => 'true' },
+ transfer_default_use_master_default_bin => { type => 'boolean', default => 'false' },
+ transfer_default_ignore_onhand => { type => 'boolean', default => 'false' },
+ warehouse_id_ignore_onhand => { type => 'integer' },
+ bin_id_ignore_onhand => { type => 'integer' },
+ company => { type => 'text' },
+ address => { type => 'text' },
+ taxnumber => { type => 'text' },
+ co_ustid => { type => 'text' },
+ duns => { type => 'text' },
+ sepa_creditor_id => { type => 'text' },
+ templates => { type => 'text' },
+ max_future_booking_interval => { type => 'integer', default => 360 },
+);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- allow_inline_column_values => 1,
+__PACKAGE__->meta->allow_inline_column_values(1);
- foreign_keys => [
- bin => {
- class => 'SL::DB::Bin',
- key_columns => { bin_id => 'id' },
- },
+__PACKAGE__->meta->foreign_keys(
+ bin => {
+ class => 'SL::DB::Bin',
+ key_columns => { bin_id => 'id' },
+ },
- bin_obj => {
- class => 'SL::DB::Bin',
- key_columns => { bin_id_ignore_onhand => 'id' },
- },
+ bin_obj => {
+ class => 'SL::DB::Bin',
+ key_columns => { bin_id_ignore_onhand => 'id' },
+ },
- currency => {
- class => 'SL::DB::Currency',
- key_columns => { currency_id => 'id' },
- },
+ currency => {
+ class => 'SL::DB::Currency',
+ key_columns => { currency_id => 'id' },
+ },
- warehouse => {
- class => 'SL::DB::Warehouse',
- key_columns => { warehouse_id => 'id' },
- },
+ warehouse => {
+ class => 'SL::DB::Warehouse',
+ key_columns => { warehouse_id => 'id' },
+ },
- warehouse_obj => {
- class => 'SL::DB::Warehouse',
- key_columns => { warehouse_id_ignore_onhand => 'id' },
- },
- ],
+ warehouse_obj => {
+ class => 'SL::DB::Warehouse',
+ key_columns => { warehouse_id_ignore_onhand => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'delivery_orders',
-
- 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' },
- cusordnumber => { type => 'text' },
- oreqnumber => { type => 'text' },
- department_id => { type => 'integer' },
- shipvia => { type => 'text' },
- cp_id => { type => 'integer' },
- language_id => { type => 'integer' },
- shipto_id => { type => 'integer' },
- globalproject_id => { type => 'integer' },
- salesman_id => { type => 'integer' },
- transaction_description => { type => 'text' },
- is_sales => { type => 'boolean' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- taxzone_id => { type => 'integer' },
- taxincluded => { type => 'boolean' },
- terms => { type => 'integer' },
- currency_id => { type => 'integer', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- contact => {
- class => 'SL::DB::Contact',
- key_columns => { cp_id => 'cp_id' },
- },
-
- currency => {
- class => 'SL::DB::Currency',
- key_columns => { currency_id => 'id' },
- },
-
- customer => {
- class => 'SL::DB::Customer',
- key_columns => { customer_id => 'id' },
- },
+__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' },
+ cusordnumber => { type => 'text' },
+ oreqnumber => { type => 'text' },
+ department_id => { type => 'integer' },
+ shipvia => { type => 'text' },
+ cp_id => { type => 'integer' },
+ language_id => { type => 'integer' },
+ shipto_id => { type => 'integer' },
+ globalproject_id => { type => 'integer' },
+ salesman_id => { type => 'integer' },
+ transaction_description => { type => 'text' },
+ is_sales => { type => 'boolean' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ taxzone_id => { type => 'integer' },
+ taxincluded => { type => 'boolean' },
+ terms => { type => 'integer' },
+ currency_id => { type => 'integer', not_null => 1 },
+);
- department => {
- class => 'SL::DB::Department',
- key_columns => { department_id => 'id' },
- },
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- employee => {
- class => 'SL::DB::Employee',
- key_columns => { employee_id => 'id' },
- },
+__PACKAGE__->meta->allow_inline_column_values(1);
- globalproject => {
- class => 'SL::DB::Project',
- key_columns => { globalproject_id => 'id' },
- },
+__PACKAGE__->meta->foreign_keys(
+ contact => {
+ class => 'SL::DB::Contact',
+ key_columns => { cp_id => 'cp_id' },
+ },
- language => {
- class => 'SL::DB::Language',
- key_columns => { language_id => 'id' },
- },
+ currency => {
+ class => 'SL::DB::Currency',
+ key_columns => { currency_id => 'id' },
+ },
- salesman => {
- class => 'SL::DB::Employee',
- key_columns => { salesman_id => 'id' },
- },
+ customer => {
+ class => 'SL::DB::Customer',
+ key_columns => { customer_id => 'id' },
+ },
- shipto => {
- class => 'SL::DB::Shipto',
- key_columns => { shipto_id => 'shipto_id' },
- },
+ globalproject => {
+ class => 'SL::DB::Project',
+ key_columns => { globalproject_id => 'id' },
+ },
- vendor => {
- class => 'SL::DB::Vendor',
- key_columns => { vendor_id => 'id' },
- },
- ],
+ vendor => {
+ class => 'SL::DB::Vendor',
+ key_columns => { vendor_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'delivery_order_items',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'delivery_order_items_id' },
- 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 },
- project_id => { type => 'integer' },
- reqdate => { type => 'date' },
- 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' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
+__PACKAGE__->meta->table('delivery_order_items');
+
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'delivery_order_items_id' },
+ 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 },
+ project_id => { type => 'integer' },
+ reqdate => { type => 'date' },
+ 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' },
+);
- foreign_keys => [
- delivery_order => {
- class => 'SL::DB::DeliveryOrder',
- key_columns => { delivery_order_id => 'id' },
- },
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- part => {
- class => 'SL::DB::Part',
- key_columns => { parts_id => 'id' },
- },
+__PACKAGE__->meta->allow_inline_column_values(1);
- price_factor_obj => {
- class => 'SL::DB::PriceFactor',
- key_columns => { price_factor_id => 'id' },
- },
+__PACKAGE__->meta->foreign_keys(
+ delivery_order => {
+ class => 'SL::DB::DeliveryOrder',
+ key_columns => { delivery_order_id => 'id' },
+ },
- pricegroup => {
- class => 'SL::DB::Pricegroup',
- key_columns => { pricegroup_id => 'id' },
- },
+ parts => {
+ class => 'SL::DB::Part',
+ key_columns => { parts_id => 'id' },
+ },
- project => {
- class => 'SL::DB::Project',
- key_columns => { project_id => 'id' },
- },
- ],
+ project => {
+ class => 'SL::DB::Project',
+ key_columns => { project_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'delivery_order_items_stock',
-
- 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 },
- bin_id => { type => 'integer', not_null => 1 },
- chargenumber => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- bestbefore => { type => 'date' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- bin => {
- class => 'SL::DB::Bin',
- key_columns => { bin_id => 'id' },
- },
-
- delivery_order_item => {
- class => 'SL::DB::DeliveryOrderItem',
- key_columns => { delivery_order_item_id => 'id' },
- },
-
- warehouse => {
- class => 'SL::DB::Warehouse',
- key_columns => { warehouse_id => 'id' },
- },
- ],
+__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 },
+ bin_id => { type => 'integer', not_null => 1 },
+ chargenumber => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ bestbefore => { type => 'date' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ bin => {
+ class => 'SL::DB::Bin',
+ key_columns => { bin_id => 'id' },
+ },
+
+ delivery_order_item => {
+ class => 'SL::DB::DeliveryOrderItem',
+ key_columns => { delivery_order_item_id => 'id' },
+ },
+
+ warehouse => {
+ class => 'SL::DB::Warehouse',
+ key_columns => { warehouse_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'department',
+__PACKAGE__->meta->table('department');
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- description => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- ],
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ description => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->allow_inline_column_values(1);
- allow_inline_column_values => 1,
+__PACKAGE__->meta->relationships(
+ ap => {
+ class => 'SL::DB::PurchaseInvoice',
+ column_map => { id => 'department_id' },
+ type => 'one to many',
+ },
+
+ ar => {
+ class => 'SL::DB::Invoice',
+ column_map => { id => 'department_id' },
+ type => 'one to many',
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'drafts',
-
- columns => [
- id => { type => 'varchar', length => 50, not_null => 1 },
- 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' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- employee => {
- class => 'SL::DB::Employee',
- key_columns => { employee_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('drafts');
+
+__PACKAGE__->meta->columns(
+ id => { type => 'varchar', length => 50, not_null => 1 },
+ 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->allow_inline_column_values(1);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'dunning',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- trans_id => { type => 'integer' },
- dunning_id => { type => 'integer' },
- dunning_level => { type => 'integer' },
- transdate => { type => 'date' },
- duedate => { type => 'date' },
- fee => { type => 'numeric', precision => 5, scale => 15 },
- 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' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- dunning_config => {
- class => 'SL::DB::DunningConfig',
- key_columns => { dunning_config_id => 'id' },
- },
-
- fee_interest_ar => {
- class => 'SL::DB::Invoice',
- key_columns => { fee_interest_ar_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('dunning');
+
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ trans_id => { type => 'integer' },
+ dunning_id => { type => 'integer' },
+ dunning_level => { type => 'integer' },
+ transdate => { type => 'date' },
+ duedate => { type => 'date' },
+ fee => { type => 'numeric', precision => 5, scale => 15 },
+ 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' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ fee_interest_ar => {
+ class => 'SL::DB::Invoice',
+ key_columns => { fee_interest_ar_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'dunning_config',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- dunning_level => { type => 'integer' },
- dunning_description => { type => 'text' },
- active => { type => 'boolean' },
- auto => { type => 'boolean' },
- 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_body => { type => 'text' },
- email_subject => { type => 'text' },
- email_attachment => { type => 'boolean' },
- template => { type => 'text' },
- create_invoices_for_fees => { type => 'boolean', default => 'true' },
- ],
-
- primary_key_columns => [ 'id' ],
+__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' },
+ 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_body => { type => 'text' },
+ email_subject => { type => 'text' },
+ email_attachment => { type => 'boolean' },
+ template => { type => 'text' },
+ create_invoices_for_fees => { type => 'boolean', default => 'true' },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->relationships(
+ ar => {
+ class => 'SL::DB::Invoice',
+ column_map => { id => 'dunning_config_id' },
+ type => 'one to many',
+ },
+
+ dunning => {
+ class => 'SL::DB::Dunning',
+ column_map => { id => 'dunning_config_id' },
+ type => 'one to many',
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'employee',
-
- 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' },
- homephone => { type => 'text' },
- workphone => { type => 'text' },
- deleted => { type => 'boolean', default => 'false' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- unique_key => [ 'login' ],
-
- allow_inline_column_values => 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' },
+ homephone => { type => 'text' },
+ workphone => { type => 'text' },
+ deleted => { type => 'boolean', default => 'false' },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->unique_keys([ 'login' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->relationships(
+ ap => {
+ class => 'SL::DB::PurchaseInvoice',
+ column_map => { id => 'employee_id' },
+ type => 'one to many',
+ },
+
+ ar => {
+ class => 'SL::DB::Invoice',
+ column_map => { id => 'employee_id' },
+ type => 'one to many',
+ },
+
+ ar_objs => {
+ class => 'SL::DB::Invoice',
+ column_map => { id => 'salesman_id' },
+ type => 'one to many',
+ },
+
+ drafts => {
+ class => 'SL::DB::Draft',
+ column_map => { id => 'employee_id' },
+ type => 'one to many',
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'exchangerate',
-
- columns => [
- transdate => { type => 'date' },
- buy => { type => 'numeric', precision => 5, scale => 15 },
- sell => { type => 'numeric', precision => 5, scale => 15 },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- id => { type => 'serial', not_null => 1 },
- currency_id => { type => 'integer', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- currency => {
- class => 'SL::DB::Currency',
- key_columns => { currency_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('exchangerate');
+
+__PACKAGE__->meta->columns(
+ transdate => { type => 'date' },
+ buy => { type => 'numeric', precision => 5, scale => 15 },
+ sell => { type => 'numeric', precision => 5, scale => 15 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ id => { type => 'serial', not_null => 1 },
+ currency_id => { type => 'integer', not_null => 1 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ currency => {
+ class => 'SL::DB::Currency',
+ key_columns => { currency_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'finanzamt',
+__PACKAGE__->meta->table('finanzamt');
- columns => [
- fa_land_nr => { type => 'text' },
- fa_bufa_nr => { type => 'text' },
- fa_name => { type => 'text' },
- fa_strasse => { type => 'text' },
- fa_plz => { type => 'text' },
- fa_ort => { type => 'text' },
- fa_telefon => { type => 'text' },
- fa_fax => { 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' },
- id => { type => 'serial', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->columns(
+ fa_land_nr => { type => 'text' },
+ fa_bufa_nr => { type => 'text' },
+ fa_name => { type => 'text' },
+ fa_strasse => { type => 'text' },
+ fa_plz => { type => 'text' },
+ fa_ort => { type => 'text' },
+ fa_telefon => { type => 'text' },
+ fa_fax => { 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' },
+ id => { type => 'serial', not_null => 1 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'follow_ups',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'follow_up_id' },
- follow_up_date => { type => 'date', 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 },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- employee => {
- class => 'SL::DB::Employee',
- key_columns => { created_for_user => 'id' },
- },
-
- employee_obj => {
- class => 'SL::DB::Employee',
- key_columns => { created_by => 'id' },
- },
-
- note => {
- class => 'SL::DB::Note',
- key_columns => { note_id => 'id' },
- },
- ],
+__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_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 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ employee => {
+ class => 'SL::DB::Employee',
+ key_columns => { created_for_user => 'id' },
+ },
+
+ employee_obj => {
+ class => 'SL::DB::Employee',
+ key_columns => { created_by => 'id' },
+ },
+);
+
+__PACKAGE__->meta->relationships(
+ follow_up_links => {
+ class => 'SL::DB::FollowUpLink',
+ column_map => { id => 'follow_up_id' },
+ type => 'one to many',
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'follow_up_access',
-
- columns => [
- who => { type => 'integer', not_null => 1 },
- what => { type => 'integer', not_null => 1 },
- id => { type => 'serial', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- foreign_keys => [
- employee => {
- class => 'SL::DB::Employee',
- key_columns => { who => 'id' },
- },
-
- employee_obj => {
- class => 'SL::DB::Employee',
- key_columns => { what => 'id' },
- },
- ],
+__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 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ employee => {
+ class => 'SL::DB::Employee',
+ key_columns => { who => 'id' },
+ },
+
+ employee_obj => {
+ class => 'SL::DB::Employee',
+ key_columns => { what => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'follow_up_links',
-
- 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' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- follow_up => {
- class => 'SL::DB::FollowUp',
- key_columns => { follow_up_id => 'id' },
- },
- ],
+__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' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'gl',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'glid' },
- reference => { type => 'text' },
- 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' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- type => { type => 'text' },
- storno => { type => 'boolean', default => 'false' },
- storno_id => { type => 'integer' },
- ob_transaction => { type => 'boolean' },
- cb_transaction => { type => 'boolean' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- department => {
- class => 'SL::DB::Department',
- key_columns => { department_id => 'id' },
- },
-
- storno_obj => {
- class => 'SL::DB::GLTransaction',
- key_columns => { storno_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('gl');
+
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'glid' },
+ reference => { type => 'text' },
+ 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' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ type => { type => 'text' },
+ storno => { type => 'boolean', default => 'false' },
+ storno_id => { type => 'integer' },
+ ob_transaction => { type => 'boolean' },
+ cb_transaction => { type => 'boolean' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ department => {
+ class => 'SL::DB::Department',
+ key_columns => { department_id => 'id' },
+ },
+
+ storno_obj => {
+ class => 'SL::DB::GLTransaction',
+ key_columns => { storno_id => 'id' },
+ },
+);
+
+__PACKAGE__->meta->relationships(
+ gl => {
+ class => 'SL::DB::GLTransaction',
+ column_map => { id => 'storno_id' },
+ type => 'one to many',
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'generic_translations',
+__PACKAGE__->meta->table('generic_translations');
- 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' },
- ],
+__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' },
+);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- foreign_keys => [
- language => {
- class => 'SL::DB::Language',
- key_columns => { language_id => 'id' },
- },
- ],
-);
+# __PACKAGE__->meta->initialize;
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'history_erp',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- trans_id => { type => 'integer' },
- employee_id => { type => 'integer' },
- addition => { type => 'text' },
- what_done => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- snumbers => { type => 'text' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- employee => {
- class => 'SL::DB::Employee',
- key_columns => { employee_id => 'id' },
- },
- ],
+__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' },
+ itime => { type => 'timestamp', default => 'now()' },
+ snumbers => { type => 'text' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ employee => {
+ class => 'SL::DB::Employee',
+ key_columns => { employee_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'inventory',
+__PACKAGE__->meta->table('inventory');
- 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' },
- employee_id => { type => 'integer', not_null => 1 },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- bin_id => { type => 'integer', not_null => 1 },
- qty => { type => 'numeric', precision => 5, scale => 25 },
- 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 },
- ],
+__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' },
+ employee_id => { type => 'integer', not_null => 1 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ bin_id => { type => 'integer', not_null => 1 },
+ qty => { type => 'numeric', precision => 5, scale => 25 },
+ 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 },
+);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- allow_inline_column_values => 1,
+__PACKAGE__->meta->allow_inline_column_values(1);
- foreign_keys => [
- bin => {
- class => 'SL::DB::Bin',
- key_columns => { bin_id => 'id' },
- },
+__PACKAGE__->meta->foreign_keys(
+ bin => {
+ class => 'SL::DB::Bin',
+ key_columns => { bin_id => 'id' },
+ },
- employee => {
- class => 'SL::DB::Employee',
- key_columns => { employee_id => 'id' },
- },
+ employee => {
+ class => 'SL::DB::Employee',
+ key_columns => { employee_id => 'id' },
+ },
- parts => {
- class => 'SL::DB::Part',
- key_columns => { parts_id => 'id' },
- },
+ parts => {
+ class => 'SL::DB::Part',
+ key_columns => { parts_id => 'id' },
+ },
- project => {
- class => 'SL::DB::Project',
- key_columns => { project_id => 'id' },
- },
+ project => {
+ class => 'SL::DB::Project',
+ key_columns => { project_id => 'id' },
+ },
- trans_type => {
- class => 'SL::DB::TransferType',
- key_columns => { trans_type_id => 'id' },
- },
+ trans_type => {
+ class => 'SL::DB::TransferType',
+ key_columns => { trans_type_id => 'id' },
+ },
- warehouse => {
- class => 'SL::DB::Warehouse',
- key_columns => { warehouse_id => 'id' },
- },
- ],
+ warehouse => {
+ class => 'SL::DB::Warehouse',
+ key_columns => { warehouse_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'ar',
-
- 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 },
- datepaid => { type => 'date' },
- duedate => { type => 'date' },
- deliverydate => { type => 'date' },
- invoice => { type => 'boolean', default => 'false' },
- shippingpoint => { type => 'text' },
- terms => { type => 'integer', default => '0' },
- notes => { type => 'text' },
- ordnumber => { type => 'text' },
- employee_id => { type => 'integer' },
- quonumber => { type => 'text' },
- cusordnumber => { type => 'text' },
- intnotes => { type => 'text' },
- department_id => { type => 'integer' },
- shipvia => { type => 'text' },
- 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' },
- orddate => { type => 'date' },
- quodate => { type => 'date' },
- globalproject_id => { type => 'integer' },
- salesman_id => { type => 'integer' },
- transaction_description => { type => 'text' },
- 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 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- contact => {
- class => 'SL::DB::Contact',
- key_columns => { cp_id => 'cp_id' },
- },
-
- currency => {
- class => 'SL::DB::Currency',
- key_columns => { currency_id => 'id' },
- },
-
- customer => {
- class => 'SL::DB::Customer',
- key_columns => { customer_id => 'id' },
- },
-
- department => {
- class => 'SL::DB::Department',
- key_columns => { department_id => 'id' },
- },
-
- dunning_config => {
- class => 'SL::DB::DunningConfig',
- key_columns => { dunning_config_id => 'id' },
- },
-
- employee => {
- class => 'SL::DB::Employee',
- key_columns => { employee_id => 'id' },
- },
+__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 },
+ datepaid => { type => 'date' },
+ duedate => { type => 'date' },
+ deliverydate => { type => 'date' },
+ invoice => { type => 'boolean', default => 'false' },
+ shippingpoint => { type => 'text' },
+ terms => { type => 'integer', default => '0' },
+ notes => { type => 'text' },
+ ordnumber => { type => 'text' },
+ employee_id => { type => 'integer' },
+ quonumber => { type => 'text' },
+ cusordnumber => { type => 'text' },
+ intnotes => { type => 'text' },
+ department_id => { type => 'integer' },
+ shipvia => { type => 'text' },
+ 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' },
+ orddate => { type => 'date' },
+ quodate => { type => 'date' },
+ globalproject_id => { type => 'integer' },
+ salesman_id => { type => 'integer' },
+ transaction_description => { type => 'text' },
+ 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 },
+);
- globalproject => {
- class => 'SL::DB::Project',
- key_columns => { globalproject_id => 'id' },
- },
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- language => {
- class => 'SL::DB::Language',
- key_columns => { language_id => 'id' },
- },
+__PACKAGE__->meta->allow_inline_column_values(1);
- payment_terms => {
- class => 'SL::DB::PaymentTerm',
- key_columns => { payment_id => 'id' },
- },
+__PACKAGE__->meta->foreign_keys(
+ contact => {
+ class => 'SL::DB::Contact',
+ key_columns => { cp_id => 'cp_id' },
+ },
- salesman => {
- class => 'SL::DB::Employee',
- key_columns => { salesman_id => 'id' },
- },
+ customer => {
+ class => 'SL::DB::Customer',
+ key_columns => { customer_id => 'id' },
+ },
- shipto => {
- class => 'SL::DB::Shipto',
- key_columns => { shipto_id => 'shipto_id' },
- },
+ globalproject => {
+ class => 'SL::DB::Project',
+ key_columns => { globalproject_id => 'id' },
+ },
- storno_obj => {
- class => 'SL::DB::Invoice',
- key_columns => { storno_id => 'id' },
- },
- ],
+ storno_obj => {
+ class => 'SL::DB::Invoice',
+ key_columns => { storno_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'invoice',
-
- 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' },
- deliverydate => { type => 'date' },
- serialnumber => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- pricegroup_id => { type => 'integer' },
- ordnumber => { type => 'text' },
- 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 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 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' },
+ deliverydate => { type => 'date' },
+ serialnumber => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ pricegroup_id => { type => 'integer' },
+ ordnumber => { type => 'text' },
+ 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 },
+);
- foreign_keys => [
- part => {
- class => 'SL::DB::Part',
- key_columns => { parts_id => 'id' },
- },
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- price_factor_obj => {
- class => 'SL::DB::PriceFactor',
- key_columns => { price_factor_id => 'id' },
- },
+__PACKAGE__->meta->allow_inline_column_values(1);
- pricegroup => {
- class => 'SL::DB::Pricegroup',
- key_columns => { pricegroup_id => 'id' },
- },
+__PACKAGE__->meta->foreign_keys(
+ parts => {
+ class => 'SL::DB::Part',
+ key_columns => { parts_id => 'id' },
+ },
- project => {
- class => 'SL::DB::Project',
- key_columns => { project_id => 'id' },
- },
- ],
+ project => {
+ class => 'SL::DB::Project',
+ key_columns => { project_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'language',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- description => { type => 'text' },
- template_code => { type => 'text' },
- article_code => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- output_numberformat => { type => 'text' },
- output_dateformat => { type => 'text' },
- output_longdates => { type => 'boolean' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 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' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ output_numberformat => { type => 'text' },
+ output_dateformat => { type => 'text' },
+ output_longdates => { type => 'boolean' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->relationships(
+ ap => {
+ class => 'SL::DB::PurchaseInvoice',
+ column_map => { id => 'language_id' },
+ type => 'one to many',
+ },
+
+ ar => {
+ class => 'SL::DB::Invoice',
+ column_map => { id => 'language_id' },
+ type => 'one to many',
+ },
+
+ customer => {
+ class => 'SL::DB::Customer',
+ column_map => { id => 'language_id' },
+ type => 'one to many',
+ },
+
+ generic_translations => {
+ class => 'SL::DB::GenericTranslation',
+ column_map => { id => 'language_id' },
+ type => 'one to many',
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'makemodel',
-
- columns => [
- parts_id => { type => 'integer' },
- model => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- lastcost => { type => 'numeric', precision => 5, scale => 15 },
- lastupdate => { type => 'date' },
- sortorder => { type => 'integer' },
- make => { type => 'integer' },
- id => { type => 'serial', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 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 },
+ lastcost => { type => 'numeric', precision => 5, scale => 15 },
+ lastupdate => { type => 'date' },
+ sortorder => { type => 'integer' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'notes',
-
- 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 },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- employee => {
- class => 'SL::DB::Employee',
- key_columns => { created_by => 'id' },
- },
- ],
+__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 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ employee => {
+ class => 'SL::DB::Employee',
+ key_columns => { created_by => 'id' },
+ },
+);
+
+__PACKAGE__->meta->relationships(
+ follow_ups => {
+ class => 'SL::DB::FollowUp',
+ column_map => { id => 'note_id' },
+ type => 'one to many',
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'oe',
-
- 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' },
- cusordnumber => { type => 'text' },
- intnotes => { type => 'text' },
- department_id => { type => 'integer' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- shipvia => { type => 'text' },
- cp_id => { type => 'integer' },
- language_id => { type => 'integer' },
- 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' },
- salesman_id => { type => 'integer' },
- marge_total => { type => 'numeric', precision => 5, scale => 15 },
- marge_percent => { type => 'numeric', precision => 5, scale => 15 },
- transaction_description => { type => 'text' },
- currency_id => { type => 'integer', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- contact => {
- class => 'SL::DB::Contact',
- key_columns => { cp_id => 'cp_id' },
- },
-
- currency => {
- class => 'SL::DB::Currency',
- key_columns => { currency_id => 'id' },
- },
-
- customer => {
- class => 'SL::DB::Customer',
- key_columns => { customer_id => 'id' },
- },
-
- delivery_customer => {
- class => 'SL::DB::Customer',
- key_columns => { delivery_customer_id => 'id' },
- },
-
- delivery_vendor => {
- class => 'SL::DB::Vendor',
- key_columns => { delivery_vendor_id => 'id' },
- },
-
- department => {
- class => 'SL::DB::Department',
- key_columns => { department_id => 'id' },
- },
-
- employee => {
- class => 'SL::DB::Employee',
- key_columns => { employee_id => 'id' },
- },
-
- globalproject => {
- class => 'SL::DB::Project',
- key_columns => { globalproject_id => 'id' },
- },
-
- language => {
- class => 'SL::DB::Language',
- key_columns => { language_id => 'id' },
- },
-
- payment_terms => {
- class => 'SL::DB::PaymentTerm',
- key_columns => { payment_id => 'id' },
- },
-
- salesman => {
- class => 'SL::DB::Employee',
- key_columns => { salesman_id => 'id' },
- },
-
- shipto => {
- class => 'SL::DB::Shipto',
- key_columns => { shipto_id => 'shipto_id' },
- },
-
- vendor => {
- class => 'SL::DB::Vendor',
- key_columns => { vendor_id => 'id' },
- },
- ],
+__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' },
+ cusordnumber => { type => 'text' },
+ intnotes => { type => 'text' },
+ department_id => { type => 'integer' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ shipvia => { type => 'text' },
+ cp_id => { type => 'integer' },
+ language_id => { type => 'integer' },
+ 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' },
+ salesman_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 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ contact => {
+ class => 'SL::DB::Contact',
+ key_columns => { cp_id => 'cp_id' },
+ },
+
+ currency => {
+ class => 'SL::DB::Currency',
+ key_columns => { currency_id => 'id' },
+ },
+
+ customer => {
+ class => 'SL::DB::Customer',
+ key_columns => { customer_id => 'id' },
+ },
+
+ delivery_customer => {
+ class => 'SL::DB::Customer',
+ key_columns => { delivery_customer_id => 'id' },
+ },
+
+ delivery_vendor => {
+ class => 'SL::DB::Vendor',
+ key_columns => { delivery_vendor_id => 'id' },
+ },
+
+ department => {
+ class => 'SL::DB::Department',
+ key_columns => { department_id => 'id' },
+ },
+
+ employee => {
+ class => 'SL::DB::Employee',
+ key_columns => { employee_id => 'id' },
+ },
+
+ globalproject => {
+ class => 'SL::DB::Project',
+ key_columns => { globalproject_id => 'id' },
+ },
+
+ language => {
+ class => 'SL::DB::Language',
+ key_columns => { language_id => 'id' },
+ },
+
+ salesman => {
+ class => 'SL::DB::Employee',
+ key_columns => { salesman_id => 'id' },
+ },
+
+ vendor => {
+ class => 'SL::DB::Vendor',
+ key_columns => { vendor_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'orderitems',
+__PACKAGE__->meta->table('orderitems');
- columns => [
- trans_id => { type => 'integer' },
- parts_id => { type => 'integer' },
- 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()' },
- mtime => { type => 'timestamp' },
- pricegroup_id => { type => 'integer' },
- ordnumber => { type => 'text' },
- 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->columns(
+ trans_id => { type => 'integer' },
+ parts_id => { type => 'integer' },
+ 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()' },
+ mtime => { type => 'timestamp' },
+ pricegroup_id => { type => 'integer' },
+ ordnumber => { type => 'text' },
+ 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 },
+);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- allow_inline_column_values => 1,
+__PACKAGE__->meta->allow_inline_column_values(1);
- foreign_keys => [
- part => {
- class => 'SL::DB::Part',
- key_columns => { parts_id => 'id' },
- },
+__PACKAGE__->meta->foreign_keys(
+ part => {
+ class => 'SL::DB::Part',
+ key_columns => { parts_id => 'id' },
+ },
- price_factor_obj => {
- class => 'SL::DB::PriceFactor',
- key_columns => { price_factor_id => 'id' },
- },
+ price_factor_obj => {
+ class => 'SL::DB::PriceFactor',
+ key_columns => { price_factor_id => 'id' },
+ },
- pricegroup => {
- class => 'SL::DB::Pricegroup',
- key_columns => { pricegroup_id => 'id' },
- },
+ pricegroup => {
+ class => 'SL::DB::Pricegroup',
+ key_columns => { pricegroup_id => 'id' },
+ },
- project => {
- class => 'SL::DB::Project',
- key_columns => { project_id => 'id' },
- },
+ project => {
+ class => 'SL::DB::Project',
+ key_columns => { project_id => 'id' },
+ },
- order => {
- class => 'SL::DB::Order',
- key_columns => { trans_id => 'id' },
- },
- ],
+ order => {
+ class => 'SL::DB::Order',
+ key_columns => { trans_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'parts',
+__PACKAGE__->meta->table('parts');
- 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' },
- bom => { type => 'boolean', default => 'false' },
- image => { type => 'text' },
- drawing => { type => 'text' },
- microfiche => { type => 'text' },
- partsgroup_id => { type => 'integer' },
- ve => { type => 'integer' },
- gv => { type => 'numeric', precision => 5, scale => 15 },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- unit => { type => 'varchar', length => 20, not_null => 1 },
- formel => { type => 'text' },
- not_discountable => { type => 'boolean', default => 'false' },
- buchungsgruppen_id => { type => 'integer' },
- payment_id => { type => 'integer' },
- ean => { type => 'text' },
- price_factor_id => { type => 'integer' },
- onhand => { type => 'numeric', default => '0', precision => 5, scale => 25 },
- stockable => { type => 'boolean', default => 'false' },
- has_sernumber => { type => 'boolean', default => 'false' },
- warehouse_id => { type => 'integer' },
- bin_id => { type => 'integer' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
- unique_key => [ 'partnumber' ],
+__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' },
+ bom => { type => 'boolean', default => 'false' },
+ image => { type => 'text' },
+ drawing => { type => 'text' },
+ microfiche => { type => 'text' },
+ partsgroup_id => { type => 'integer' },
+ ve => { type => 'integer' },
+ gv => { type => 'numeric', precision => 5, scale => 15 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ unit => { type => 'varchar', length => 20, not_null => 1 },
+ formel => { type => 'text' },
+ not_discountable => { type => 'boolean', default => 'false' },
+ buchungsgruppen_id => { type => 'integer' },
+ payment_id => { type => 'integer' },
+ ean => { type => 'text' },
+ price_factor_id => { type => 'integer' },
+ onhand => { type => 'numeric', default => '0', precision => 5, scale => 25 },
+ stockable => { type => 'boolean', default => 'false' },
+ has_sernumber => { type => 'boolean', default => 'false' },
+ warehouse_id => { type => 'integer' },
+ bin_id => { type => 'integer' },
+);
- foreign_keys => [
- bin => {
- class => 'SL::DB::Bin',
- key_columns => { bin_id => 'id' },
- },
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- buchungsgruppen => {
- class => 'SL::DB::Buchungsgruppe',
- key_columns => { buchungsgruppen_id => 'id' },
- },
+__PACKAGE__->meta->unique_keys([ 'partnumber' ]);
- partsgroup => {
- class => 'SL::DB::PartsGroup',
- key_columns => { partsgroup_id => 'id' },
- },
+__PACKAGE__->meta->allow_inline_column_values(1);
- payment => {
- class => 'SL::DB::PaymentTerm',
- key_columns => { payment_id => 'id' },
- },
+__PACKAGE__->meta->foreign_keys(
+ bin => {
+ class => 'SL::DB::Bin',
+ key_columns => { bin_id => 'id' },
+ },
- price_factor => {
- class => 'SL::DB::PriceFactor',
- key_columns => { price_factor_id => 'id' },
- },
+ buchungsgruppen => {
+ class => 'SL::DB::Buchungsgruppe',
+ key_columns => { buchungsgruppen_id => 'id' },
+ },
- unit_obj => {
- class => 'SL::DB::Unit',
- key_columns => { unit => 'name' },
- },
+ unit_obj => {
+ class => 'SL::DB::Unit',
+ key_columns => { unit => 'name' },
+ },
- warehouse => {
- class => 'SL::DB::Warehouse',
- key_columns => { warehouse_id => 'id' },
- },
- ],
+ warehouse => {
+ class => 'SL::DB::Warehouse',
+ key_columns => { warehouse_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'partsgroup',
+__PACKAGE__->meta->table('partsgroup');
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- partsgroup => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- ],
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ partsgroup => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->allow_inline_column_values(1);
- allow_inline_column_values => 1,
+__PACKAGE__->meta->relationships(
+ parts => {
+ class => 'SL::DB::Part',
+ column_map => { id => 'partsgroup_id' },
+ type => 'one to many',
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'payment_terms',
-
- 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 },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- ranking => { type => 'integer' },
- sortkey => { type => 'integer', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 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 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ ranking => { type => 'integer' },
+ sortkey => { type => 'integer', not_null => 1 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->relationships(
+ ap => {
+ class => 'SL::DB::PurchaseInvoice',
+ column_map => { id => 'payment_id' },
+ type => 'one to many',
+ },
+
+ ar => {
+ class => 'SL::DB::Invoice',
+ column_map => { id => 'payment_id' },
+ type => 'one to many',
+ },
+
+ customer => {
+ class => 'SL::DB::Customer',
+ column_map => { id => 'payment_id' },
+ type => 'one to many',
+ },
+
+ oe => {
+ class => 'SL::DB::Order',
+ column_map => { id => 'payment_id' },
+ type => 'one to many',
+ },
+
+ parts => {
+ class => 'SL::DB::Part',
+ column_map => { id => 'payment_id' },
+ type => 'one to many',
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'periodic_invoices',
-
- 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 },
- itime => { type => 'timestamp', default => 'now()' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- ar => {
- class => 'SL::DB::Invoice',
- key_columns => { ar_id => 'id' },
- },
-
- config => {
- class => 'SL::DB::PeriodicInvoicesConfig',
- key_columns => { config_id => 'id' },
- },
- ],
+__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 },
+ itime => { type => 'timestamp', default => 'now()' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ ar => {
+ class => 'SL::DB::Invoice',
+ key_columns => { ar_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'periodic_invoices_configs',
-
- columns => [
- 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' },
- start_date => { type => 'date' },
- ar_chart_id => { type => 'integer', not_null => 1 },
- terminated => { type => 'boolean', default => 'false' },
- end_date => { type => 'date' },
- extend_automatically_by => { type => 'integer' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- foreign_keys => [
- ar_chart => {
- class => 'SL::DB::Chart',
- key_columns => { ar_chart_id => 'id' },
- },
-
- order => {
- class => 'SL::DB::Order',
- key_columns => { oe_id => 'id' },
- },
-
- printer => {
- class => 'SL::DB::Printer',
- key_columns => { printer_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('periodic_invoices_configs');
+
+__PACKAGE__->meta->columns(
+ 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' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ ar_chart => {
+ class => 'SL::DB::Chart',
+ key_columns => { ar_chart_id => 'id' },
+ },
+
+ oe => {
+ class => 'SL::DB::Order',
+ key_columns => { oe_id => 'id' },
+ },
+);
+
+__PACKAGE__->meta->relationships(
+ ars => {
+ map_class => 'SL::DB::PeriodicInvoice',
+ map_from => 'config',
+ map_to => 'ar',
+ type => 'many to many',
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'prices',
-
- columns => [
- parts_id => { type => 'integer' },
- pricegroup_id => { type => 'integer' },
- price => { type => 'numeric', precision => 5, scale => 15 },
- id => { type => 'serial', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- foreign_keys => [
- parts => {
- class => 'SL::DB::Part',
- key_columns => { parts_id => 'id' },
- },
-
- pricegroup => {
- class => 'SL::DB::Pricegroup',
- key_columns => { pricegroup_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('prices');
+
+__PACKAGE__->meta->columns(
+ parts_id => { type => 'integer' },
+ pricegroup_id => { type => 'integer' },
+ price => { type => 'numeric', precision => 5, scale => 15 },
+ id => { type => 'serial', not_null => 1 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ parts => {
+ class => 'SL::DB::Part',
+ key_columns => { parts_id => 'id' },
+ },
+
+ pricegroup => {
+ class => 'SL::DB::Pricegroup',
+ key_columns => { pricegroup_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'price_factors',
+__PACKAGE__->meta->table('price_factors');
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- description => { type => 'text' },
- factor => { type => 'numeric', precision => 5, scale => 15 },
- sortkey => { type => 'integer' },
- ],
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ description => { type => 'text' },
+ factor => { type => 'numeric', precision => 5, scale => 15 },
+ sortkey => { type => 'integer' },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->relationships(
+ invoice => {
+ class => 'SL::DB::InvoiceItem',
+ column_map => { id => 'price_factor_id' },
+ type => 'one to many',
+ },
- primary_key_columns => [ 'id' ],
+ orderitems => {
+ class => 'SL::DB::OrderItem',
+ column_map => { id => 'price_factor_id' },
+ type => 'one to many',
+ },
+
+ parts => {
+ class => 'SL::DB::Part',
+ column_map => { id => 'price_factor_id' },
+ type => 'one to many',
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'pricegroup',
+__PACKAGE__->meta->table('pricegroup');
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- pricegroup => { type => 'text', not_null => 1 },
- ],
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ pricegroup => { type => 'text', not_null => 1 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->relationships(
+ delivery_order_items => {
+ class => 'SL::DB::DeliveryOrderItem',
+ column_map => { id => 'pricegroup_id' },
+ type => 'one to many',
+ },
- primary_key_columns => [ 'id' ],
+ invoice => {
+ class => 'SL::DB::InvoiceItem',
+ column_map => { id => 'pricegroup_id' },
+ type => 'one to many',
+ },
+
+ orderitems => {
+ class => 'SL::DB::OrderItem',
+ column_map => { id => 'pricegroup_id' },
+ type => 'one to many',
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'printers',
+__PACKAGE__->meta->table('printers');
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- printer_description => { type => 'text', not_null => 1 },
- printer_command => { type => 'text' },
- template_code => { type => 'text' },
- ],
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ printer_description => { type => 'text', not_null => 1 },
+ printer_command => { type => 'text' },
+ template_code => { type => 'text' },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->relationships(
+ periodic_invoices_configs => {
+ class => 'SL::DB::PeriodicInvoicesConfig',
+ column_map => { id => 'printer_id' },
+ type => 'one to many',
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'project',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- projectnumber => { type => 'text' },
- description => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- active => { type => 'boolean', default => 'true' },
- customer_id => { type => 'integer' },
- type => { type => 'text' },
- valid => { type => 'boolean', default => 'true' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- unique_key => [ 'projectnumber' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- customer => {
- class => 'SL::DB::Customer',
- key_columns => { customer_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('project');
+
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ projectnumber => { type => 'text' },
+ description => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ active => { type => 'boolean', default => 'true' },
+ customer_id => { type => 'integer' },
+ type => { type => 'text' },
+ valid => { type => 'boolean', default => 'true' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->unique_keys([ 'projectnumber' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ customer => {
+ class => 'SL::DB::Customer',
+ key_columns => { customer_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'ap',
-
- 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 },
- datepaid => { type => 'date' },
- duedate => { type => 'date' },
- invoice => { type => 'boolean', default => 'false' },
- ordnumber => { type => 'text' },
- notes => { type => 'text' },
- employee_id => { type => 'integer' },
- quonumber => { type => 'text' },
- intnotes => { type => 'text' },
- department_id => { type => 'integer' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- shipvia => { type => 'text' },
- cp_id => { type => 'integer' },
- language_id => { type => 'integer' },
- payment_id => { type => 'integer' },
- storno => { 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 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- contact => {
- class => 'SL::DB::Contact',
- key_columns => { cp_id => 'cp_id' },
- },
-
- currency => {
- class => 'SL::DB::Currency',
- key_columns => { currency_id => 'id' },
- },
-
- department => {
- class => 'SL::DB::Department',
- key_columns => { department_id => 'id' },
- },
+__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 },
+ datepaid => { type => 'date' },
+ duedate => { type => 'date' },
+ invoice => { type => 'boolean', default => 'false' },
+ ordnumber => { type => 'text' },
+ notes => { type => 'text' },
+ employee_id => { type => 'integer' },
+ quonumber => { type => 'text' },
+ intnotes => { type => 'text' },
+ department_id => { type => 'integer' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ shipvia => { type => 'text' },
+ cp_id => { type => 'integer' },
+ language_id => { type => 'integer' },
+ payment_id => { type => 'integer' },
+ storno => { 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 },
+);
- employee => {
- class => 'SL::DB::Employee',
- key_columns => { employee_id => 'id' },
- },
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- globalproject => {
- class => 'SL::DB::Project',
- key_columns => { globalproject_id => 'id' },
- },
+__PACKAGE__->meta->allow_inline_column_values(1);
- language => {
- class => 'SL::DB::Language',
- key_columns => { language_id => 'id' },
- },
+__PACKAGE__->meta->foreign_keys(
+ contact => {
+ class => 'SL::DB::Contact',
+ key_columns => { cp_id => 'cp_id' },
+ },
- payment_terms => {
- class => 'SL::DB::PaymentTerm',
- key_columns => { payment_id => 'id' },
- },
+ globalproject => {
+ class => 'SL::DB::Project',
+ key_columns => { globalproject_id => 'id' },
+ },
- storno_obj => {
- class => 'SL::DB::PurchaseInvoice',
- key_columns => { storno_id => 'id' },
- },
+ storno_obj => {
+ class => 'SL::DB::PurchaseInvoice',
+ key_columns => { storno_id => 'id' },
+ },
- vendor => {
- class => 'SL::DB::Vendor',
- key_columns => { vendor_id => 'id' },
- },
- ],
+ vendor => {
+ class => 'SL::DB::Vendor',
+ key_columns => { vendor_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'record_links',
+__PACKAGE__->meta->table('record_links');
- 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()' },
- id => { type => 'serial', not_null => 1 },
- ],
+__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()' },
+ id => { type => 'serial', not_null => 1 },
+);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- allow_inline_column_values => 1,
-);
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+# __PACKAGE__->meta->initialize;
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'schema_info',
+__PACKAGE__->meta->table('schema_info');
- columns => [
- tag => { type => 'text', not_null => 1 },
- login => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- ],
+__PACKAGE__->meta->columns(
+ tag => { type => 'text', not_null => 1 },
+ login => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+);
- primary_key_columns => [ 'tag' ],
+__PACKAGE__->meta->primary_key_columns([ 'tag' ]);
- allow_inline_column_values => 1,
-);
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+# __PACKAGE__->meta->initialize;
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'sepa_export',
-
- columns => [
- id => { type => 'serial', not_null => 1 },
- employee_id => { type => 'integer', not_null => 1 },
- executed => { type => 'boolean', default => 'false' },
- closed => { type => 'boolean', default => 'false' },
- itime => { type => 'timestamp', default => 'now()' },
- vc => { type => 'varchar', length => 10 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- employee => {
- class => 'SL::DB::Employee',
- key_columns => { employee_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('sepa_export');
+
+__PACKAGE__->meta->columns(
+ id => { type => 'serial', not_null => 1 },
+ employee_id => { type => 'integer', not_null => 1 },
+ executed => { type => 'boolean', default => 'false' },
+ closed => { type => 'boolean', default => 'false' },
+ itime => { type => 'timestamp', default => 'now()' },
+ vc => { type => 'varchar', length => 10 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ employee => {
+ class => 'SL::DB::Employee',
+ key_columns => { employee_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'sepa_export_items',
-
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- sepa_export_id => { type => 'integer', not_null => 1 },
- ap_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' },
- executed => { type => 'boolean', default => 'false' },
- execution_date => { type => 'date' },
- our_iban => { type => 'varchar', length => 100 },
- our_bic => { type => 'varchar', length => 100 },
- vc_iban => { type => 'varchar', length => 100 },
- vc_bic => { type => 'varchar', length => 100 },
- end_to_end_id => { type => 'varchar', length => 35 },
- ar_id => { type => 'integer' },
- ],
-
- primary_key_columns => [ 'id' ],
-
- foreign_keys => [
- ap => {
- class => 'SL::DB::PurchaseInvoice',
- key_columns => { ap_id => 'id' },
- },
-
- ar => {
- class => 'SL::DB::Invoice',
- key_columns => { ar_id => 'id' },
- },
-
- chart => {
- class => 'SL::DB::Chart',
- key_columns => { chart_id => 'id' },
- },
-
- sepa_export => {
- class => 'SL::DB::SepaExport',
- key_columns => { sepa_export_id => 'id' },
- },
- ],
+__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 },
+ ap_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' },
+ executed => { type => 'boolean', default => 'false' },
+ execution_date => { type => 'date' },
+ our_iban => { type => 'varchar', length => 100 },
+ our_bic => { type => 'varchar', length => 100 },
+ vc_iban => { type => 'varchar', length => 100 },
+ vc_bic => { type => 'varchar', length => 100 },
+ end_to_end_id => { type => 'varchar', length => 35 },
+ ar_id => { type => 'integer' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ ap => {
+ class => 'SL::DB::PurchaseInvoice',
+ key_columns => { ap_id => 'id' },
+ },
+
+ ar => {
+ class => 'SL::DB::Invoice',
+ key_columns => { ar_id => 'id' },
+ },
+
+ chart => {
+ class => 'SL::DB::Chart',
+ key_columns => { chart_id => 'id' },
+ },
+
+ sepa_export => {
+ class => 'SL::DB::SepaExport',
+ key_columns => { sepa_export_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'shipto',
-
- 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' },
- shipto_id => { type => 'integer', not_null => 1, sequence => 'id' },
- shiptocp_gender => { type => 'text' },
- ],
-
- primary_key_columns => [ 'shipto_id' ],
-
- allow_inline_column_values => 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' },
+ shipto_id => { type => 'integer', not_null => 1, sequence => 'id' },
+ shiptocp_gender => { type => 'text' },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'shipto_id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->relationships(
+ ar => {
+ class => 'SL::DB::Invoice',
+ column_map => { shipto_id => 'shipto_id' },
+ type => 'one to many',
+ },
+
+ delivery_orders => {
+ class => 'SL::DB::DeliveryOrder',
+ column_map => { shipto_id => 'shipto_id' },
+ type => 'one to many',
+ },
+
+ oe => {
+ class => 'SL::DB::Order',
+ column_map => { shipto_id => 'shipto_id' },
+ type => 'one to many',
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'status',
-
- 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' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- id => { type => 'serial', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 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' },
+ itime => { type => 'timestamp', default => 'now()' },
+ 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;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'tax',
-
- columns => [
- 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 },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- chart_categories => { type => 'text', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- chart => {
- class => 'SL::DB::Chart',
- key_columns => { chart_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('tax');
+
+__PACKAGE__->meta->columns(
+ 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 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ chart_categories => { type => 'text', not_null => 1 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ chart => {
+ class => 'SL::DB::Chart',
+ key_columns => { chart_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'taxkeys',
-
- 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 },
- pos_ustva => { type => 'integer' },
- startdate => { type => 'date', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- unique_key => [ 'chart_id', 'startdate' ],
-
- foreign_keys => [
- chart => {
- class => 'SL::DB::Chart',
- key_columns => { chart_id => 'id' },
- },
-
- tax => {
- class => 'SL::DB::Tax',
- key_columns => { tax_id => 'id' },
- },
- ],
+__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 },
+ pos_ustva => { type => 'integer' },
+ startdate => { type => 'date', not_null => 1 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->unique_keys([ 'chart_id', 'startdate' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ chart => {
+ class => 'SL::DB::Chart',
+ key_columns => { chart_id => 'id' },
+ },
+
+ tax => {
+ class => 'SL::DB::Tax',
+ key_columns => { tax_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'tax_zones',
+__PACKAGE__->meta->table('tax_zones');
- columns => [
- id => { type => 'integer', not_null => 1 },
- description => { type => 'text' },
- ],
-
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1 },
+ description => { type => 'text' },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'todo_user_config',
-
- columns => [
- employee_id => { type => 'integer', 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 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- foreign_keys => [
- employee => {
- class => 'SL::DB::Employee',
- key_columns => { employee_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('todo_user_config');
+
+__PACKAGE__->meta->columns(
+ employee_id => { type => 'integer', 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->foreign_keys(
+ employee => {
+ class => 'SL::DB::Employee',
+ key_columns => { employee_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'transfer_type',
+__PACKAGE__->meta->table('transfer_type');
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- direction => { type => 'varchar', length => 10, not_null => 1 },
- description => { type => 'text' },
- sortkey => { type => 'integer' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- ],
+__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' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->allow_inline_column_values(1);
- allow_inline_column_values => 1,
+__PACKAGE__->meta->relationships(
+ inventory => {
+ class => 'SL::DB::Inventory',
+ column_map => { id => 'trans_type_id' },
+ type => 'one to many',
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'translation',
-
- columns => [
- parts_id => { type => 'integer' },
- language_id => { type => 'integer' },
- translation => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- longdescription => { type => 'text' },
- id => { type => 'serial', not_null => 1 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- allow_inline_column_values => 1,
-
- foreign_keys => [
- language => {
- class => 'SL::DB::Language',
- key_columns => { language_id => 'id' },
- },
- ],
+__PACKAGE__->meta->table('translation');
+
+__PACKAGE__->meta->columns(
+ parts_id => { type => 'integer' },
+ language_id => { type => 'integer' },
+ translation => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ longdescription => { type => 'text' },
+ id => { type => 'serial', not_null => 1 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+__PACKAGE__->meta->foreign_keys(
+ language => {
+ class => 'SL::DB::Language',
+ key_columns => { language_id => 'id' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'units',
-
- 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 },
- ],
-
- primary_key_columns => [ 'name' ],
-
- unique_key => [ 'id' ],
-
- foreign_keys => [
- unit => {
- class => 'SL::DB::Unit',
- key_columns => { base_unit => 'name' },
- },
- ],
+__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 },
);
+__PACKAGE__->meta->primary_key_columns([ 'name' ]);
+
+__PACKAGE__->meta->unique_keys([ 'id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ unit => {
+ class => 'SL::DB::Unit',
+ key_columns => { base_unit => 'name' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'units_language',
-
- columns => [
- unit => { type => 'varchar', length => 20, 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 },
- ],
-
- primary_key_columns => [ 'id' ],
-
- foreign_keys => [
- language => {
- class => 'SL::DB::Language',
- key_columns => { language_id => 'id' },
- },
-
- unit_obj => {
- class => 'SL::DB::Unit',
- key_columns => { unit => 'name' },
- },
- ],
+__PACKAGE__->meta->table('units_language');
+
+__PACKAGE__->meta->columns(
+ unit => { type => 'varchar', length => 20, 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 },
);
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+__PACKAGE__->meta->foreign_keys(
+ language => {
+ class => 'SL::DB::Language',
+ key_columns => { language_id => 'id' },
+ },
+
+ unit_obj => {
+ class => 'SL::DB::Unit',
+ key_columns => { unit => 'name' },
+ },
+);
+
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'vendor',
+__PACKAGE__->meta->table('vendor');
- 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 },
- city => { type => 'varchar', length => 75 },
- country => { type => 'varchar', length => 75 },
- contact => { type => 'varchar', length => 75 },
- phone => { type => 'text' },
- fax => { type => 'varchar', length => 30 },
- 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 },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- 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' },
- taxzone_id => { type => 'integer', default => '0', not_null => 1 },
- greeting => { type => 'text' },
- ustid => { type => 'varchar', length => 14 },
- iban => { type => 'varchar', length => 100 },
- bic => { type => 'varchar', length => 100 },
- direct_debit => { type => 'boolean', default => 'false' },
- currency_id => { type => 'integer', not_null => 1 },
- ],
+__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 },
+ city => { type => 'varchar', length => 75 },
+ country => { type => 'varchar', length => 75 },
+ contact => { type => 'varchar', length => 75 },
+ phone => { type => 'text' },
+ fax => { type => 'varchar', length => 30 },
+ 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 },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ 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' },
+ taxzone_id => { type => 'integer', default => '0', not_null => 1 },
+ greeting => { type => 'text' },
+ 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 },
+);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- allow_inline_column_values => 1,
+__PACKAGE__->meta->allow_inline_column_values(1);
- foreign_keys => [
- business => {
- class => 'SL::DB::Business',
- key_columns => { business_id => 'id' },
- },
+__PACKAGE__->meta->foreign_keys(
+ business => {
+ class => 'SL::DB::Business',
+ key_columns => { business_id => 'id' },
+ },
- currency => {
- class => 'SL::DB::Currency',
- key_columns => { currency_id => 'id' },
- },
+ currency => {
+ class => 'SL::DB::Currency',
+ key_columns => { currency_id => 'id' },
+ },
- language_obj => {
- class => 'SL::DB::Language',
- key_columns => { language_id => 'id' },
- },
+ language_obj => {
+ class => 'SL::DB::Language',
+ key_columns => { language_id => 'id' },
+ },
- payment => {
- class => 'SL::DB::PaymentTerm',
- key_columns => { payment_id => 'id' },
- },
- ],
+ payment => {
+ class => 'SL::DB::PaymentTerm',
+ key_columns => { payment_id => 'id' },
+ },
);
+# __PACKAGE__->meta->initialize;
+
1;
;
use base qw(SL::DB::Object);
-__PACKAGE__->meta->setup(
- table => 'warehouse',
+__PACKAGE__->meta->table('warehouse');
- columns => [
- id => { type => 'integer', not_null => 1, sequence => 'id' },
- description => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- sortkey => { type => 'integer' },
- invalid => { type => 'boolean' },
- ],
+__PACKAGE__->meta->columns(
+ id => { type => 'integer', not_null => 1, sequence => 'id' },
+ description => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ sortkey => { type => 'integer' },
+ invalid => { type => 'boolean' },
+);
- primary_key_columns => [ 'id' ],
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
- allow_inline_column_values => 1,
-);
+__PACKAGE__->meta->allow_inline_column_values(1);
+
+# __PACKAGE__->meta->initialize;
1;
;