]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/MetaSetup/Invoice.pm
Merge branch 'master' of github.com:kivitendo/kivitendo-erp
[mfinanz.git] / SL / DB / MetaSetup / Invoice.pm
index 1111a980ba0192cec3b2aecbbc34bb2021dbf344..2a0e50ee23d4ed7c473e2ee781518ae4dc1afec3 100644 (file)
@@ -26,7 +26,6 @@ __PACKAGE__->meta->setup(
     shippingpoint             => { type => 'text' },
     terms                     => { type => 'integer', default => '0' },
     notes                     => { type => 'text' },
-    curr                      => { type => 'text' },
     ordnumber                 => { type => 'text' },
     employee_id               => { type => 'integer' },
     quonumber                 => { type => 'text' },
@@ -57,6 +56,7 @@ __PACKAGE__->meta->setup(
     donumber                  => { type => 'text' },
     invnumber_for_credit_note => { type => 'text' },
     direct_debit              => { type => 'boolean', default => 'false' },
+    currency_id               => { type => 'integer', not_null => 1 },
   ],
 
   primary_key_columns => [ 'id' ],
@@ -69,6 +69,11 @@ __PACKAGE__->meta->setup(
       key_columns => { cp_id => 'cp_id' },
     },
 
+    currency => {
+      class       => 'SL::DB::Currency',
+      key_columns => { currency_id => 'id' },
+    },
+
     customer => {
       class       => 'SL::DB::Customer',
       key_columns => { customer_id => 'id' },
@@ -99,7 +104,7 @@ __PACKAGE__->meta->setup(
       key_columns => { language_id => 'id' },
     },
 
-    payment => {
+    payment_terms => {
       class       => 'SL::DB::PaymentTerm',
       key_columns => { payment_id => 'id' },
     },