]> wagnertech.de Git - mfinanz.git/commitdiff
MetaSetup: Spalten- und Fremdschlüsselnamen alphabetisch sortieren
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 1 Jul 2013 17:00:58 +0000 (19:00 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 1 Jul 2013 17:00:58 +0000 (19:00 +0200)
75 files changed:
SL/DB/MetaSetup/AccTransaction.pm
SL/DB/MetaSetup/Assembly.pm
SL/DB/MetaSetup/AuditTrail.pm
SL/DB/MetaSetup/BackgroundJob.pm
SL/DB/MetaSetup/BackgroundJobHistory.pm
SL/DB/MetaSetup/BankAccount.pm
SL/DB/MetaSetup/Bin.pm
SL/DB/MetaSetup/Buchungsgruppe.pm
SL/DB/MetaSetup/Business.pm
SL/DB/MetaSetup/Chart.pm
SL/DB/MetaSetup/Contact.pm
SL/DB/MetaSetup/CsvImportProfile.pm
SL/DB/MetaSetup/CsvImportProfileSetting.pm
SL/DB/MetaSetup/CsvImportReport.pm
SL/DB/MetaSetup/CsvImportReportRow.pm
SL/DB/MetaSetup/CsvImportReportStatus.pm
SL/DB/MetaSetup/Currency.pm
SL/DB/MetaSetup/CustomVariable.pm
SL/DB/MetaSetup/CustomVariableConfig.pm
SL/DB/MetaSetup/CustomVariableValidity.pm
SL/DB/MetaSetup/Customer.pm
SL/DB/MetaSetup/Datev.pm
SL/DB/MetaSetup/Default.pm
SL/DB/MetaSetup/DeliveryOrder.pm
SL/DB/MetaSetup/DeliveryOrderItem.pm
SL/DB/MetaSetup/DeliveryOrderItemsStock.pm
SL/DB/MetaSetup/Department.pm
SL/DB/MetaSetup/Draft.pm
SL/DB/MetaSetup/Dunning.pm
SL/DB/MetaSetup/DunningConfig.pm
SL/DB/MetaSetup/Employee.pm
SL/DB/MetaSetup/Exchangerate.pm
SL/DB/MetaSetup/Finanzamt.pm
SL/DB/MetaSetup/FollowUp.pm
SL/DB/MetaSetup/FollowUpAccess.pm
SL/DB/MetaSetup/FollowUpLink.pm
SL/DB/MetaSetup/GLTransaction.pm
SL/DB/MetaSetup/GenericTranslation.pm
SL/DB/MetaSetup/History.pm
SL/DB/MetaSetup/Inventory.pm
SL/DB/MetaSetup/Invoice.pm
SL/DB/MetaSetup/InvoiceItem.pm
SL/DB/MetaSetup/Language.pm
SL/DB/MetaSetup/MakeModel.pm
SL/DB/MetaSetup/Note.pm
SL/DB/MetaSetup/Order.pm
SL/DB/MetaSetup/OrderItem.pm
SL/DB/MetaSetup/Part.pm
SL/DB/MetaSetup/PartsGroup.pm
SL/DB/MetaSetup/PaymentTerm.pm
SL/DB/MetaSetup/PeriodicInvoice.pm
SL/DB/MetaSetup/PeriodicInvoicesConfig.pm
SL/DB/MetaSetup/Price.pm
SL/DB/MetaSetup/PriceFactor.pm
SL/DB/MetaSetup/Pricegroup.pm
SL/DB/MetaSetup/Printer.pm
SL/DB/MetaSetup/Project.pm
SL/DB/MetaSetup/PurchaseInvoice.pm
SL/DB/MetaSetup/RecordLink.pm
SL/DB/MetaSetup/SchemaInfo.pm
SL/DB/MetaSetup/SepaExport.pm
SL/DB/MetaSetup/SepaExportItem.pm
SL/DB/MetaSetup/Shipto.pm
SL/DB/MetaSetup/Status.pm
SL/DB/MetaSetup/Tax.pm
SL/DB/MetaSetup/TaxKey.pm
SL/DB/MetaSetup/TaxZone.pm
SL/DB/MetaSetup/TodoUserConfig.pm
SL/DB/MetaSetup/TransferType.pm
SL/DB/MetaSetup/Translation.pm
SL/DB/MetaSetup/Unit.pm
SL/DB/MetaSetup/UnitsLanguage.pm
SL/DB/MetaSetup/Vendor.pm
SL/DB/MetaSetup/Warehouse.pm
scripts/rose_auto_create_model.pl

index 7bc07d08e23f597049e8599dbb6e88858f405f92..ae3f0f65e6c6fe457446a1c73ba7e7c7c99a8676 100644 (file)
@@ -10,23 +10,23 @@ __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' },
+  cb_transaction => { type => 'boolean', default => 'false', not_null => 1 },
+  chart_id       => { type => 'integer', not_null => 1 },
+  chart_link     => { type => 'text', not_null => 1 },
   cleared        => { type => 'boolean', default => 'false', not_null => 1 },
   fx_transaction => { type => 'boolean', default => 'false', not_null => 1 },
-  ob_transaction => { type => 'boolean', default => 'false', not_null => 1 },
-  cb_transaction => { type => 'boolean', default => 'false', not_null => 1 },
-  project_id     => { type => 'integer' },
-  memo           => { type => 'text' },
-  taxkey         => { type => 'integer' },
+  gldate         => { type => 'date', default => 'now' },
   itime          => { type => 'timestamp', default => 'now()' },
+  memo           => { type => 'text' },
   mtime          => { type => 'timestamp' },
+  ob_transaction => { type => 'boolean', default => 'false', not_null => 1 },
+  project_id     => { type => 'integer' },
+  source         => { type => 'text' },
   tax_id         => { type => 'integer', not_null => 1 },
-  chart_link     => { type => 'text', not_null => 1 },
+  taxkey         => { type => 'integer' },
+  trans_id       => { type => 'integer', not_null => 1 },
+  transdate      => { type => 'date', default => 'now' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'acc_trans_id' ]);
@@ -50,7 +50,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index f74883962e211a767e1ecc6fe540c60955afbb84..2890e8572995eecc9910272cf811f9c8033e222d 100644 (file)
@@ -9,20 +9,18 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('assembly');
 
 __PACKAGE__->meta->columns(
-  id          => { type => 'integer' },
-  parts_id    => { type => 'integer' },
-  qty         => { type => 'float', precision => 4 },
+  assembly_id => { type => 'serial', not_null => 1 },
   bom         => { type => 'boolean' },
+  id          => { type => 'integer' },
   itime       => { type => 'timestamp', default => 'now()' },
   mtime       => { type => 'timestamp' },
-  assembly_id => { type => 'serial', not_null => 1 },
+  parts_id    => { type => 'integer' },
+  qty         => { type => 'float', precision => 4 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'assembly_id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index d86a43f7fbaa94db98aec53bed594b3b3362ebaf..fd8add02824541b979e457d128ad2de0f9cb00c4 100644 (file)
@@ -9,19 +9,17 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('audittrail');
 
 __PACKAGE__->meta->columns(
-  trans_id    => { type => 'integer' },
-  tablename   => { type => 'text' },
-  reference   => { type => 'text' },
-  formname    => { type => 'text' },
   action      => { type => 'text' },
-  transdate   => { type => 'timestamp', default => 'now' },
   employee_id => { type => 'integer' },
+  formname    => { type => 'text' },
   id          => { type => 'serial', not_null => 1 },
+  reference   => { type => 'text' },
+  tablename   => { type => 'text' },
+  trans_id    => { type => 'integer' },
+  transdate   => { type => 'timestamp', default => 'now' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 0716443ab0a21e2e319b435e68e245ea952172b7..6b19131094665263dc6d06b415ce9fdf0943d2c0 100644 (file)
@@ -9,19 +9,17 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('background_jobs');
 
 __PACKAGE__->meta->columns(
+  active       => { type => 'boolean' },
+  cron_spec    => { type => 'varchar', length => 255 },
+  data         => { type => 'text' },
   id           => { type => 'serial', not_null => 1 },
-  type         => { type => 'varchar', length => 255 },
-  package_name => { type => 'varchar', length => 255 },
   last_run_at  => { type => 'timestamp' },
   next_run_at  => { type => 'timestamp' },
-  data         => { type => 'text' },
-  active       => { type => 'boolean' },
-  cron_spec    => { type => 'varchar', length => 255 },
+  package_name => { type => 'varchar', length => 255 },
+  type         => { type => 'varchar', length => 255 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 6fb3e2b422f890d322344c668f7b6738231d4f1e..24ce17ff1c4c0ec2305132f3a5f2f5046a145b33 100644 (file)
@@ -9,18 +9,16 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('background_job_histories');
 
 __PACKAGE__->meta->columns(
+  data         => { type => 'text' },
+  error        => { type => 'text', alias => 'error_col' },
   id           => { type => 'serial', not_null => 1 },
   package_name => { type => 'varchar', length => 255 },
+  result       => { type => 'text' },
   run_at       => { type => 'timestamp' },
   status       => { type => 'varchar', length => 255 },
-  result       => { type => 'text' },
-  error        => { type => 'text', alias => 'error_col' },
-  data         => { type => 'text' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 94eec593eb889b5471f5951973334e1f6ecb5b7c..d8be5aacf22aa24d0d051d42c90b279582ae3d7c 100644 (file)
@@ -9,13 +9,13 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('bank_accounts');
 
 __PACKAGE__->meta->columns(
-  id             => { type => 'integer', not_null => 1, sequence => 'id' },
   account_number => { type => 'varchar', length => 100 },
+  bank           => { type => 'text' },
   bank_code      => { type => 'varchar', length => 100 },
-  iban           => { type => 'varchar', length => 100 },
   bic            => { type => 'varchar', length => 100 },
-  bank           => { type => 'text' },
   chart_id       => { type => 'integer', not_null => 1 },
+  iban           => { type => 'varchar', length => 100 },
+  id             => { type => 'integer', not_null => 1, sequence => 'id' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -27,7 +27,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index df051036158f000b3c9420b36a3ab33acd7b0d96..223276ed622fb9fa604bb008b1dfdb55e9779d12 100644 (file)
@@ -9,11 +9,11 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('bin');
 
 __PACKAGE__->meta->columns(
-  id           => { type => 'integer', not_null => 1, sequence => 'id' },
-  warehouse_id => { type => 'integer', not_null => 1 },
   description  => { type => 'text' },
+  id           => { type => 'integer', not_null => 1, sequence => 'id' },
   itime        => { type => 'timestamp', default => 'now()' },
   mtime        => { type => 'timestamp' },
+  warehouse_id => { type => 'integer', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -27,7 +27,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 8845dbb8141a34e08c030af6aba6f8b7f53772ab..bda9c78bf022e886d0968a044e659a52a9a51dbd 100644 (file)
@@ -9,23 +9,21 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('buchungsgruppen');
 
 __PACKAGE__->meta->columns(
-  id                 => { type => 'integer', not_null => 1, sequence => 'id' },
   description        => { type => 'text' },
-  inventory_accno_id => { type => 'integer' },
-  income_accno_id_0  => { type => 'integer' },
   expense_accno_id_0 => { type => 'integer' },
-  income_accno_id_1  => { type => 'integer' },
   expense_accno_id_1 => { type => 'integer' },
-  income_accno_id_2  => { type => 'integer' },
   expense_accno_id_2 => { type => 'integer' },
-  income_accno_id_3  => { type => 'integer' },
   expense_accno_id_3 => { type => 'integer' },
+  id                 => { type => 'integer', not_null => 1, sequence => 'id' },
+  income_accno_id_0  => { type => 'integer' },
+  income_accno_id_1  => { type => 'integer' },
+  income_accno_id_2  => { type => 'integer' },
+  income_accno_id_3  => { type => 'integer' },
+  inventory_accno_id => { type => 'integer' },
   sortkey            => { type => 'integer', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index d04b2bc052fbfd68925952b3d09bbe2d10831451..b522f7c87e233fab336545be713d9edfb5c6eb30 100644 (file)
@@ -9,20 +9,18 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('business');
 
 __PACKAGE__->meta->columns(
-  id                 => { type => 'integer', not_null => 1, sequence => 'id' },
+  customernumberinit => { type => 'text' },
   description        => { type => 'text' },
   discount           => { type => 'float', precision => 4 },
-  customernumberinit => { type => 'text' },
-  salesman           => { type => 'boolean', default => 'false' },
+  id                 => { type => 'integer', not_null => 1, sequence => 'id' },
   itime              => { type => 'timestamp', default => 'now()' },
   mtime              => { type => 'timestamp' },
+  salesman           => { type => 'boolean', default => 'false' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 980b2bd5d614a72d78569260f940b53715299025..5d041276ca7a798499f396060ddff5aecad55e6e 100644 (file)
@@ -9,20 +9,20 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('chart');
 
 __PACKAGE__->meta->columns(
-  id             => { type => 'integer', not_null => 1, sequence => 'id' },
   accno          => { type => 'text', not_null => 1 },
-  description    => { type => 'text' },
-  charttype      => { type => 'character', default => 'A', length => 1 },
   category       => { type => 'character', length => 1 },
-  link           => { type => 'text', not_null => 1 },
-  taxkey_id      => { type => 'integer' },
-  pos_bwa        => { type => 'integer' },
-  pos_bilanz     => { type => 'integer' },
-  pos_eur        => { type => 'integer' },
+  charttype      => { type => 'character', default => 'A', length => 1 },
   datevautomatik => { type => 'boolean', default => 'false' },
+  description    => { type => 'text' },
+  id             => { type => 'integer', not_null => 1, sequence => 'id' },
   itime          => { type => 'timestamp', default => 'now()' },
+  link           => { type => 'text', not_null => 1 },
   mtime          => { type => 'timestamp' },
   new_chart_id   => { type => 'integer' },
+  pos_bilanz     => { type => 'integer' },
+  pos_bwa        => { type => 'integer' },
+  pos_eur        => { type => 'integer' },
+  taxkey_id      => { type => 'integer' },
   valid_from     => { type => 'date' },
 );
 
@@ -32,7 +32,5 @@ __PACKAGE__->meta->unique_keys([ 'accno' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 4287a561de4b73f128dad1331f6e75d17b811471..8a749bb3c6b4d075eeb70bb2d736327b66afa663 100644 (file)
@@ -9,38 +9,36 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('contacts');
 
 __PACKAGE__->meta->columns(
-  cp_id          => { type => 'integer', not_null => 1, sequence => 'id' },
+  cp_abteilung   => { type => 'text' },
+  cp_birthday    => { type => 'date' },
+  cp_city        => { type => 'text' },
   cp_cv_id       => { type => 'integer' },
-  cp_title       => { type => 'varchar', length => 75 },
-  cp_givenname   => { type => 'varchar', length => 75 },
-  cp_name        => { type => 'varchar', length => 75 },
   cp_email       => { type => 'text' },
-  cp_phone1      => { type => 'varchar', length => 75 },
-  cp_phone2      => { type => 'varchar', length => 75 },
-  itime          => { type => 'timestamp', default => 'now()' },
-  mtime          => { type => 'timestamp' },
   cp_fax         => { type => 'text' },
+  cp_gender      => { type => 'character', length => 1 },
+  cp_givenname   => { type => 'varchar', length => 75 },
+  cp_id          => { type => 'integer', not_null => 1, sequence => 'id' },
   cp_mobile1     => { type => 'text' },
   cp_mobile2     => { type => 'text' },
-  cp_satphone    => { type => 'text' },
-  cp_satfax      => { type => 'text' },
-  cp_project     => { type => 'text' },
-  cp_privatphone => { type => 'text' },
+  cp_name        => { type => 'varchar', length => 75 },
+  cp_phone1      => { type => 'varchar', length => 75 },
+  cp_phone2      => { type => 'varchar', length => 75 },
+  cp_position    => { type => 'varchar', length => 75 },
   cp_privatemail => { type => 'text' },
-  cp_abteilung   => { type => 'text' },
-  cp_gender      => { type => 'character', length => 1 },
+  cp_privatphone => { type => 'text' },
+  cp_project     => { type => 'text' },
+  cp_satfax      => { type => 'text' },
+  cp_satphone    => { type => 'text' },
   cp_street      => { type => 'text' },
+  cp_title       => { type => 'varchar', length => 75 },
   cp_zipcode     => { type => 'text' },
-  cp_city        => { type => 'text' },
-  cp_birthday    => { type => 'date' },
-  cp_position    => { type => 'varchar', length => 75 },
+  itime          => { type => 'timestamp', default => 'now()' },
+  mtime          => { type => 'timestamp' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'cp_id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index a435f80000d6666a104f15c8ec9008ed6dc697cb..7a163b231f6259743d2d2b103b536a17f1563fee 100644 (file)
@@ -10,15 +10,13 @@ __PACKAGE__->meta->table('csv_import_profiles');
 
 __PACKAGE__->meta->columns(
   id         => { type => 'serial', not_null => 1 },
-  name       => { type => 'text', not_null => 1 },
-  type       => { type => 'varchar', length => 20, not_null => 1 },
   is_default => { type => 'boolean', default => 'false' },
   login      => { type => 'text' },
+  name       => { type => 'text', not_null => 1 },
+  type       => { type => 'varchar', length => 20, not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 17900bd4e25100a4c2635cf3fb9427eb8b81420a..433153923a30f9192066ecbf035f69ba2d544854 100644 (file)
@@ -9,8 +9,8 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('csv_import_profile_settings');
 
 __PACKAGE__->meta->columns(
-  id                    => { type => 'serial', not_null => 1 },
   csv_import_profile_id => { type => 'integer', not_null => 1 },
+  id                    => { type => 'serial', not_null => 1 },
   key                   => { type => 'text', not_null => 1 },
   value                 => { type => 'text' },
 );
@@ -26,7 +26,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 23d411b9636ebb42a35c3f6568d4f47eaaa24be1..9b2fc3972d565d536d5c1940d9c66e19d9e21c3c 100644 (file)
@@ -9,12 +9,12 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('csv_import_reports');
 
 __PACKAGE__->meta->columns(
+  file       => { type => 'text', not_null => 1 },
   id         => { type => 'serial', not_null => 1 },
-  session_id => { type => 'text', not_null => 1 },
+  numrows    => { type => 'integer', not_null => 1 },
   profile_id => { type => 'integer', not_null => 1 },
+  session_id => { type => 'text', not_null => 1 },
   type       => { type => 'text', not_null => 1 },
-  file       => { type => 'text', not_null => 1 },
-  numrows    => { type => 'integer', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -26,7 +26,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 9814a64edbd0b5ed8051770824954b1f16e2377c..0dea93e9151a6856044ea0d216cc2790aa27617c 100644 (file)
@@ -9,9 +9,9 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('csv_import_report_rows');
 
 __PACKAGE__->meta->columns(
-  id                   => { type => 'serial', not_null => 1 },
-  csv_import_report_id => { type => 'integer', not_null => 1 },
   col                  => { type => 'integer', not_null => 1 },
+  csv_import_report_id => { type => 'integer', not_null => 1 },
+  id                   => { type => 'serial', not_null => 1 },
   row                  => { type => 'integer', not_null => 1 },
   value                => { type => 'text' },
 );
@@ -25,7 +25,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 89f02a417ebf7ec682d49351dd655aa9386ad370..f816079bf93b26dd4e7c22e3416da7fbf563fd83 100644 (file)
@@ -9,8 +9,8 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('csv_import_report_status');
 
 __PACKAGE__->meta->columns(
-  id                   => { type => 'serial', not_null => 1 },
   csv_import_report_id => { type => 'integer', not_null => 1 },
+  id                   => { type => 'serial', not_null => 1 },
   row                  => { type => 'integer', not_null => 1 },
   type                 => { type => 'text', not_null => 1 },
   value                => { type => 'text' },
@@ -25,7 +25,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 40bb6ee6ed4018cfcdb625e3b509899caaf7938f..5d7d6138d5e10d1b2fcccef898a9797903fb59af 100644 (file)
@@ -17,7 +17,5 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->unique_keys([ 'name' ]);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 907d78d58622d14d95e6adb9302f9a6ce071f25c..81af026fba6ef2d3b79b6d67cc1572748f039c77 100644 (file)
@@ -9,16 +9,16 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('custom_variables');
 
 __PACKAGE__->meta->columns(
-  id              => { type => 'integer', not_null => 1, sequence => 'custom_variables_id' },
-  config_id       => { type => 'integer', not_null => 1 },
-  trans_id        => { type => 'integer', not_null => 1 },
   bool_value      => { type => 'boolean' },
-  timestamp_value => { type => 'timestamp' },
-  text_value      => { type => 'text' },
-  number_value    => { type => 'numeric', precision => 5, scale => 25 },
+  config_id       => { type => 'integer', not_null => 1 },
+  id              => { type => 'integer', not_null => 1, sequence => 'custom_variables_id' },
   itime           => { type => 'timestamp', default => 'now()' },
   mtime           => { type => 'timestamp' },
+  number_value    => { type => 'numeric', precision => 5, scale => 25 },
   sub_module      => { type => 'text', default => '', not_null => 1 },
+  text_value      => { type => 'text' },
+  timestamp_value => { type => 'timestamp' },
+  trans_id        => { type => 'integer', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -32,7 +32,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 9ebed947e8a9750849492280cce72c43fa69b5ec..fb89589b6cfe2d28186ddaef2ea8c84ebc2ffddb 100644 (file)
@@ -9,27 +9,25 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('custom_variable_configs');
 
 __PACKAGE__->meta->columns(
-  id                  => { type => 'integer', not_null => 1, sequence => 'custom_variable_configs_id' },
-  name                => { type => 'text', not_null => 1 },
-  description         => { type => 'text', not_null => 1 },
-  type                => { type => 'text', not_null => 1 },
-  module              => { type => 'text', not_null => 1 },
   default_value       => { type => 'text' },
-  options             => { type => 'text' },
-  searchable          => { type => 'boolean', not_null => 1 },
+  description         => { type => 'text', not_null => 1 },
+  flags               => { type => 'text' },
+  id                  => { type => 'integer', not_null => 1, sequence => 'custom_variable_configs_id' },
   includeable         => { type => 'boolean', not_null => 1 },
   included_by_default => { type => 'boolean', not_null => 1 },
-  sortkey             => { type => 'integer', not_null => 1 },
   itime               => { type => 'timestamp', default => 'now()' },
+  module              => { type => 'text', not_null => 1 },
   mtime               => { type => 'timestamp' },
-  flags               => { type => 'text' },
+  name                => { type => 'text', not_null => 1 },
+  options             => { type => 'text' },
+  searchable          => { type => 'boolean', not_null => 1 },
+  sortkey             => { type => 'integer', not_null => 1 },
+  type                => { type => 'text', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 3757ddcc165910ac9de9ac4ba38c4d92807c5457..a3750b7e18e1588d68ce8758c76fbdc6092b2795 100644 (file)
@@ -9,10 +9,10 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('custom_variables_validity');
 
 __PACKAGE__->meta->columns(
-  id        => { type => 'integer', not_null => 1, sequence => 'id' },
   config_id => { type => 'integer', not_null => 1 },
-  trans_id  => { type => 'integer', not_null => 1 },
+  id        => { type => 'integer', not_null => 1, sequence => 'id' },
   itime     => { type => 'timestamp', default => 'now()' },
+  trans_id  => { type => 'integer', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -26,7 +26,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index bd54c07e5d64176c953907268bcc1f33a6c81ea3..1752d2a162a4d9ce45b11df423cf6556e052b9a7 100644 (file)
@@ -9,51 +9,51 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('customer');
 
 __PACKAGE__->meta->columns(
-  id                  => { type => 'integer', not_null => 1, sequence => 'id' },
-  name                => { type => 'text', not_null => 1 },
-  department_1        => { type => 'varchar', length => 75 },
-  department_2        => { type => 'varchar', length => 75 },
-  street              => { type => 'varchar', length => 75 },
-  zipcode             => { type => 'varchar', length => 10 },
+  account_number      => { type => 'text' },
+  bank                => { type => 'text' },
+  bank_code           => { type => 'text' },
+  bcc                 => { type => 'text' },
+  bic                 => { type => 'varchar', length => 100 },
+  business_id         => { type => 'integer' },
+  c_vendor_id         => { type => 'text' },
+  cc                  => { type => 'text' },
   city                => { type => 'varchar', length => 75 },
-  country             => { type => 'varchar', length => 75 },
   contact             => { type => 'text' },
-  phone               => { type => 'text' },
-  fax                 => { type => 'varchar', length => 30 },
-  homepage            => { type => 'text' },
-  email               => { type => 'text' },
-  notes               => { type => 'text' },
-  discount            => { type => 'float', precision => 4 },
-  taxincluded         => { type => 'boolean' },
+  country             => { type => 'varchar', length => 75 },
   creditlimit         => { type => 'numeric', default => '0', precision => 5, scale => 15 },
-  terms               => { type => 'integer', default => '0' },
+  currency_id         => { type => 'integer', not_null => 1 },
   customernumber      => { type => 'text' },
-  cc                  => { type => 'text' },
-  bcc                 => { type => 'text' },
-  business_id         => { type => 'integer' },
-  taxnumber           => { type => 'text' },
-  account_number      => { type => 'text' },
-  bank_code           => { type => 'text' },
-  bank                => { type => 'text' },
-  language            => { type => 'varchar', length => 5 },
+  department_1        => { type => 'varchar', length => 75 },
+  department_2        => { type => 'varchar', length => 75 },
+  direct_debit        => { type => 'boolean', default => 'false' },
+  discount            => { type => 'float', precision => 4 },
+  email               => { type => 'text' },
+  fax                 => { type => 'varchar', length => 30 },
+  greeting            => { type => 'text' },
+  homepage            => { type => 'text' },
+  iban                => { type => 'varchar', length => 100 },
+  id                  => { type => 'integer', not_null => 1, sequence => 'id' },
   itime               => { type => 'timestamp', default => 'now()' },
-  mtime               => { type => 'timestamp' },
-  obsolete            => { type => 'boolean', default => 'false' },
-  username            => { type => 'varchar', length => 50 },
-  user_password       => { type => 'text' },
-  salesman_id         => { type => 'integer' },
-  c_vendor_id         => { type => 'text' },
   klass               => { type => 'integer', default => '0' },
+  language            => { type => 'varchar', length => 5 },
   language_id         => { type => 'integer' },
+  mtime               => { type => 'timestamp' },
+  name                => { type => 'text', not_null => 1 },
+  notes               => { type => 'text' },
+  obsolete            => { type => 'boolean', default => 'false' },
   payment_id          => { type => 'integer' },
+  phone               => { type => 'text' },
+  salesman_id         => { type => 'integer' },
+  street              => { type => 'varchar', length => 75 },
+  taxincluded         => { type => 'boolean' },
+  taxincluded_checked => { type => 'boolean' },
+  taxnumber           => { type => 'text' },
   taxzone_id          => { type => 'integer', default => '0', not_null => 1 },
-  greeting            => { type => 'text' },
+  terms               => { type => 'integer', default => '0' },
+  user_password       => { type => 'text' },
+  username            => { type => 'varchar', length => 50 },
   ustid               => { type => 'text' },
-  direct_debit        => { type => 'boolean', default => 'false' },
-  iban                => { type => 'varchar', length => 100 },
-  bic                 => { type => 'varchar', length => 100 },
-  taxincluded_checked => { type => 'boolean' },
-  currency_id         => { type => 'integer', not_null => 1 },
+  zipcode             => { type => 'varchar', length => 10 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -82,7 +82,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index c0d7feee92a6eda95a2b80709dab97339af28208..0b187c5088043c9a555476fc2c2d9ea45a14678f 100644 (file)
@@ -9,22 +9,20 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('datev');
 
 __PACKAGE__->meta->columns(
-  beraternr      => { type => 'varchar', length => 7 },
+  abrechnungsnr  => { type => 'varchar', length => 6 },
   beratername    => { type => 'varchar', length => 9 },
-  mandantennr    => { type => 'varchar', length => 5 },
-  dfvkz          => { type => 'varchar', length => 2 },
+  beraternr      => { type => 'varchar', length => 7 },
   datentraegernr => { type => 'varchar', length => 3 },
-  abrechnungsnr  => { type => 'varchar', length => 6 },
+  dfvkz          => { type => 'varchar', length => 2 },
+  id             => { type => 'serial', not_null => 1 },
   itime          => { type => 'timestamp', default => 'now()' },
+  mandantennr    => { type => 'varchar', length => 5 },
   mtime          => { type => 'timestamp' },
-  id             => { type => 'serial', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 95ced883d76d9d9273c33e37c4c1a7fffc82835f..f6e5ffcb3da23b34fdf1c8d7fb92baff91be7bcd 100644 (file)
@@ -9,86 +9,86 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('defaults');
 
 __PACKAGE__->meta->columns(
-  inventory_accno_id                      => { type => 'integer' },
-  income_accno_id                         => { type => 'integer' },
-  expense_accno_id                        => { type => 'integer' },
-  fxgain_accno_id                         => { type => 'integer' },
-  fxloss_accno_id                         => { type => 'integer' },
-  invnumber                               => { type => 'text' },
-  sonumber                                => { type => 'text' },
-  weightunit                              => { type => 'varchar', length => 5 },
+  accounting_method                       => { type => 'text' },
+  address                                 => { type => 'text' },
+  ap_changeable                           => { type => 'integer', default => 2, not_null => 1 },
+  ap_show_mark_as_paid                    => { type => 'boolean', default => 'true' },
+  ar_changeable                           => { type => 'integer', default => 2, not_null => 1 },
+  ar_paid_accno_id                        => { type => 'integer' },
+  ar_show_mark_as_paid                    => { type => 'boolean', default => 'true' },
+  articlenumber                           => { type => 'text' },
+  assemblynumber                          => { type => 'text' },
+  audittrail                              => { type => 'boolean', default => 'false' },
+  bin_id                                  => { type => 'integer' },
+  bin_id_ignore_onhand                    => { type => 'integer' },
   businessnumber                          => { type => 'text' },
-  version                                 => { type => 'varchar', length => 8 },
   closedto                                => { type => 'date' },
-  revtrans                                => { type => 'boolean', default => 'false' },
-  ponumber                                => { type => 'text' },
-  sqnumber                                => { type => 'text' },
-  rfqnumber                               => { type => 'text' },
-  customernumber                          => { type => 'text' },
-  vendornumber                            => { type => 'text' },
-  audittrail                              => { type => 'boolean', default => 'false' },
-  articlenumber                           => { type => 'text' },
-  servicenumber                           => { type => 'text' },
-  coa                                     => { type => 'text' },
-  itime                                   => { type => 'timestamp', default => 'now()' },
-  mtime                                   => { type => 'timestamp' },
-  rmanumber                               => { type => 'text' },
   cnnumber                                => { type => 'text' },
-  accounting_method                       => { type => 'text' },
-  inventory_system                        => { type => 'text' },
-  profit_determination                    => { type => 'text' },
+  co_ustid                                => { type => 'text' },
+  coa                                     => { type => 'text' },
+  company                                 => { type => 'text' },
+  currency_id                             => { type => 'integer', not_null => 1 },
+  customernumber                          => { type => 'text' },
+  datev_check_on_ap_transaction           => { type => 'boolean', default => 'true' },
+  datev_check_on_ar_transaction           => { type => 'boolean', default => 'true' },
+  datev_check_on_gl_transaction           => { type => 'boolean', default => 'true' },
+  datev_check_on_purchase_invoice         => { type => 'boolean', default => 'true' },
+  datev_check_on_sales_invoice            => { type => 'boolean', default => 'true' },
+  dunning_ar                              => { type => 'integer' },
   dunning_ar_amount_fee                   => { type => 'integer' },
   dunning_ar_amount_interest              => { type => 'integer' },
-  dunning_ar                              => { type => 'integer' },
-  pdonumber                               => { type => 'text' },
-  sdonumber                               => { type => 'text' },
-  ar_paid_accno_id                        => { type => 'integer' },
+  duns                                    => { type => 'text' },
+  expense_accno_id                        => { type => 'integer' },
+  fxgain_accno_id                         => { type => 'integer' },
+  fxloss_accno_id                         => { type => 'integer' },
+  gl_changeable                           => { type => 'integer', default => 2, not_null => 1 },
   id                                      => { type => 'serial', not_null => 1 },
+  income_accno_id                         => { type => 'integer' },
+  inventory_accno_id                      => { type => 'integer' },
+  inventory_system                        => { type => 'text' },
+  invnumber                               => { type => 'text' },
+  ir_changeable                           => { type => 'integer', default => 2, not_null => 1 },
+  ir_show_mark_as_paid                    => { type => 'boolean', default => 'true' },
+  is_changeable                           => { type => 'integer', default => 2, not_null => 1 },
+  is_show_mark_as_paid                    => { type => 'boolean', default => 'true' },
+  itime                                   => { type => 'timestamp', default => 'now()' },
   language_id                             => { type => 'integer' },
-  datev_check_on_sales_invoice            => { type => 'boolean', default => 'true' },
-  datev_check_on_purchase_invoice         => { type => 'boolean', default => 'true' },
-  datev_check_on_ar_transaction           => { type => 'boolean', default => 'true' },
-  datev_check_on_ap_transaction           => { type => 'boolean', default => 'true' },
-  datev_check_on_gl_transaction           => { type => 'boolean', default => 'true' },
+  max_future_booking_interval             => { type => 'integer', default => 360 },
+  mtime                                   => { type => 'timestamp' },
+  parts_image_css                         => { type => 'text', default => 'border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px;' },
+  parts_listing_image                     => { type => 'boolean', default => 'true' },
+  parts_show_image                        => { type => 'boolean', default => 'true' },
   payments_changeable                     => { type => 'integer', default => '0', not_null => 1 },
-  is_changeable                           => { type => 'integer', default => 2, not_null => 1 },
-  ir_changeable                           => { type => 'integer', default => 2, not_null => 1 },
-  ar_changeable                           => { type => 'integer', default => 2, not_null => 1 },
-  ap_changeable                           => { type => 'integer', default => 2, not_null => 1 },
-  gl_changeable                           => { type => 'integer', default => 2, not_null => 1 },
-  show_bestbefore                         => { type => 'boolean', default => 'false' },
-  sales_order_show_delete                 => { type => 'boolean', default => 'true' },
+  pdonumber                               => { type => 'text' },
+  ponumber                                => { type => 'text' },
+  profit_determination                    => { type => 'text' },
+  purchase_delivery_order_show_delete     => { type => 'boolean', default => 'true' },
   purchase_order_show_delete              => { type => 'boolean', default => 'true' },
+  revtrans                                => { type => 'boolean', default => 'false' },
+  rfqnumber                               => { type => 'text' },
+  rmanumber                               => { type => 'text' },
   sales_delivery_order_show_delete        => { type => 'boolean', default => 'true' },
-  purchase_delivery_order_show_delete     => { type => 'boolean', default => 'true' },
-  is_show_mark_as_paid                    => { type => 'boolean', default => 'true' },
-  ir_show_mark_as_paid                    => { type => 'boolean', default => 'true' },
-  ar_show_mark_as_paid                    => { type => 'boolean', default => 'true' },
-  ap_show_mark_as_paid                    => { type => 'boolean', default => 'true' },
-  warehouse_id                            => { type => 'integer' },
-  bin_id                                  => { type => 'integer' },
-  max_future_booking_interval             => { type => 'integer', default => 360 },
-  assemblynumber                          => { type => 'text' },
+  sales_order_show_delete                 => { type => 'boolean', default => 'true' },
+  sdonumber                               => { type => 'text' },
+  sepa_creditor_id                        => { type => 'text' },
+  servicenumber                           => { type => 'text' },
+  show_bestbefore                         => { type => 'boolean', default => 'false' },
   show_weight                             => { type => 'boolean', default => 'false', not_null => 1 },
+  sonumber                                => { type => 'text' },
+  sqnumber                                => { type => 'text' },
+  taxnumber                               => { type => 'text' },
+  templates                               => { type => 'text' },
   transfer_default                        => { type => 'boolean', default => 'true' },
-  transfer_default_use_master_default_bin => { type => 'boolean', default => 'false' },
   transfer_default_ignore_onhand          => { type => 'boolean', default => 'false' },
+  transfer_default_use_master_default_bin => { type => 'boolean', default => 'false' },
+  vendornumber                            => { type => 'text' },
+  version                                 => { type => 'varchar', length => 8 },
+  vertreter                               => { type => 'boolean', default => 'false' },
+  warehouse_id                            => { type => 'integer' },
   warehouse_id_ignore_onhand              => { type => 'integer' },
-  bin_id_ignore_onhand                    => { type => 'integer' },
-  currency_id                             => { type => 'integer', not_null => 1 },
-  company                                 => { type => 'text' },
-  address                                 => { type => 'text' },
-  taxnumber                               => { type => 'text' },
-  co_ustid                                => { type => 'text' },
-  duns                                    => { type => 'text' },
-  sepa_creditor_id                        => { type => 'text' },
-  templates                               => { type => 'text' },
   webdav                                  => { type => 'boolean', default => 'false' },
   webdav_documents                        => { type => 'boolean', default => 'false' },
-  vertreter                               => { type => 'boolean', default => 'false' },
-  parts_show_image                        => { type => 'boolean', default => 'true' },
-  parts_listing_image                     => { type => 'boolean', default => 'true' },
-  parts_image_css                         => { type => 'text', default => 'border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px;' },
+  weightunit                              => { type => 'varchar', length => 5 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -122,7 +122,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index f6e1aabfb1f0e919d8f7436c15622e894060b43e..92d45ae14860ea4ff6bd0aec81c8d90489d666c0 100644 (file)
@@ -9,36 +9,36 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('delivery_orders');
 
 __PACKAGE__->meta->columns(
-  id                      => { type => 'integer', not_null => 1, sequence => 'id' },
-  donumber                => { type => 'text', not_null => 1 },
-  ordnumber               => { type => 'text' },
-  transdate               => { type => 'date', default => 'now()' },
-  vendor_id               => { type => 'integer' },
-  customer_id             => { type => 'integer' },
-  reqdate                 => { type => 'date' },
-  shippingpoint           => { type => 'text' },
-  notes                   => { type => 'text' },
-  intnotes                => { type => 'text' },
-  employee_id             => { type => 'integer' },
   closed                  => { type => 'boolean', default => 'false' },
-  delivered               => { type => 'boolean', default => 'false' },
+  cp_id                   => { type => 'integer' },
+  currency_id             => { type => 'integer', not_null => 1 },
   cusordnumber            => { type => 'text' },
-  oreqnumber              => { type => 'text' },
+  customer_id             => { type => 'integer' },
+  delivered               => { type => 'boolean', default => 'false' },
   department_id           => { type => 'integer' },
-  shipvia                 => { type => 'text' },
-  cp_id                   => { type => 'integer' },
-  language_id             => { type => 'integer' },
-  shipto_id               => { type => 'integer' },
+  donumber                => { type => 'text', not_null => 1 },
+  employee_id             => { type => 'integer' },
   globalproject_id        => { type => 'integer' },
-  salesman_id             => { type => 'integer' },
-  transaction_description => { type => 'text' },
+  id                      => { type => 'integer', not_null => 1, sequence => 'id' },
+  intnotes                => { type => 'text' },
   is_sales                => { type => 'boolean' },
   itime                   => { type => 'timestamp', default => 'now()' },
+  language_id             => { type => 'integer' },
   mtime                   => { type => 'timestamp' },
-  taxzone_id              => { type => 'integer' },
+  notes                   => { type => 'text' },
+  ordnumber               => { type => 'text' },
+  oreqnumber              => { type => 'text' },
+  reqdate                 => { type => 'date' },
+  salesman_id             => { type => 'integer' },
+  shippingpoint           => { type => 'text' },
+  shipto_id               => { type => 'integer' },
+  shipvia                 => { type => 'text' },
   taxincluded             => { type => 'boolean' },
+  taxzone_id              => { type => 'integer' },
   terms                   => { type => 'integer' },
-  currency_id             => { type => 'integer', not_null => 1 },
+  transaction_description => { type => 'text' },
+  transdate               => { type => 'date', default => 'now()' },
+  vendor_id               => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -97,7 +97,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 608e3a32e583ddcae2aba0151c6213dea17cfc3a..7735c9ea891ef6f4d23ed0dc11156576b305bd5e 100644 (file)
@@ -9,29 +9,29 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('delivery_order_items');
 
 __PACKAGE__->meta->columns(
-  id                 => { type => 'integer', not_null => 1, sequence => 'delivery_order_items_id' },
+  base_qty           => { type => 'float', precision => 4 },
+  cusordnumber       => { type => 'text' },
   delivery_order_id  => { type => 'integer', not_null => 1 },
-  parts_id           => { type => 'integer', not_null => 1 },
   description        => { type => 'text' },
-  qty                => { type => 'numeric', precision => 5, scale => 25 },
-  sellprice          => { type => 'numeric', precision => 5, scale => 15 },
   discount           => { type => 'float', precision => 4 },
+  id                 => { type => 'integer', not_null => 1, sequence => 'delivery_order_items_id' },
+  itime              => { type => 'timestamp', default => 'now()' },
+  lastcost           => { type => 'numeric', precision => 5, scale => 15 },
+  longdescription    => { type => 'text' },
+  marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
+  mtime              => { type => 'timestamp' },
+  ordnumber          => { type => 'text' },
+  parts_id           => { type => 'integer', not_null => 1 },
+  price_factor       => { type => 'numeric', default => 1, precision => 5, scale => 15 },
+  price_factor_id    => { type => 'integer' },
+  pricegroup_id      => { type => 'integer' },
   project_id         => { type => 'integer' },
+  qty                => { type => 'numeric', precision => 5, scale => 25 },
   reqdate            => { type => 'date' },
+  sellprice          => { type => 'numeric', precision => 5, scale => 15 },
   serialnumber       => { type => 'text' },
-  ordnumber          => { type => 'text' },
   transdate          => { type => 'text' },
-  cusordnumber       => { type => 'text' },
   unit               => { type => 'varchar', length => 20 },
-  base_qty           => { type => 'float', precision => 4 },
-  longdescription    => { type => 'text' },
-  lastcost           => { type => 'numeric', precision => 5, scale => 15 },
-  price_factor_id    => { type => 'integer' },
-  price_factor       => { type => 'numeric', default => 1, precision => 5, scale => 15 },
-  marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
-  itime              => { type => 'timestamp', default => 'now()' },
-  mtime              => { type => 'timestamp' },
-  pricegroup_id      => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -65,7 +65,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 52e78e8eca4f002a82ee0e7537aa5b44fc41fecf..4263531f6012734e192ed35416f9c01dd0ede217 100644 (file)
@@ -9,16 +9,16 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('delivery_order_items_stock');
 
 __PACKAGE__->meta->columns(
-  id                     => { type => 'integer', not_null => 1, sequence => 'id' },
-  delivery_order_item_id => { type => 'integer', not_null => 1 },
-  qty                    => { type => 'numeric', not_null => 1, precision => 5, scale => 15 },
-  unit                   => { type => 'varchar', length => 20, not_null => 1 },
-  warehouse_id           => { type => 'integer', not_null => 1 },
+  bestbefore             => { type => 'date' },
   bin_id                 => { type => 'integer', not_null => 1 },
   chargenumber           => { type => 'text' },
+  delivery_order_item_id => { type => 'integer', not_null => 1 },
+  id                     => { type => 'integer', not_null => 1, sequence => 'id' },
   itime                  => { type => 'timestamp', default => 'now()' },
   mtime                  => { type => 'timestamp' },
-  bestbefore             => { type => 'date' },
+  qty                    => { type => 'numeric', not_null => 1, precision => 5, scale => 15 },
+  unit                   => { type => 'varchar', length => 20, not_null => 1 },
+  warehouse_id           => { type => 'integer', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -42,7 +42,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 244bb7989a930708826ab1f9bbe34bf006316e5c..f3e049857128d172027dcc4a358695f5b0454121 100644 (file)
@@ -9,8 +9,8 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('department');
 
 __PACKAGE__->meta->columns(
-  id          => { type => 'integer', not_null => 1, sequence => 'id' },
   description => { type => 'text' },
+  id          => { type => 'integer', not_null => 1, sequence => 'id' },
   itime       => { type => 'timestamp', default => 'now()' },
   mtime       => { type => 'timestamp' },
 );
@@ -19,7 +19,5 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 0a24c4b488d30a62d1be9b9d917188323fce2109..997167f6597ee93126317139792341fffe43daf2 100644 (file)
@@ -9,13 +9,13 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('drafts');
 
 __PACKAGE__->meta->columns(
+  description => { type => 'text' },
+  employee_id => { type => 'integer' },
+  form        => { type => 'text' },
   id          => { type => 'varchar', length => 50, not_null => 1 },
+  itime       => { type => 'timestamp', default => 'now()' },
   module      => { type => 'varchar', length => 50, not_null => 1 },
   submodule   => { type => 'varchar', length => 50, not_null => 1 },
-  description => { type => 'text' },
-  itime       => { type => 'timestamp', default => 'now()' },
-  form        => { type => 'text' },
-  employee_id => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -29,7 +29,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 6e1bb6d765810f5e157ce263c7a263f40334664e..7de6fc8cf316493d6c704931a9e226cf5e929899 100644 (file)
@@ -9,18 +9,18 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('dunning');
 
 __PACKAGE__->meta->columns(
-  id                 => { type => 'integer', not_null => 1, sequence => 'id' },
-  trans_id           => { type => 'integer' },
+  duedate            => { type => 'date' },
+  dunning_config_id  => { type => 'integer' },
   dunning_id         => { type => 'integer' },
   dunning_level      => { type => 'integer' },
-  transdate          => { type => 'date' },
-  duedate            => { type => 'date' },
   fee                => { type => 'numeric', precision => 5, scale => 15 },
+  fee_interest_ar_id => { type => 'integer' },
+  id                 => { type => 'integer', not_null => 1, sequence => 'id' },
   interest           => { type => 'numeric', precision => 5, scale => 15 },
-  dunning_config_id  => { type => 'integer' },
   itime              => { type => 'timestamp', default => 'now()' },
   mtime              => { type => 'timestamp' },
-  fee_interest_ar_id => { type => 'integer' },
+  trans_id           => { type => 'integer' },
+  transdate          => { type => 'date' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -39,7 +39,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index c041917fbf39f7b4f6e3f6577785c3150d6a64e6..61e2db30f6151481c5de5fc2b97813ae6aa3df8d 100644 (file)
@@ -9,26 +9,24 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('dunning_config');
 
 __PACKAGE__->meta->columns(
-  id                       => { type => 'integer', not_null => 1, sequence => 'id' },
-  dunning_level            => { type => 'integer' },
-  dunning_description      => { type => 'text' },
   active                   => { type => 'boolean' },
   auto                     => { type => 'boolean' },
+  create_invoices_for_fees => { type => 'boolean', default => 'true' },
+  dunning_description      => { type => 'text' },
+  dunning_level            => { type => 'integer' },
   email                    => { type => 'boolean' },
-  terms                    => { type => 'integer' },
-  payment_terms            => { type => 'integer' },
-  fee                      => { type => 'numeric', precision => 5, scale => 15 },
-  interest_rate            => { type => 'numeric', precision => 5, scale => 15 },
+  email_attachment         => { type => 'boolean' },
   email_body               => { type => 'text' },
   email_subject            => { type => 'text' },
-  email_attachment         => { type => 'boolean' },
+  fee                      => { type => 'numeric', precision => 5, scale => 15 },
+  id                       => { type => 'integer', not_null => 1, sequence => 'id' },
+  interest_rate            => { type => 'numeric', precision => 5, scale => 15 },
+  payment_terms            => { type => 'integer' },
   template                 => { type => 'text' },
-  create_invoices_for_fees => { type => 'boolean', default => 'true' },
+  terms                    => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 7fabdc79aec3ac50f9ebdf75f8ceeed2bdb046eb..b79d078fa3f37232d56617c27d5075c4a0ed2bf3 100644 (file)
@@ -9,22 +9,22 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('employee');
 
 __PACKAGE__->meta->columns(
-  id        => { type => 'integer', not_null => 1, sequence => 'id' },
-  login     => { type => 'text' },
-  startdate => { type => 'date', default => 'now' },
-  enddate   => { type => 'date' },
-  notes     => { type => 'text' },
-  sales     => { type => 'boolean', default => 'true' },
-  itime     => { type => 'timestamp', default => 'now()' },
-  mtime     => { type => 'timestamp' },
-  name      => { type => 'text' },
   addr1     => { type => 'text' },
   addr2     => { type => 'text' },
   addr3     => { type => 'text' },
   addr4     => { type => 'text' },
+  deleted   => { type => 'boolean', default => 'false' },
+  enddate   => { type => 'date' },
   homephone => { type => 'text' },
+  id        => { type => 'integer', not_null => 1, sequence => 'id' },
+  itime     => { type => 'timestamp', default => 'now()' },
+  login     => { type => 'text' },
+  mtime     => { type => 'timestamp' },
+  name      => { type => 'text' },
+  notes     => { type => 'text' },
+  sales     => { type => 'boolean', default => 'true' },
+  startdate => { type => 'date', default => 'now' },
   workphone => { type => 'text' },
-  deleted   => { type => 'boolean', default => 'false' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -33,7 +33,5 @@ __PACKAGE__->meta->unique_keys([ 'login' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 43df5dfd6c43cbcd1a331a13e1326c90188d5ab1..4f83da32a3bf2fedb9f61518e57f07e7766e3d6a 100644 (file)
@@ -9,13 +9,13 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('exchangerate');
 
 __PACKAGE__->meta->columns(
-  transdate   => { type => 'date' },
   buy         => { type => 'numeric', precision => 5, scale => 15 },
-  sell        => { type => 'numeric', precision => 5, scale => 15 },
+  currency_id => { type => 'integer', not_null => 1 },
+  id          => { type => 'serial', not_null => 1 },
   itime       => { type => 'timestamp', default => 'now()' },
   mtime       => { type => 'timestamp' },
-  id          => { type => 'serial', not_null => 1 },
-  currency_id => { type => 'integer', not_null => 1 },
+  sell        => { type => 'numeric', precision => 5, scale => 15 },
+  transdate   => { type => 'date' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -29,7 +29,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 6eceffabb6f1316290e447adb12ac039d4bde3f8..cd44abb048dc92b68918e5e665a0069ff7d5aef5 100644 (file)
@@ -9,32 +9,30 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('finanzamt');
 
 __PACKAGE__->meta->columns(
-  fa_land_nr           => { type => 'text' },
+  fa_bankbezeichnung_1 => { type => 'text' },
+  fa_bankbezeichnung_2 => { type => 'text' },
+  fa_blz_1             => { type => 'text' },
+  fa_blz_2             => { type => 'text' },
   fa_bufa_nr           => { type => 'text' },
+  fa_email             => { type => 'text' },
+  fa_fax               => { type => 'text' },
+  fa_internet          => { type => 'text' },
+  fa_kontonummer_1     => { type => 'text' },
+  fa_kontonummer_2     => { type => 'text' },
+  fa_land_nr           => { type => 'text' },
   fa_name              => { type => 'text' },
-  fa_strasse           => { type => 'text' },
-  fa_plz               => { type => 'text' },
+  fa_oeffnungszeiten   => { type => 'text' },
   fa_ort               => { type => 'text' },
-  fa_telefon           => { type => 'text' },
-  fa_fax               => { type => 'text' },
+  fa_plz               => { type => 'text' },
   fa_plz_grosskunden   => { type => 'text' },
   fa_plz_postfach      => { type => 'text' },
   fa_postfach          => { type => 'text' },
-  fa_blz_1             => { type => 'text' },
-  fa_kontonummer_1     => { type => 'text' },
-  fa_bankbezeichnung_1 => { type => 'text' },
-  fa_blz_2             => { type => 'text' },
-  fa_kontonummer_2     => { type => 'text' },
-  fa_bankbezeichnung_2 => { type => 'text' },
-  fa_oeffnungszeiten   => { type => 'text' },
-  fa_email             => { type => 'text' },
-  fa_internet          => { type => 'text' },
+  fa_strasse           => { type => 'text' },
+  fa_telefon           => { type => 'text' },
   id                   => { type => 'serial', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 8f83c6c73223d968e02e99ea6e8b1da9195d5551..fc461512c8b6e915edad47b8349bd08663eaa6ef 100644 (file)
@@ -9,14 +9,14 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('follow_ups');
 
 __PACKAGE__->meta->columns(
-  id               => { type => 'integer', not_null => 1, sequence => 'follow_up_id' },
-  follow_up_date   => { type => 'date', not_null => 1 },
+  created_by       => { type => 'integer', not_null => 1 },
   created_for_user => { type => 'integer', not_null => 1 },
   done             => { type => 'boolean', default => 'false' },
-  note_id          => { type => 'integer', not_null => 1 },
-  created_by       => { type => 'integer', not_null => 1 },
+  follow_up_date   => { type => 'date', not_null => 1 },
+  id               => { type => 'integer', not_null => 1, sequence => 'follow_up_id' },
   itime            => { type => 'timestamp', default => 'now()' },
   mtime            => { type => 'timestamp' },
+  note_id          => { type => 'integer', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -26,12 +26,12 @@ __PACKAGE__->meta->allow_inline_column_values(1);
 __PACKAGE__->meta->foreign_keys(
   employee => {
     class       => 'SL::DB::Employee',
-    key_columns => { created_for_user => 'id' },
+    key_columns => { created_by => 'id' },
   },
 
   employee_obj => {
     class       => 'SL::DB::Employee',
-    key_columns => { created_by => 'id' },
+    key_columns => { created_for_user => 'id' },
   },
 
   note => {
@@ -40,7 +40,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 55c6f5f145f994c3454d7fb5b0f8ca61e8a3f625..43d53861045bdb132de0b6025763981615a152b4 100644 (file)
@@ -9,9 +9,9 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('follow_up_access');
 
 __PACKAGE__->meta->columns(
-  who  => { type => 'integer', not_null => 1 },
-  what => { type => 'integer', not_null => 1 },
   id   => { type => 'serial', not_null => 1 },
+  what => { type => 'integer', not_null => 1 },
+  who  => { type => 'integer', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -19,16 +19,14 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 __PACKAGE__->meta->foreign_keys(
   employee => {
     class       => 'SL::DB::Employee',
-    key_columns => { who => 'id' },
+    key_columns => { what => 'id' },
   },
 
   employee_obj => {
     class       => 'SL::DB::Employee',
-    key_columns => { what => 'id' },
+    key_columns => { who => 'id' },
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 820c16b0d9a74a9237668e339149ef53ab3f59db..d6946a6bacfa5dceda15157cf8b570bb5e52913b 100644 (file)
@@ -9,13 +9,13 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('follow_up_links');
 
 __PACKAGE__->meta->columns(
-  id           => { type => 'integer', not_null => 1, sequence => 'follow_up_link_id' },
   follow_up_id => { type => 'integer', not_null => 1 },
-  trans_id     => { type => 'integer', not_null => 1 },
-  trans_type   => { type => 'text', not_null => 1 },
-  trans_info   => { type => 'text' },
+  id           => { type => 'integer', not_null => 1, sequence => 'follow_up_link_id' },
   itime        => { type => 'timestamp', default => 'now()' },
   mtime        => { type => 'timestamp' },
+  trans_id     => { type => 'integer', not_null => 1 },
+  trans_info   => { type => 'text' },
+  trans_type   => { type => 'text', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -29,7 +29,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 54dca9aaced2ef96845c53fc2e0945e0aa8f4dc6..33f7121fd8ded3f83b9a20fcf14a8dc8eaf07149 100644 (file)
@@ -9,22 +9,22 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('gl');
 
 __PACKAGE__->meta->columns(
-  id             => { type => 'integer', not_null => 1, sequence => 'glid' },
-  reference      => { type => 'text' },
+  cb_transaction => { type => 'boolean' },
+  department_id  => { type => 'integer' },
   description    => { type => 'text' },
-  transdate      => { type => 'date', default => 'now' },
-  gldate         => { type => 'date', default => 'now' },
   employee_id    => { type => 'integer' },
-  notes          => { type => 'text' },
-  department_id  => { type => 'integer' },
-  taxincluded    => { type => 'boolean' },
+  gldate         => { type => 'date', default => 'now' },
+  id             => { type => 'integer', not_null => 1, sequence => 'glid' },
   itime          => { type => 'timestamp', default => 'now()' },
   mtime          => { type => 'timestamp' },
-  type           => { type => 'text' },
+  notes          => { type => 'text' },
+  ob_transaction => { type => 'boolean' },
+  reference      => { type => 'text' },
   storno         => { type => 'boolean', default => 'false' },
   storno_id      => { type => 'integer' },
-  ob_transaction => { type => 'boolean' },
-  cb_transaction => { type => 'boolean' },
+  taxincluded    => { type => 'boolean' },
+  transdate      => { type => 'date', default => 'now' },
+  type           => { type => 'text' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -43,7 +43,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 94556c76c2c508dd98dbb689cfa84c05ce87b753..863cd3fd0ae7f4253b5960ceee129a356feda4a0 100644 (file)
@@ -11,9 +11,9 @@ __PACKAGE__->meta->table('generic_translations');
 __PACKAGE__->meta->columns(
   id               => { type => 'serial', not_null => 1 },
   language_id      => { type => 'integer' },
-  translation_type => { type => 'varchar', length => 100, not_null => 1 },
-  translation_id   => { type => 'integer' },
   translation      => { type => 'text' },
+  translation_id   => { type => 'integer' },
+  translation_type => { type => 'varchar', length => 100, not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -25,7 +25,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 12486793691ff6db7c138480da374509f56c1e53..ed15384b37e2f84ec05d320f7e20d7d4aae248c3 100644 (file)
@@ -9,13 +9,13 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('history_erp');
 
 __PACKAGE__->meta->columns(
-  id          => { type => 'integer', not_null => 1, sequence => 'id' },
-  trans_id    => { type => 'integer' },
-  employee_id => { type => 'integer' },
   addition    => { type => 'text' },
-  what_done   => { type => 'text' },
+  employee_id => { type => 'integer' },
+  id          => { type => 'integer', not_null => 1, sequence => 'id' },
   itime       => { type => 'timestamp', default => 'now()' },
   snumbers    => { type => 'text' },
+  trans_id    => { type => 'integer' },
+  what_done   => { type => 'text' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -29,7 +29,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 68c5b39056d7cbec4515a9217cdc2c7ed0c8d295..a71f7601e75918cd8c5566fb90892f773b02a232 100644 (file)
@@ -9,23 +9,23 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('inventory');
 
 __PACKAGE__->meta->columns(
-  warehouse_id  => { type => 'integer', not_null => 1 },
-  parts_id      => { type => 'integer', not_null => 1 },
-  oe_id         => { type => 'integer' },
-  orderitems_id => { type => 'integer' },
-  shippingdate  => { type => 'date' },
+  bestbefore    => { type => 'date' },
+  bin_id        => { type => 'integer', not_null => 1 },
+  chargenumber  => { type => 'text', default => '', not_null => 1 },
+  comment       => { type => 'text' },
   employee_id   => { type => 'integer', not_null => 1 },
+  id            => { type => 'serial', not_null => 1 },
   itime         => { type => 'timestamp', default => 'now()' },
   mtime         => { type => 'timestamp' },
-  bin_id        => { type => 'integer', not_null => 1 },
+  oe_id         => { type => 'integer' },
+  orderitems_id => { type => 'integer' },
+  parts_id      => { type => 'integer', not_null => 1 },
+  project_id    => { type => 'integer' },
   qty           => { type => 'numeric', precision => 5, scale => 25 },
+  shippingdate  => { type => 'date' },
   trans_id      => { type => 'integer', not_null => 1 },
   trans_type_id => { type => 'integer', not_null => 1 },
-  project_id    => { type => 'integer' },
-  chargenumber  => { type => 'text', default => '', not_null => 1 },
-  comment       => { type => 'text' },
-  bestbefore    => { type => 'date' },
-  id            => { type => 'serial', not_null => 1 },
+  warehouse_id  => { type => 'integer', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -64,7 +64,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 8a942fc45703ae857f155bd26cb9a0d06e8d504c..eedecb4ad199a47b837c8d1aa36a3357b2918dac 100644 (file)
@@ -9,53 +9,53 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('ar');
 
 __PACKAGE__->meta->columns(
-  id                        => { type => 'integer', not_null => 1, sequence => 'glid' },
-  invnumber                 => { type => 'text', not_null => 1 },
-  transdate                 => { type => 'date', default => 'now' },
-  gldate                    => { type => 'date', default => 'now' },
-  customer_id               => { type => 'integer' },
-  taxincluded               => { type => 'boolean' },
   amount                    => { type => 'numeric', precision => 5, scale => 15 },
-  netamount                 => { type => 'numeric', precision => 5, scale => 15 },
-  paid                      => { type => 'numeric', precision => 5, scale => 15 },
+  cp_id                     => { type => 'integer' },
+  currency_id               => { type => 'integer', not_null => 1 },
+  cusordnumber              => { type => 'text' },
+  customer_id               => { type => 'integer' },
   datepaid                  => { type => 'date' },
-  duedate                   => { type => 'date' },
+  delivery_customer_id      => { type => 'integer' },
+  delivery_vendor_id        => { type => 'integer' },
   deliverydate              => { type => 'date' },
-  invoice                   => { type => 'boolean', default => 'false' },
-  shippingpoint             => { type => 'text' },
-  terms                     => { type => 'integer', default => '0' },
-  notes                     => { type => 'text' },
-  ordnumber                 => { type => 'text' },
+  department_id             => { type => 'integer' },
+  direct_debit              => { type => 'boolean', default => 'false' },
+  donumber                  => { type => 'text' },
+  duedate                   => { type => 'date' },
+  dunning_config_id         => { type => 'integer' },
   employee_id               => { type => 'integer' },
-  quonumber                 => { type => 'text' },
-  cusordnumber              => { type => 'text' },
+  gldate                    => { type => 'date', default => 'now' },
+  globalproject_id          => { type => 'integer' },
+  id                        => { type => 'integer', not_null => 1, sequence => 'glid' },
   intnotes                  => { type => 'text' },
-  department_id             => { type => 'integer' },
-  shipvia                   => { type => 'text' },
+  invnumber                 => { type => 'text', not_null => 1 },
+  invnumber_for_credit_note => { type => 'text' },
+  invoice                   => { type => 'boolean', default => 'false' },
   itime                     => { type => 'timestamp', default => 'now()' },
-  mtime                     => { type => 'timestamp' },
-  cp_id                     => { type => 'integer' },
   language_id               => { type => 'integer' },
-  payment_id                => { type => 'integer' },
-  delivery_customer_id      => { type => 'integer' },
-  delivery_vendor_id        => { type => 'integer' },
-  storno                    => { type => 'boolean', default => 'false' },
-  taxzone_id                => { type => 'integer' },
-  shipto_id                 => { type => 'integer' },
-  type                      => { type => 'text' },
-  dunning_config_id         => { type => 'integer' },
+  marge_percent             => { type => 'numeric', precision => 5, scale => 15 },
+  marge_total               => { type => 'numeric', precision => 5, scale => 15 },
+  mtime                     => { type => 'timestamp' },
+  netamount                 => { type => 'numeric', precision => 5, scale => 15 },
+  notes                     => { type => 'text' },
   orddate                   => { type => 'date' },
+  ordnumber                 => { type => 'text' },
+  paid                      => { type => 'numeric', precision => 5, scale => 15 },
+  payment_id                => { type => 'integer' },
   quodate                   => { type => 'date' },
-  globalproject_id          => { type => 'integer' },
+  quonumber                 => { type => 'text' },
   salesman_id               => { type => 'integer' },
-  transaction_description   => { type => 'text' },
+  shippingpoint             => { type => 'text' },
+  shipto_id                 => { type => 'integer' },
+  shipvia                   => { type => 'text' },
+  storno                    => { type => 'boolean', default => 'false' },
   storno_id                 => { type => 'integer' },
-  marge_total               => { type => 'numeric', precision => 5, scale => 15 },
-  marge_percent             => { type => 'numeric', precision => 5, scale => 15 },
-  donumber                  => { type => 'text' },
-  invnumber_for_credit_note => { type => 'text' },
-  direct_debit              => { type => 'boolean', default => 'false' },
-  currency_id               => { type => 'integer', not_null => 1 },
+  taxincluded               => { type => 'boolean' },
+  taxzone_id                => { type => 'integer' },
+  terms                     => { type => 'integer', default => '0' },
+  transaction_description   => { type => 'text' },
+  transdate                 => { type => 'date', default => 'now' },
+  type                      => { type => 'text' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -124,7 +124,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 1ab85ef95f0c48528565ca2395379432fa9355b6..d527f76f53497cbfb9fd14c1ff8d2c719929c204 100644 (file)
@@ -9,35 +9,35 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('invoice');
 
 __PACKAGE__->meta->columns(
-  id                 => { type => 'integer', not_null => 1, sequence => 'invoiceid' },
-  trans_id           => { type => 'integer' },
-  parts_id           => { type => 'integer' },
-  description        => { type => 'text' },
-  qty                => { type => 'float', precision => 4 },
   allocated          => { type => 'float', precision => 4 },
-  sellprice          => { type => 'numeric', precision => 5, scale => 15 },
-  fxsellprice        => { type => 'numeric', precision => 5, scale => 15 },
-  discount           => { type => 'float', precision => 4 },
   assemblyitem       => { type => 'boolean', default => 'false' },
-  project_id         => { type => 'integer' },
+  base_qty           => { type => 'float', precision => 4 },
+  cusordnumber       => { type => 'text' },
   deliverydate       => { type => 'date' },
-  serialnumber       => { type => 'text' },
+  description        => { type => 'text' },
+  discount           => { type => 'float', precision => 4 },
+  fxsellprice        => { type => 'numeric', precision => 5, scale => 15 },
+  id                 => { type => 'integer', not_null => 1, sequence => 'invoiceid' },
   itime              => { type => 'timestamp', default => 'now()' },
+  lastcost           => { type => 'numeric', precision => 5, scale => 15 },
+  longdescription    => { type => 'text' },
+  marge_percent      => { type => 'numeric', precision => 5, scale => 15 },
+  marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
+  marge_total        => { type => 'numeric', precision => 5, scale => 15 },
   mtime              => { type => 'timestamp' },
-  pricegroup_id      => { type => 'integer' },
   ordnumber          => { type => 'text' },
+  parts_id           => { type => 'integer' },
+  price_factor       => { type => 'numeric', default => 1, precision => 5, scale => 15 },
+  price_factor_id    => { type => 'integer' },
+  pricegroup_id      => { type => 'integer' },
+  project_id         => { type => 'integer' },
+  qty                => { type => 'float', precision => 4 },
+  sellprice          => { type => 'numeric', precision => 5, scale => 15 },
+  serialnumber       => { type => 'text' },
+  subtotal           => { type => 'boolean', default => 'false' },
+  trans_id           => { type => 'integer' },
   transdate          => { type => 'text' },
-  cusordnumber       => { type => 'text' },
   unit               => { type => 'varchar', length => 20 },
-  base_qty           => { type => 'float', precision => 4 },
-  subtotal           => { type => 'boolean', default => 'false' },
-  longdescription    => { type => 'text' },
-  marge_total        => { type => 'numeric', precision => 5, scale => 15 },
-  marge_percent      => { type => 'numeric', precision => 5, scale => 15 },
-  lastcost           => { type => 'numeric', precision => 5, scale => 15 },
-  price_factor_id    => { type => 'integer' },
-  price_factor       => { type => 'numeric', default => 1, precision => 5, scale => 15 },
-  marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -66,7 +66,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 4fd03076b28f97d1c6b5ac9133629fbedb65e93b..ccf4f8353cdf5079e4f0b893889db72e79fcf84f 100644 (file)
@@ -9,22 +9,20 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('language');
 
 __PACKAGE__->meta->columns(
-  id                  => { type => 'integer', not_null => 1, sequence => 'id' },
-  description         => { type => 'text' },
-  template_code       => { type => 'text' },
   article_code        => { type => 'text' },
+  description         => { type => 'text' },
+  id                  => { type => 'integer', not_null => 1, sequence => 'id' },
   itime               => { type => 'timestamp', default => 'now()' },
   mtime               => { type => 'timestamp' },
-  output_numberformat => { type => 'text' },
   output_dateformat   => { type => 'text' },
   output_longdates    => { type => 'boolean' },
+  output_numberformat => { type => 'text' },
+  template_code       => { type => 'text' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 7d724e861d8896fd9acbdfaf11b762b25f2d9043..64f4d2a8547cfed18596a34bab9c3a64b3a92f4c 100644 (file)
@@ -9,14 +9,14 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('makemodel');
 
 __PACKAGE__->meta->columns(
-  parts_id   => { type => 'integer' },
-  model      => { type => 'text' },
-  itime      => { type => 'timestamp', default => 'now()' },
-  mtime      => { type => 'timestamp' },
-  make       => { type => 'integer' },
   id         => { type => 'serial', not_null => 1 },
+  itime      => { type => 'timestamp', default => 'now()' },
   lastcost   => { type => 'numeric', precision => 5, scale => 15 },
   lastupdate => { type => 'date' },
+  make       => { type => 'integer' },
+  model      => { type => 'text' },
+  mtime      => { type => 'timestamp' },
+  parts_id   => { type => 'integer' },
   sortorder  => { type => 'integer' },
 );
 
@@ -24,7 +24,5 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 7d2dd593c6d0c931c4e7359e0d371d4b426b7eea..1e94da7aa4e6bbd04c33316c442a1e8a6449ebbe 100644 (file)
@@ -9,14 +9,14 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('notes');
 
 __PACKAGE__->meta->columns(
-  id           => { type => 'integer', not_null => 1, sequence => 'note_id' },
-  subject      => { type => 'text' },
   body         => { type => 'text' },
   created_by   => { type => 'integer', not_null => 1 },
-  trans_id     => { type => 'integer' },
-  trans_module => { type => 'varchar', length => 10 },
+  id           => { type => 'integer', not_null => 1, sequence => 'note_id' },
   itime        => { type => 'timestamp', default => 'now()' },
   mtime        => { type => 'timestamp' },
+  subject      => { type => 'text' },
+  trans_id     => { type => 'integer' },
+  trans_module => { type => 'varchar', length => 10 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -30,7 +30,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 467b5b4e1e0714651edcbc0a20aa0f9a780c5346..249ea62fc75cd50be97765b89845fae77f009666 100644 (file)
@@ -9,42 +9,42 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('oe');
 
 __PACKAGE__->meta->columns(
-  id                      => { type => 'integer', not_null => 1, sequence => 'id' },
-  ordnumber               => { type => 'text', not_null => 1 },
-  transdate               => { type => 'date', default => 'now' },
-  vendor_id               => { type => 'integer' },
-  customer_id             => { type => 'integer' },
   amount                  => { type => 'numeric', precision => 5, scale => 15 },
-  netamount               => { type => 'numeric', precision => 5, scale => 15 },
-  reqdate                 => { type => 'date' },
-  taxincluded             => { type => 'boolean' },
-  shippingpoint           => { type => 'text' },
-  notes                   => { type => 'text' },
-  employee_id             => { type => 'integer' },
   closed                  => { type => 'boolean', default => 'false' },
-  quotation               => { type => 'boolean', default => 'false' },
-  quonumber               => { type => 'text' },
+  cp_id                   => { type => 'integer' },
+  currency_id             => { type => 'integer', not_null => 1 },
   cusordnumber            => { type => 'text' },
-  intnotes                => { type => 'text' },
+  customer_id             => { type => 'integer' },
+  delivered               => { type => 'boolean', default => 'false' },
+  delivery_customer_id    => { type => 'integer' },
+  delivery_vendor_id      => { type => 'integer' },
   department_id           => { type => 'integer' },
+  employee_id             => { type => 'integer' },
+  globalproject_id        => { type => 'integer' },
+  id                      => { type => 'integer', not_null => 1, sequence => 'id' },
+  intnotes                => { type => 'text' },
   itime                   => { type => 'timestamp', default => 'now()' },
-  mtime                   => { type => 'timestamp' },
-  shipvia                 => { type => 'text' },
-  cp_id                   => { type => 'integer' },
   language_id             => { type => 'integer' },
+  marge_percent           => { type => 'numeric', precision => 5, scale => 15 },
+  marge_total             => { type => 'numeric', precision => 5, scale => 15 },
+  mtime                   => { type => 'timestamp' },
+  netamount               => { type => 'numeric', precision => 5, scale => 15 },
+  notes                   => { type => 'text' },
+  ordnumber               => { type => 'text', not_null => 1 },
   payment_id              => { type => 'integer' },
-  delivery_customer_id    => { type => 'integer' },
-  delivery_vendor_id      => { type => 'integer' },
-  taxzone_id              => { type => 'integer' },
   proforma                => { type => 'boolean', default => 'false' },
-  shipto_id               => { type => 'integer' },
-  delivered               => { type => 'boolean', default => 'false' },
-  globalproject_id        => { type => 'integer' },
+  quonumber               => { type => 'text' },
+  quotation               => { type => 'boolean', default => 'false' },
+  reqdate                 => { type => 'date' },
   salesman_id             => { type => 'integer' },
+  shippingpoint           => { type => 'text' },
+  shipto_id               => { type => 'integer' },
+  shipvia                 => { type => 'text' },
+  taxincluded             => { type => 'boolean' },
+  taxzone_id              => { type => 'integer' },
   transaction_description => { type => 'text' },
-  marge_total             => { type => 'numeric', precision => 5, scale => 15 },
-  marge_percent           => { type => 'numeric', precision => 5, scale => 15 },
-  currency_id             => { type => 'integer', not_null => 1 },
+  transdate               => { type => 'date', default => 'now' },
+  vendor_id               => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -118,7 +118,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index dd2fde76e63b7dda6a4eeaa3cf5e13a1dd9365ba..66d2ad2613e9eb6a2ee4dfed22e4e5a369dce579 100644 (file)
@@ -9,33 +9,33 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('orderitems');
 
 __PACKAGE__->meta->columns(
-  trans_id           => { type => 'integer' },
-  parts_id           => { type => 'integer' },
+  base_qty           => { type => 'float', precision => 4 },
+  cusordnumber       => { type => 'text' },
   description        => { type => 'text' },
-  qty                => { type => 'float', precision => 4 },
-  sellprice          => { type => 'numeric', precision => 5, scale => 15 },
   discount           => { type => 'float', precision => 4 },
-  project_id         => { type => 'integer' },
-  reqdate            => { type => 'date' },
-  ship               => { type => 'float', precision => 4 },
-  serialnumber       => { type => 'text' },
   id                 => { type => 'integer', not_null => 1, sequence => 'orderitemsid' },
   itime              => { type => 'timestamp', default => 'now()' },
+  lastcost           => { type => 'numeric', precision => 5, scale => 15 },
+  longdescription    => { type => 'text' },
+  marge_percent      => { type => 'numeric', precision => 5, scale => 15 },
+  marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
+  marge_total        => { type => 'numeric', precision => 5, scale => 15 },
   mtime              => { type => 'timestamp' },
-  pricegroup_id      => { type => 'integer' },
   ordnumber          => { type => 'text' },
+  parts_id           => { type => 'integer' },
+  price_factor       => { type => 'numeric', default => 1, precision => 5, scale => 15 },
+  price_factor_id    => { type => 'integer' },
+  pricegroup_id      => { type => 'integer' },
+  project_id         => { type => 'integer' },
+  qty                => { type => 'float', precision => 4 },
+  reqdate            => { type => 'date' },
+  sellprice          => { type => 'numeric', precision => 5, scale => 15 },
+  serialnumber       => { type => 'text' },
+  ship               => { type => 'float', precision => 4 },
+  subtotal           => { type => 'boolean', default => 'false' },
+  trans_id           => { type => 'integer' },
   transdate          => { type => 'text' },
-  cusordnumber       => { type => 'text' },
   unit               => { type => 'varchar', length => 20 },
-  base_qty           => { type => 'float', precision => 4 },
-  subtotal           => { type => 'boolean', default => 'false' },
-  longdescription    => { type => 'text' },
-  marge_total        => { type => 'numeric', precision => 5, scale => 15 },
-  marge_percent      => { type => 'numeric', precision => 5, scale => 15 },
-  lastcost           => { type => 'numeric', precision => 5, scale => 15 },
-  price_factor_id    => { type => 'integer' },
-  price_factor       => { type => 'numeric', default => 1, precision => 5, scale => 15 },
-  marge_price_factor => { type => 'numeric', default => 1, precision => 5, scale => 15 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -43,6 +43,11 @@ __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 __PACKAGE__->meta->allow_inline_column_values(1);
 
 __PACKAGE__->meta->foreign_keys(
+  order => {
+    class       => 'SL::DB::Order',
+    key_columns => { trans_id => 'id' },
+  },
+
   part => {
     class       => 'SL::DB::Part',
     key_columns => { parts_id => 'id' },
@@ -62,14 +67,7 @@ __PACKAGE__->meta->foreign_keys(
     class       => 'SL::DB::Project',
     key_columns => { project_id => 'id' },
   },
-
-  order => {
-    class       => 'SL::DB::Order',
-    key_columns => { trans_id => 'id' },
-  },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 3c5eb76b77bf5ac226ef5fb372b1ae7b93694805..b5e25772c42648e86932396d7189f1b1b7ca06cb 100644 (file)
@@ -9,45 +9,45 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('parts');
 
 __PACKAGE__->meta->columns(
-  id                 => { type => 'integer', not_null => 1, sequence => 'id' },
-  partnumber         => { type => 'text', not_null => 1 },
-  description        => { type => 'text' },
-  listprice          => { type => 'numeric', precision => 5, scale => 15 },
-  sellprice          => { type => 'numeric', precision => 5, scale => 15 },
-  lastcost           => { type => 'numeric', precision => 5, scale => 15 },
-  priceupdate        => { type => 'date', default => 'now' },
-  weight             => { type => 'float', precision => 4 },
-  notes              => { type => 'text' },
-  makemodel          => { type => 'boolean', default => 'false' },
-  assembly           => { type => 'boolean', default => 'false' },
   alternate          => { type => 'boolean', default => 'false' },
-  rop                => { type => 'float', precision => 4 },
-  inventory_accno_id => { type => 'integer' },
-  income_accno_id    => { type => 'integer' },
-  expense_accno_id   => { type => 'integer' },
-  shop               => { type => 'boolean', default => 'false' },
-  obsolete           => { type => 'boolean', default => 'false' },
+  assembly           => { type => 'boolean', default => 'false' },
+  bin_id             => { type => 'integer' },
   bom                => { type => 'boolean', default => 'false' },
-  image              => { type => 'text' },
+  buchungsgruppen_id => { type => 'integer' },
+  description        => { type => 'text' },
   drawing            => { type => 'text' },
-  microfiche         => { type => 'text' },
-  partsgroup_id      => { type => 'integer' },
-  ve                 => { type => 'integer' },
+  ean                => { type => 'text' },
+  expense_accno_id   => { type => 'integer' },
+  formel             => { type => 'text' },
   gv                 => { type => 'numeric', precision => 5, scale => 15 },
+  has_sernumber      => { type => 'boolean', default => 'false' },
+  id                 => { type => 'integer', not_null => 1, sequence => 'id' },
+  image              => { type => 'text' },
+  income_accno_id    => { type => 'integer' },
+  inventory_accno_id => { type => 'integer' },
   itime              => { type => 'timestamp', default => 'now()' },
+  lastcost           => { type => 'numeric', precision => 5, scale => 15 },
+  listprice          => { type => 'numeric', precision => 5, scale => 15 },
+  makemodel          => { type => 'boolean', default => 'false' },
+  microfiche         => { type => 'text' },
   mtime              => { type => 'timestamp' },
-  unit               => { type => 'varchar', length => 20, not_null => 1 },
-  formel             => { type => 'text' },
   not_discountable   => { type => 'boolean', default => 'false' },
-  buchungsgruppen_id => { type => 'integer' },
+  notes              => { type => 'text' },
+  obsolete           => { type => 'boolean', default => 'false' },
+  onhand             => { type => 'numeric', default => '0', precision => 5, scale => 25 },
+  partnumber         => { type => 'text', not_null => 1 },
+  partsgroup_id      => { type => 'integer' },
   payment_id         => { type => 'integer' },
-  ean                => { type => 'text' },
   price_factor_id    => { type => 'integer' },
-  onhand             => { type => 'numeric', default => '0', precision => 5, scale => 25 },
+  priceupdate        => { type => 'date', default => 'now' },
+  rop                => { type => 'float', precision => 4 },
+  sellprice          => { type => 'numeric', precision => 5, scale => 15 },
+  shop               => { type => 'boolean', default => 'false' },
   stockable          => { type => 'boolean', default => 'false' },
-  has_sernumber      => { type => 'boolean', default => 'false' },
+  unit               => { type => 'varchar', length => 20, not_null => 1 },
+  ve                 => { type => 'integer' },
   warehouse_id       => { type => 'integer' },
-  bin_id             => { type => 'integer' },
+  weight             => { type => 'float', precision => 4 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -93,7 +93,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 9c7f02d24515ae12e16b241c39d0cece94b5a80c..ec2d603948f9c711f32771ed30fbd063ae2b57a0 100644 (file)
@@ -10,16 +10,14 @@ __PACKAGE__->meta->table('partsgroup');
 
 __PACKAGE__->meta->columns(
   id         => { type => 'integer', not_null => 1, sequence => 'id' },
-  partsgroup => { type => 'text' },
   itime      => { type => 'timestamp', default => 'now()' },
   mtime      => { type => 'timestamp' },
+  partsgroup => { type => 'text' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 83bd6d289d4b1c5c88c14de1246d1fce3e557d31..cba2de7d249466241d63a9f19f2b4ce1537184cf 100644 (file)
@@ -9,23 +9,21 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('payment_terms');
 
 __PACKAGE__->meta->columns(
-  id               => { type => 'integer', not_null => 1, sequence => 'id' },
   description      => { type => 'text' },
   description_long => { type => 'text' },
-  terms_netto      => { type => 'integer' },
-  terms_skonto     => { type => 'integer' },
-  percent_skonto   => { type => 'float', precision => 4 },
+  id               => { type => 'integer', not_null => 1, sequence => 'id' },
   itime            => { type => 'timestamp', default => 'now()' },
   mtime            => { type => 'timestamp' },
+  percent_skonto   => { type => 'float', precision => 4 },
   ranking          => { type => 'integer' },
   sortkey          => { type => 'integer', not_null => 1 },
+  terms_netto      => { type => 'integer' },
+  terms_skonto     => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 5346cfdd385604aca72acf70be1214ea49e52145..3e6f1eabcc64eed4aaf3cba542089d7dfae5b0c1 100644 (file)
@@ -9,11 +9,11 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('periodic_invoices');
 
 __PACKAGE__->meta->columns(
-  id                => { type => 'integer', not_null => 1, sequence => 'id' },
-  config_id         => { type => 'integer', not_null => 1 },
   ar_id             => { type => 'integer', not_null => 1 },
-  period_start_date => { type => 'date', not_null => 1 },
+  config_id         => { type => 'integer', not_null => 1 },
+  id                => { type => 'integer', not_null => 1, sequence => 'id' },
   itime             => { type => 'timestamp', default => 'now()' },
+  period_start_date => { type => 'date', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -32,7 +32,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 13f1814aa90f4ac1a02daa397c38d7c79b4eac96..e914a6449650302c8de2012fc0282d741620d87e 100644 (file)
@@ -9,18 +9,18 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('periodic_invoices_configs');
 
 __PACKAGE__->meta->columns(
+  active                  => { type => 'boolean', default => 'true' },
+  ar_chart_id             => { type => 'integer', not_null => 1 },
+  copies                  => { type => 'integer' },
+  end_date                => { type => 'date' },
+  extend_automatically_by => { type => 'integer' },
   id                      => { type => 'integer', not_null => 1, sequence => 'id' },
   oe_id                   => { type => 'integer', not_null => 1 },
   periodicity             => { type => 'varchar', length => 10, not_null => 1 },
   print                   => { type => 'boolean', default => 'false' },
   printer_id              => { type => 'integer' },
-  copies                  => { type => 'integer' },
-  active                  => { type => 'boolean', default => 'true' },
-  terminated              => { type => 'boolean', default => 'false' },
   start_date              => { type => 'date' },
-  end_date                => { type => 'date' },
-  ar_chart_id             => { type => 'integer', not_null => 1 },
-  extend_automatically_by => { type => 'integer' },
+  terminated              => { type => 'boolean', default => 'false' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -42,7 +42,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 2fec15f4eb75285c72ed8ba7f68090ab65cca59d..d1c35dc8bb1c3021d17874e9ec3c20c254a56711 100644 (file)
@@ -9,10 +9,10 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('prices');
 
 __PACKAGE__->meta->columns(
+  id            => { type => 'serial', not_null => 1 },
   parts_id      => { type => 'integer' },
-  pricegroup_id => { type => 'integer' },
   price         => { type => 'numeric', precision => 5, scale => 15 },
-  id            => { type => 'serial', not_null => 1 },
+  pricegroup_id => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -29,7 +29,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 099b6584f67b04d21b3deb56ee05261ecae7ccb0..efdb47fa4ca18bc0e12573e9f16e29bb87c2217d 100644 (file)
@@ -9,15 +9,13 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('price_factors');
 
 __PACKAGE__->meta->columns(
-  id          => { type => 'integer', not_null => 1, sequence => 'id' },
   description => { type => 'text' },
   factor      => { type => 'numeric', precision => 5, scale => 15 },
+  id          => { type => 'integer', not_null => 1, sequence => 'id' },
   sortkey     => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 5536d1547e9ef9b3fc268b45dbfdcaa46b5f5440..176d4267ea7c996e7aa176a5d2c9f4ea81be6903 100644 (file)
@@ -15,7 +15,5 @@ __PACKAGE__->meta->columns(
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index f093e5bb57b9c8f38ca401c311e7aead98a616f1..92bb73f7916dc07c13a52087b69be0f4b397ba3d 100644 (file)
@@ -10,14 +10,12 @@ __PACKAGE__->meta->table('printers');
 
 __PACKAGE__->meta->columns(
   id                  => { type => 'integer', not_null => 1, sequence => 'id' },
-  printer_description => { type => 'text', not_null => 1 },
   printer_command     => { type => 'text' },
+  printer_description => { type => 'text', not_null => 1 },
   template_code       => { type => 'text' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index c6b2c42c4a970a58859f61c4455b71fd9744bc96..4805568abca2a9212cbab00a43e50dadc3cd2145 100644 (file)
@@ -9,13 +9,13 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('project');
 
 __PACKAGE__->meta->columns(
-  id            => { type => 'integer', not_null => 1, sequence => 'id' },
-  projectnumber => { type => 'text' },
+  active        => { type => 'boolean', default => 'true' },
+  customer_id   => { type => 'integer' },
   description   => { type => 'text' },
+  id            => { type => 'integer', not_null => 1, sequence => 'id' },
   itime         => { type => 'timestamp', default => 'now()' },
   mtime         => { type => 'timestamp' },
-  active        => { type => 'boolean', default => 'true' },
-  customer_id   => { type => 'integer' },
+  projectnumber => { type => 'text' },
   type          => { type => 'text' },
   valid         => { type => 'boolean', default => 'true' },
 );
@@ -33,7 +33,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index cddfacf7e682e473158da48103e83321781c7b49..4b89dca767a9dff7d59c2a0cf42d4738fe6aa56e 100644 (file)
@@ -9,41 +9,41 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('ap');
 
 __PACKAGE__->meta->columns(
-  id                      => { type => 'integer', not_null => 1, sequence => 'glid' },
-  invnumber               => { type => 'text', not_null => 1 },
-  transdate               => { type => 'date', default => 'now' },
-  gldate                  => { type => 'date', default => 'now' },
-  vendor_id               => { type => 'integer' },
-  taxincluded             => { type => 'boolean', default => 'false' },
   amount                  => { type => 'numeric', precision => 5, scale => 15 },
-  netamount               => { type => 'numeric', precision => 5, scale => 15 },
-  paid                    => { type => 'numeric', precision => 5, scale => 15 },
+  cp_id                   => { type => 'integer' },
+  currency_id             => { type => 'integer', not_null => 1 },
   datepaid                => { type => 'date' },
+  deliverydate            => { type => 'date' },
+  department_id           => { type => 'integer' },
+  direct_debit            => { type => 'boolean', default => 'false' },
   duedate                 => { type => 'date' },
-  invoice                 => { type => 'boolean', default => 'false' },
-  ordnumber               => { type => 'text' },
-  notes                   => { type => 'text' },
   employee_id             => { type => 'integer' },
-  quonumber               => { type => 'text' },
+  gldate                  => { type => 'date', default => 'now' },
+  globalproject_id        => { type => 'integer' },
+  id                      => { type => 'integer', not_null => 1, sequence => 'glid' },
   intnotes                => { type => 'text' },
-  department_id           => { type => 'integer' },
+  invnumber               => { type => 'text', not_null => 1 },
+  invoice                 => { type => 'boolean', default => 'false' },
   itime                   => { type => 'timestamp', default => 'now()' },
-  mtime                   => { type => 'timestamp' },
-  shipvia                 => { type => 'text' },
-  cp_id                   => { type => 'integer' },
   language_id             => { type => 'integer' },
+  mtime                   => { type => 'timestamp' },
+  netamount               => { type => 'numeric', precision => 5, scale => 15 },
+  notes                   => { type => 'text' },
+  orddate                 => { type => 'date' },
+  ordnumber               => { type => 'text' },
+  paid                    => { type => 'numeric', precision => 5, scale => 15 },
   payment_id              => { type => 'integer' },
+  quodate                 => { type => 'date' },
+  quonumber               => { type => 'text' },
+  shipvia                 => { type => 'text' },
   storno                  => { type => 'boolean', default => 'false' },
+  storno_id               => { type => 'integer' },
+  taxincluded             => { type => 'boolean', default => 'false' },
   taxzone_id              => { type => 'integer' },
-  type                    => { type => 'text' },
-  orddate                 => { type => 'date' },
-  quodate                 => { type => 'date' },
-  globalproject_id        => { type => 'integer' },
   transaction_description => { type => 'text' },
-  storno_id               => { type => 'integer' },
-  direct_debit            => { type => 'boolean', default => 'false' },
-  deliverydate            => { type => 'date' },
-  currency_id             => { type => 'integer', not_null => 1 },
+  transdate               => { type => 'date', default => 'now' },
+  type                    => { type => 'text' },
+  vendor_id               => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -97,7 +97,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 7bbd67a275b9a68f89f403f75a534452f8dc7751..3daa6c483cb96831578a0af59706c7f1ad365cb9 100644 (file)
@@ -9,19 +9,17 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('record_links');
 
 __PACKAGE__->meta->columns(
-  from_table => { type => 'varchar', length => 50, not_null => 1 },
   from_id    => { type => 'integer', not_null => 1 },
-  to_table   => { type => 'varchar', length => 50, not_null => 1 },
-  to_id      => { type => 'integer', not_null => 1 },
-  itime      => { type => 'timestamp', default => 'now()' },
+  from_table => { type => 'varchar', length => 50, not_null => 1 },
   id         => { type => 'serial', not_null => 1 },
+  itime      => { type => 'timestamp', default => 'now()' },
+  to_id      => { type => 'integer', not_null => 1 },
+  to_table   => { type => 'varchar', length => 50, not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 9eddb4bf7c71440dfb17ac4f38cdd18ae8a4d7a6..0518867741a0bf71021b04defd7074c4796cea89 100644 (file)
@@ -9,16 +9,14 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('schema_info');
 
 __PACKAGE__->meta->columns(
-  tag   => { type => 'text', not_null => 1 },
-  login => { type => 'text' },
   itime => { type => 'timestamp', default => 'now()' },
+  login => { type => 'text' },
+  tag   => { type => 'text', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'tag' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 768597a8c4876ec0c3e73c4d4f840e128783c8a9..bade321c4ec1f266a696172790b0cd730ac126ee 100644 (file)
@@ -9,10 +9,10 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('sepa_export');
 
 __PACKAGE__->meta->columns(
-  id          => { type => 'serial', not_null => 1 },
+  closed      => { type => 'boolean', default => 'false' },
   employee_id => { type => 'integer', not_null => 1 },
   executed    => { type => 'boolean', default => 'false' },
-  closed      => { type => 'boolean', default => 'false' },
+  id          => { type => 'serial', not_null => 1 },
   itime       => { type => 'timestamp', default => 'now()' },
   vc          => { type => 'varchar', length => 10 },
 );
@@ -28,7 +28,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 40a3fc012118306d8d38a38604f372b458a233ff..08dd06e18963d74309530d04bbeb950c12d115cf 100644 (file)
@@ -9,21 +9,21 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('sepa_export_items');
 
 __PACKAGE__->meta->columns(
-  id                       => { type => 'integer', not_null => 1, sequence => 'id' },
-  sepa_export_id           => { type => 'integer', not_null => 1 },
+  amount                   => { type => 'numeric', precision => 5, scale => 25 },
   ap_id                    => { type => 'integer' },
+  ar_id                    => { type => 'integer' },
   chart_id                 => { type => 'integer', not_null => 1 },
-  amount                   => { type => 'numeric', precision => 5, scale => 25 },
-  reference                => { type => 'varchar', length => 35 },
-  requested_execution_date => { type => 'date' },
+  end_to_end_id            => { type => 'varchar', length => 35 },
   executed                 => { type => 'boolean', default => 'false' },
   execution_date           => { type => 'date' },
-  our_iban                 => { type => 'varchar', length => 100 },
+  id                       => { type => 'integer', not_null => 1, sequence => 'id' },
   our_bic                  => { type => 'varchar', length => 100 },
-  vc_iban                  => { type => 'varchar', length => 100 },
+  our_iban                 => { type => 'varchar', length => 100 },
+  reference                => { type => 'varchar', length => 35 },
+  requested_execution_date => { type => 'date' },
+  sepa_export_id           => { type => 'integer', not_null => 1 },
   vc_bic                   => { type => 'varchar', length => 100 },
-  end_to_end_id            => { type => 'varchar', length => 35 },
-  ar_id                    => { type => 'integer' },
+  vc_iban                  => { type => 'varchar', length => 100 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -50,7 +50,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index f7b90d825ce90994c5a948d00c51fedb79986294..bb3a9bcd773ec4964615c6c58548caf8d6eec40b 100644 (file)
@@ -9,30 +9,28 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('shipto');
 
 __PACKAGE__->meta->columns(
-  trans_id           => { type => 'integer' },
-  shiptoname         => { type => 'varchar', length => 75 },
-  shiptodepartment_1 => { type => 'varchar', length => 75 },
-  shiptodepartment_2 => { type => 'varchar', length => 75 },
-  shiptostreet       => { type => 'varchar', length => 75 },
-  shiptozipcode      => { type => 'varchar', length => 75 },
-  shiptocity         => { type => 'varchar', length => 75 },
-  shiptocountry      => { type => 'varchar', length => 75 },
-  shiptocontact      => { type => 'varchar', length => 75 },
-  shiptophone        => { type => 'varchar', length => 30 },
-  shiptofax          => { type => 'varchar', length => 30 },
-  shiptoemail        => { type => 'text' },
   itime              => { type => 'timestamp', default => 'now()' },
-  mtime              => { type => 'timestamp' },
   module             => { type => 'text' },
+  mtime              => { type => 'timestamp' },
   shipto_id          => { type => 'integer', not_null => 1, sequence => 'id' },
+  shiptocity         => { type => 'varchar', length => 75 },
+  shiptocontact      => { type => 'varchar', length => 75 },
+  shiptocountry      => { type => 'varchar', length => 75 },
   shiptocp_gender    => { type => 'text' },
+  shiptodepartment_1 => { type => 'varchar', length => 75 },
+  shiptodepartment_2 => { type => 'varchar', length => 75 },
+  shiptoemail        => { type => 'text' },
+  shiptofax          => { type => 'varchar', length => 30 },
+  shiptoname         => { type => 'varchar', length => 75 },
+  shiptophone        => { type => 'varchar', length => 30 },
+  shiptostreet       => { type => 'varchar', length => 75 },
+  shiptozipcode      => { type => 'varchar', length => 75 },
+  trans_id           => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'shipto_id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index ccc826708acc0b6d12d0d66eeabd24a264f45458..6dd6f8793c12028db6a227ecebf3792d9331a9bb 100644 (file)
@@ -9,22 +9,20 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('status');
 
 __PACKAGE__->meta->columns(
-  trans_id  => { type => 'integer' },
-  formname  => { type => 'text' },
-  printed   => { type => 'boolean', default => 'false' },
-  emailed   => { type => 'boolean', default => 'false' },
-  spoolfile => { type => 'text' },
   chart_id  => { type => 'integer' },
+  emailed   => { type => 'boolean', default => 'false' },
+  formname  => { type => 'text' },
+  id        => { type => 'serial', not_null => 1 },
   itime     => { type => 'timestamp', default => 'now()' },
   mtime     => { type => 'timestamp' },
-  id        => { type => 'serial', not_null => 1 },
+  printed   => { type => 'boolean', default => 'false' },
+  spoolfile => { type => 'text' },
+  trans_id  => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 9903067e3ed7008352b2d4f10ace4e467711bff3..b0dc314b8df717399fdab5713b79c40276ba0d47 100644 (file)
@@ -9,15 +9,15 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('tax');
 
 __PACKAGE__->meta->columns(
+  chart_categories => { type => 'text', not_null => 1 },
   chart_id         => { type => 'integer' },
-  rate             => { type => 'numeric', default => '0', not_null => 1, precision => 5, scale => 15 },
-  taxnumber        => { type => 'text' },
-  taxkey           => { type => 'integer', not_null => 1 },
-  taxdescription   => { type => 'text', not_null => 1 },
+  id               => { type => 'integer', not_null => 1, sequence => 'id' },
   itime            => { type => 'timestamp', default => 'now()' },
   mtime            => { type => 'timestamp' },
-  id               => { type => 'integer', not_null => 1, sequence => 'id' },
-  chart_categories => { type => 'text', not_null => 1 },
+  rate             => { type => 'numeric', default => '0', not_null => 1, precision => 5, scale => 15 },
+  taxdescription   => { type => 'text', not_null => 1 },
+  taxkey           => { type => 'integer', not_null => 1 },
+  taxnumber        => { type => 'text' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -31,7 +31,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 4265037b51e8e4844fb7a6cef32713194d1c6c38..399f637267135037220e389913a2a3116c1f969a 100644 (file)
@@ -9,12 +9,12 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('taxkeys');
 
 __PACKAGE__->meta->columns(
-  id        => { type => 'integer', not_null => 1, sequence => 'id' },
   chart_id  => { type => 'integer', not_null => 1 },
-  tax_id    => { type => 'integer', not_null => 1 },
-  taxkey_id => { type => 'integer', not_null => 1 },
+  id        => { type => 'integer', not_null => 1, sequence => 'id' },
   pos_ustva => { type => 'integer' },
   startdate => { type => 'date', not_null => 1 },
+  tax_id    => { type => 'integer', not_null => 1 },
+  taxkey_id => { type => 'integer', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -33,7 +33,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 0190c6367a915776dd77c573c319a73f5c95915e..b294531574a33d01f0a20ea668cc822e501d0f05 100644 (file)
@@ -9,13 +9,11 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('tax_zones');
 
 __PACKAGE__->meta->columns(
-  id          => { type => 'integer', not_null => 1 },
   description => { type => 'text' },
+  id          => { type => 'integer', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 3721e0ffef25fe6cd6deb5e26913fcdd127edc56..1f986dd8df46748c85a17677f925a040689984d1 100644 (file)
@@ -10,12 +10,12 @@ __PACKAGE__->meta->table('todo_user_config');
 
 __PACKAGE__->meta->columns(
   employee_id                         => { type => 'integer', not_null => 1 },
+  id                                  => { type => 'serial', not_null => 1 },
   show_after_login                    => { type => 'boolean', default => 'true' },
   show_follow_ups                     => { type => 'boolean', default => 'true' },
   show_follow_ups_login               => { type => 'boolean', default => 'true' },
   show_overdue_sales_quotations       => { type => 'boolean', default => 'true' },
   show_overdue_sales_quotations_login => { type => 'boolean', default => 'true' },
-  id                                  => { type => 'serial', not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -27,7 +27,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index f48c36462d40e4a150bee8ef260d95dfb4d743cf..7facb04855d7283168b03d490f330a13749c5473 100644 (file)
@@ -9,19 +9,17 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('transfer_type');
 
 __PACKAGE__->meta->columns(
-  id          => { type => 'integer', not_null => 1, sequence => 'id' },
-  direction   => { type => 'varchar', length => 10, not_null => 1 },
   description => { type => 'text' },
-  sortkey     => { type => 'integer' },
+  direction   => { type => 'varchar', length => 10, not_null => 1 },
+  id          => { type => 'integer', not_null => 1, sequence => 'id' },
   itime       => { type => 'timestamp', default => 'now()' },
   mtime       => { type => 'timestamp' },
+  sortkey     => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 39075c89407d1ff8815d6e37c4bda77193b49d22..5f0ee9705c6aad1c90bb15d1ca98dfd6833d07bb 100644 (file)
@@ -9,13 +9,13 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('translation');
 
 __PACKAGE__->meta->columns(
-  parts_id        => { type => 'integer' },
-  language_id     => { type => 'integer' },
-  translation     => { type => 'text' },
+  id              => { type => 'serial', not_null => 1 },
   itime           => { type => 'timestamp', default => 'now()' },
-  mtime           => { type => 'timestamp' },
+  language_id     => { type => 'integer' },
   longdescription => { type => 'text' },
-  id              => { type => 'serial', not_null => 1 },
+  mtime           => { type => 'timestamp' },
+  parts_id        => { type => 'integer' },
+  translation     => { type => 'text' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -29,7 +29,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 0849b4eb34a11b987513fdfb5622252b9f8cf6c3..d8d47afac1df863fb84149c9210983b4372b17ef 100644 (file)
@@ -9,12 +9,12 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('units');
 
 __PACKAGE__->meta->columns(
-  name      => { type => 'varchar', length => 20, not_null => 1 },
   base_unit => { type => 'varchar', length => 20 },
   factor    => { type => 'numeric', precision => 5, scale => 20 },
-  type      => { type => 'varchar', length => 20 },
-  sortkey   => { type => 'integer', not_null => 1 },
   id        => { type => 'serial', not_null => 1 },
+  name      => { type => 'varchar', length => 20, not_null => 1 },
+  sortkey   => { type => 'integer', not_null => 1 },
+  type      => { type => 'varchar', length => 20 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'name' ]);
@@ -28,7 +28,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index f3c20f52c93c63a213f5a9dca6229b2ed436664c..b85e5d43e638280424d4faef971fa8c1d6e8f836 100644 (file)
@@ -9,11 +9,11 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('units_language');
 
 __PACKAGE__->meta->columns(
-  unit             => { type => 'varchar', length => 20, not_null => 1 },
+  id               => { type => 'serial', not_null => 1 },
   language_id      => { type => 'integer', not_null => 1 },
   localized        => { type => 'varchar', length => 20 },
   localized_plural => { type => 'varchar', length => 20 },
-  id               => { type => 'serial', not_null => 1 },
+  unit             => { type => 'varchar', length => 20, not_null => 1 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -30,7 +30,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 6ba58b5b3ef78f34586a20829e45c87bceecff14..1a691ff6d2c68076568bc5003c3399f442b3798f 100644 (file)
@@ -9,49 +9,49 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('vendor');
 
 __PACKAGE__->meta->columns(
-  id             => { type => 'integer', not_null => 1, sequence => 'id' },
-  name           => { type => 'varchar', length => 75, not_null => 1 },
-  department_1   => { type => 'varchar', length => 75 },
-  department_2   => { type => 'varchar', length => 75 },
-  street         => { type => 'varchar', length => 75 },
-  zipcode        => { type => 'varchar', length => 10 },
+  account_number => { type => 'varchar', length => 15 },
+  bank           => { type => 'text' },
+  bank_code      => { type => 'varchar', length => 10 },
+  bcc            => { type => 'text' },
+  bic            => { type => 'varchar', length => 100 },
+  business_id    => { type => 'integer' },
+  cc             => { type => 'text' },
   city           => { type => 'varchar', length => 75 },
-  country        => { type => 'varchar', length => 75 },
   contact        => { type => 'varchar', length => 75 },
-  phone          => { type => 'text' },
+  country        => { type => 'varchar', length => 75 },
+  creditlimit    => { type => 'numeric', precision => 5, scale => 15 },
+  currency_id    => { type => 'integer', not_null => 1 },
+  department_1   => { type => 'varchar', length => 75 },
+  department_2   => { type => 'varchar', length => 75 },
+  direct_debit   => { type => 'boolean', default => 'false' },
+  discount       => { type => 'float', precision => 4 },
+  email          => { type => 'text' },
   fax            => { type => 'varchar', length => 30 },
+  greeting       => { type => 'text' },
   homepage       => { type => 'text' },
-  email          => { type => 'text' },
-  notes          => { type => 'text' },
-  terms          => { type => 'integer', default => '0' },
-  taxincluded    => { type => 'boolean' },
-  vendornumber   => { type => 'text' },
-  cc             => { type => 'text' },
-  bcc            => { type => 'text' },
-  business_id    => { type => 'integer' },
-  taxnumber      => { type => 'text' },
-  discount       => { type => 'float', precision => 4 },
-  creditlimit    => { type => 'numeric', precision => 5, scale => 15 },
-  account_number => { type => 'varchar', length => 15 },
-  bank_code      => { type => 'varchar', length => 10 },
-  bank           => { type => 'text' },
-  language       => { type => 'varchar', length => 5 },
+  iban           => { type => 'varchar', length => 100 },
+  id             => { type => 'integer', not_null => 1, sequence => 'id' },
   itime          => { type => 'timestamp', default => 'now()' },
+  language       => { type => 'varchar', length => 5 },
+  language_id    => { type => 'integer' },
   mtime          => { type => 'timestamp' },
+  name           => { type => 'varchar', length => 75, not_null => 1 },
+  notes          => { type => 'text' },
   obsolete       => { type => 'boolean', default => 'false' },
-  username       => { type => 'varchar', length => 50 },
-  user_password  => { type => 'varchar', length => 12 },
-  salesman_id    => { type => 'integer' },
-  v_customer_id  => { type => 'text' },
-  language_id    => { type => 'integer' },
   payment_id     => { type => 'integer' },
+  phone          => { type => 'text' },
+  salesman_id    => { type => 'integer' },
+  street         => { type => 'varchar', length => 75 },
+  taxincluded    => { type => 'boolean' },
+  taxnumber      => { type => 'text' },
   taxzone_id     => { type => 'integer', default => '0', not_null => 1 },
-  greeting       => { type => 'text' },
+  terms          => { type => 'integer', default => '0' },
+  user_password  => { type => 'varchar', length => 12 },
+  username       => { type => 'varchar', length => 50 },
   ustid          => { type => 'varchar', length => 14 },
-  direct_debit   => { type => 'boolean', default => 'false' },
-  iban           => { type => 'varchar', length => 100 },
-  bic            => { type => 'varchar', length => 100 },
-  currency_id    => { type => 'integer', not_null => 1 },
+  v_customer_id  => { type => 'text' },
+  vendornumber   => { type => 'text' },
+  zipcode        => { type => 'varchar', length => 10 },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -80,7 +80,5 @@ __PACKAGE__->meta->foreign_keys(
   },
 );
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index c75eb9f7920ae10d2ada5834f6b832226e8dd24e..d06c129920f5213d2d87d5d1eae06a3dae456571 100644 (file)
@@ -9,19 +9,17 @@ use base qw(SL::DB::Object);
 __PACKAGE__->meta->table('warehouse');
 
 __PACKAGE__->meta->columns(
-  id          => { type => 'integer', not_null => 1, sequence => 'id' },
   description => { type => 'text' },
+  id          => { type => 'integer', not_null => 1, sequence => 'id' },
+  invalid     => { type => 'boolean' },
   itime       => { type => 'timestamp', default => 'now()' },
   mtime       => { type => 'timestamp' },
   sortkey     => { type => 'integer' },
-  invalid     => { type => 'boolean' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 
 __PACKAGE__->meta->allow_inline_column_values(1);
 
-# __PACKAGE__->meta->initialize;
-
 1;
 ;
index 3eed8de136321d86945ff9541afd9d29a5caa23b..42af25a5b5216adc4cf961ac122aec5a9498c434 100755 (executable)
@@ -115,20 +115,37 @@ CODE
   my %args = (indent => 2, use_setup => 0);
 
   my $definition =  "SL::DB::AUTO::$package"->meta->perl_class_definition(%args);
-  $definition =~ s/(__PACKAGE__->meta->initialize;)/# $1/;
+  $definition =~ s/\n+__PACKAGE__->meta->initialize;\n+/\n\n/;
   $definition =~ s/::AUTO::/::/g;
 
+
+  # Sort column definitions alphabetically
+  if ($definition =~ m/__PACKAGE__->meta->columns\( \n (.+?) \n \);/msx) {
+    my ($start, $end)  = ($-[1], $+[1]);
+    my $sorted_columns = join "\n", sort split m/\n/, $1;
+    substr $definition, $start, $end - $start, $sorted_columns;
+  }
+
   # patch foreign keys
   my $foreign_key_definition = "SL::DB::AUTO::$package"->meta->perl_foreign_keys_definition(%args);
   $foreign_key_definition =~ s/::AUTO::/::/g;
 
-  if ($definition =~ /\Q$foreign_key_definition\E/) {
+  if ($foreign_key_definition && ($definition =~ /\Q$foreign_key_definition\E/)) {
     my ($start, $end) = ($-[0], $+[0]);
 
     while (my ($auto_generated_name, $desired_name) = each %{ $foreign_key_name_map{$table} || {} }) {
       $foreign_key_definition =~ s/^ \s \s ${auto_generated_name} \b/  ${desired_name}/msx;
     }
 
+    # Sort foreign key definitions alphabetically
+    if ($foreign_key_definition =~ m/\(\n(.+)\n\)/s) {
+      my ($list_start, $list_end) = ($-[0], $+[0]);
+      my @foreign_keys            = split m/\n\n/m, $1;
+      my $sorted_foreign_keys     = "(\n" . join("\n\n", sort @foreign_keys) . "\n)";
+
+      substr $foreign_key_definition, $list_start, $list_end - $list_start, $sorted_foreign_keys;;
+    }
+
     substr($definition, $start, $end - $start) = $foreign_key_definition;
   }