Rose-Model für neue Tabelle currencies
[kivitendo-erp.git] / SL / DB / MetaSetup / Default.pm
index 55d1e5e..7b1df39 100644 (file)
@@ -20,7 +20,6 @@ __PACKAGE__->meta->setup(
     weightunit                          => { type => 'varchar', length => 5 },
     businessnumber                      => { type => 'text' },
     version                             => { type => 'varchar', length => 8 },
-    curr                                => { type => 'text' },
     closedto                            => { type => 'date' },
     revtrans                            => { type => 'boolean', default => 'false' },
     ponumber                            => { type => 'text' },
@@ -67,11 +66,20 @@ __PACKAGE__->meta->setup(
     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' },
-    deviating_fiscal_year               => { type => 'boolean' },
     assemblynumber                      => { type => 'text' },
+    currency_id                         => { type => 'integer', not_null => 1 },
   ],
 
   primary_key_columns => [ 'id' ],
+
+  allow_inline_column_values => 1,
+
+  foreign_keys => [
+    currency => {
+      class       => 'SL::DB::Currency',
+      key_columns => { currency_id => 'id' },
+    },
+  ],
 );
 
 1;