jQuery-Script/Methode zum Anstoßen von Downloads
[kivitendo-erp.git] / SL / DB / MetaSetup / AccTransaction.pm
index 9f6e6b4..db89491 100644 (file)
@@ -10,7 +10,7 @@ __PACKAGE__->meta->setup(
   table   => 'acc_trans',
 
   columns => [
-    acc_trans_id   => { type => 'bigint', sequence => 'acc_trans_id_seq' },
+    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 },
@@ -26,12 +26,11 @@ __PACKAGE__->meta->setup(
     taxkey         => { type => 'integer' },
     itime          => { type => 'timestamp', default => 'now()' },
     mtime          => { type => 'timestamp' },
-    id             => { type => 'integer', not_null => 1, sequence => 'acc_trans_id_seq1' },
+    tax_id         => { type => 'integer', not_null => 1 },
+    chart_link     => { type => 'text', not_null => 1 },
   ],
 
-  primary_key_columns => [ 'id' ],
-
-  allow_inline_column_values => 1,
+  primary_key_columns => [ 'acc_trans_id' ],
 
   foreign_keys => [
     chart => {
@@ -43,6 +42,11 @@ __PACKAGE__->meta->setup(
       class       => 'SL::DB::Project',
       key_columns => { project_id => 'id' },
     },
+
+    tax => {
+      class       => 'SL::DB::Tax',
+      key_columns => { tax_id => 'id' },
+    },
   ],
 );