]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/DB/MetaSetup/RecordTemplate.pm
Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / SL / DB / MetaSetup / RecordTemplate.pm
index 8fe4cf9dc0d195d3d81d0cc07f421a2c7ac97617..374f00c7be23158cca39427f51ee79f37ca949f1 100644 (file)
@@ -9,26 +9,29 @@ use parent qw(SL::DB::Object);
 __PACKAGE__->meta->table('record_templates');
 
 __PACKAGE__->meta->columns(
-  ar_ap_chart_id => { type => 'integer' },
-  cb_transaction => { type => 'boolean', default => 'false', not_null => 1 },
-  currency_id    => { type => 'integer', not_null => 1 },
-  customer_id    => { type => 'integer' },
-  department_id  => { type => 'integer' },
-  description    => { type => 'text' },
-  direct_debit   => { type => 'boolean', default => 'false', not_null => 1 },
-  employee_id    => { type => 'integer' },
-  id             => { type => 'serial', not_null => 1 },
-  itime          => { type => 'timestamp', default => 'now()', not_null => 1 },
-  mtime          => { type => 'timestamp', default => 'now()', not_null => 1 },
-  notes          => { type => 'text' },
-  ob_transaction => { type => 'boolean', default => 'false', not_null => 1 },
-  ordnumber      => { type => 'text' },
-  project_id     => { type => 'integer' },
-  reference      => { type => 'text' },
-  taxincluded    => { type => 'boolean', default => 'false', not_null => 1 },
-  template_name  => { type => 'text', not_null => 1 },
-  template_type  => { type => 'enum', check_in => [ 'ar_transaction', 'ap_transaction', 'gl_transaction' ], db_type => 'record_template_type', not_null => 1 },
-  vendor_id      => { type => 'integer' },
+  ar_ap_chart_id          => { type => 'integer' },
+  cb_transaction          => { type => 'boolean', default => 'false', not_null => 1 },
+  currency_id             => { type => 'integer', not_null => 1 },
+  customer_id             => { type => 'integer' },
+  department_id           => { type => 'integer' },
+  description             => { type => 'text' },
+  direct_debit            => { type => 'boolean', default => 'false', not_null => 1 },
+  employee_id             => { type => 'integer' },
+  id                      => { type => 'serial', not_null => 1 },
+  itime                   => { type => 'timestamp', default => 'now()', not_null => 1 },
+  mtime                   => { type => 'timestamp', default => 'now()', not_null => 1 },
+  notes                   => { type => 'text' },
+  ob_transaction          => { type => 'boolean', default => 'false', not_null => 1 },
+  ordnumber               => { type => 'text' },
+  payment_id              => { type => 'integer' },
+  project_id              => { type => 'integer' },
+  reference               => { type => 'text' },
+  show_details            => { type => 'boolean', default => 'false', not_null => 1 },
+  taxincluded             => { type => 'boolean', default => 'false', not_null => 1 },
+  template_name           => { type => 'text', not_null => 1 },
+  template_type           => { type => 'enum', check_in => [ 'ar_transaction', 'ap_transaction', 'gl_transaction' ], db_type => 'record_template_type', not_null => 1 },
+  transaction_description => { type => 'text' },
+  vendor_id               => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -61,6 +64,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { employee_id => 'id' },
   },
 
+  payment => {
+    class       => 'SL::DB::PaymentTerm',
+    key_columns => { payment_id => 'id' },
+  },
+
   project => {
     class       => 'SL::DB::Project',
     key_columns => { project_id => 'id' },