Vorgangsbezeichnung in Dialogbuchung: Speichern und Laden
[kivitendo-erp.git] / SL / DB / MetaSetup / PeriodicInvoice.pm
index 11822c1..703cb59 100644 (file)
@@ -4,16 +4,16 @@ package SL::DB::PeriodicInvoice;
 
 use strict;
 
-use base qw(SL::DB::Object);
+use parent 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' ]);
@@ -25,9 +25,12 @@ __PACKAGE__->meta->foreign_keys(
     class       => 'SL::DB::Invoice',
     key_columns => { ar_id => 'id' },
   },
-);
 
-# __PACKAGE__->meta->initialize;
+  config => {
+    class       => 'SL::DB::PeriodicInvoicesConfig',
+    key_columns => { config_id => 'id' },
+  },
+);
 
 1;
 ;