From: Niclas Zimmermann Date: Mon, 6 May 2013 15:14:14 +0000 (+0200) Subject: Neues DB-Setup für Währungen X-Git-Tag: release-3.1.0beta1~401^2~21^2~7 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d0c938cfb5fbb8c1c03b94d395d6c7839a1c597e;p=kivitendo-erp.git Neues DB-Setup für Währungen Für RDBO-Code wird hier das MetaSetup der DB upgedated. --- diff --git a/SL/DB/MetaSetup/Customer.pm b/SL/DB/MetaSetup/Customer.pm index 82d808cf9..021d1cf56 100644 --- a/SL/DB/MetaSetup/Customer.pm +++ b/SL/DB/MetaSetup/Customer.pm @@ -53,14 +53,12 @@ __PACKAGE__->meta->setup( iban => { type => 'varchar', length => 100 }, bic => { type => 'varchar', length => 100 }, direct_debit => { type => 'boolean', default => 'false' }, - curr => { type => 'text' }, taxincluded_checked => { type => 'boolean' }, + currency_id => { type => 'integer', not_null => 1 }, ], primary_key_columns => [ 'id' ], - allow_inline_column_values => 1, - foreign_keys => [ business => { class => 'SL::DB::Business', diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index bb174ebaa..aec99e26f 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -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' }, @@ -68,6 +67,7 @@ __PACKAGE__->meta->setup( ar_show_mark_as_paid => { type => 'boolean', default => 'true' }, ap_show_mark_as_paid => { type => 'boolean', default => 'true' }, assemblynumber => { type => 'text' }, + currency_id => { type => 'integer', not_null => 1 }, ], primary_key_columns => [ 'id' ], diff --git a/SL/DB/MetaSetup/DeliveryOrder.pm b/SL/DB/MetaSetup/DeliveryOrder.pm index 523312160..59263b22e 100644 --- a/SL/DB/MetaSetup/DeliveryOrder.pm +++ b/SL/DB/MetaSetup/DeliveryOrder.pm @@ -39,13 +39,11 @@ __PACKAGE__->meta->setup( taxzone_id => { type => 'integer' }, taxincluded => { type => 'boolean' }, terms => { type => 'integer' }, - curr => { type => 'text' }, + currency_id => { type => 'integer', not_null => 1 }, ], primary_key_columns => [ 'id' ], - allow_inline_column_values => 1, - foreign_keys => [ contact => { class => 'SL::DB::Contact', diff --git a/SL/DB/MetaSetup/Exchangerate.pm b/SL/DB/MetaSetup/Exchangerate.pm index 44bce842b..f6dc3ff9f 100644 --- a/SL/DB/MetaSetup/Exchangerate.pm +++ b/SL/DB/MetaSetup/Exchangerate.pm @@ -10,18 +10,16 @@ __PACKAGE__->meta->setup( table => 'exchangerate', columns => [ - curr => { type => 'text' }, - transdate => { type => 'date' }, - buy => { type => 'numeric', precision => 5, scale => 15 }, - sell => { type => 'numeric', precision => 5, scale => 15 }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - id => { type => 'serial', not_null => 1 }, + transdate => { type => 'date' }, + buy => { type => 'numeric', precision => 5, scale => 15 }, + sell => { type => 'numeric', precision => 5, scale => 15 }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + id => { type => 'serial', not_null => 1 }, + currency_id => { type => 'integer', not_null => 1 }, ], primary_key_columns => [ 'id' ], - - allow_inline_column_values => 1, ); 1; diff --git a/SL/DB/MetaSetup/Invoice.pm b/SL/DB/MetaSetup/Invoice.pm index b01b1417d..202087518 100644 --- a/SL/DB/MetaSetup/Invoice.pm +++ b/SL/DB/MetaSetup/Invoice.pm @@ -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,12 +56,11 @@ __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' ], - allow_inline_column_values => 1, - foreign_keys => [ contact => { class => 'SL::DB::Contact', diff --git a/SL/DB/MetaSetup/Order.pm b/SL/DB/MetaSetup/Order.pm index f68c276ef..c06f13288 100644 --- a/SL/DB/MetaSetup/Order.pm +++ b/SL/DB/MetaSetup/Order.pm @@ -21,7 +21,6 @@ __PACKAGE__->meta->setup( taxincluded => { type => 'boolean' }, shippingpoint => { type => 'text' }, notes => { type => 'text' }, - curr => { type => 'character', length => 3 }, employee_id => { type => 'integer' }, closed => { type => 'boolean', default => 'false' }, quotation => { type => 'boolean', default => 'false' }, @@ -43,15 +42,14 @@ __PACKAGE__->meta->setup( delivered => { type => 'boolean', default => 'false' }, globalproject_id => { type => 'integer' }, salesman_id => { type => 'integer' }, - transaction_description => { type => 'text' }, marge_total => { type => 'numeric', precision => 5, scale => 15 }, marge_percent => { type => 'numeric', precision => 5, scale => 15 }, + transaction_description => { type => 'text' }, + currency_id => { type => 'integer', not_null => 1 }, ], primary_key_columns => [ 'id' ], - allow_inline_column_values => 1, - foreign_keys => [ contact => { class => 'SL::DB::Contact', diff --git a/SL/DB/MetaSetup/PurchaseInvoice.pm b/SL/DB/MetaSetup/PurchaseInvoice.pm index bee7eb2ae..75040bae6 100644 --- a/SL/DB/MetaSetup/PurchaseInvoice.pm +++ b/SL/DB/MetaSetup/PurchaseInvoice.pm @@ -23,7 +23,6 @@ __PACKAGE__->meta->setup( duedate => { type => 'date' }, invoice => { type => 'boolean', default => 'false' }, ordnumber => { type => 'text' }, - curr => { type => 'text' }, notes => { type => 'text' }, employee_id => { type => 'integer' }, quonumber => { type => 'text' }, @@ -44,12 +43,11 @@ __PACKAGE__->meta->setup( transaction_description => { type => 'text' }, storno_id => { type => 'integer' }, direct_debit => { type => 'boolean', default => 'false' }, + currency_id => { type => 'integer', not_null => 1 }, ], primary_key_columns => [ 'id' ], - allow_inline_column_values => 1, - foreign_keys => [ contact => { class => 'SL::DB::Contact', diff --git a/SL/DB/MetaSetup/Vendor.pm b/SL/DB/MetaSetup/Vendor.pm index d8854fab5..cb36289d9 100644 --- a/SL/DB/MetaSetup/Vendor.pm +++ b/SL/DB/MetaSetup/Vendor.pm @@ -52,13 +52,11 @@ __PACKAGE__->meta->setup( iban => { type => 'varchar', length => 100 }, bic => { type => 'varchar', length => 100 }, direct_debit => { type => 'boolean', default => 'false' }, - curr => { type => 'text' }, + currency_id => { type => 'integer', not_null => 1 }, ], primary_key_columns => [ 'id' ], - allow_inline_column_values => 1, - foreign_keys => [ business => { class => 'SL::DB::Business',