diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql index 88260498f280f44b97e41ef7df581982c51dae46..6ba7707b249ce1c29e06a7b3b02a44566c79e819 100644 --- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql +++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql @@ -189,6 +189,22 @@ ALTER TABLE llx_cronjob ADD COLUMN processing integer NOT NULL DEFAULT 0; ALTER TABLE llx_website ADD COLUMN fk_user_create integer; ALTER TABLE llx_website ADD COLUMN fk_user_modif integer; +-- Add missing fields making not possible to enter reference price of products into another currency +ALTER TABLE llx_product_fournisseur_price ADD COLUMN multicurrency_tx double(24,8) DEFAULT 1; +ALTER TABLE llx_product_fournisseur_price ADD COLUMN multicurrency_price_ttc double(24,8) DEFAULT NULL; + +ALTER TABLE llx_product_fournisseur_price ADD COLUMN fk_multicurrency integer; +ALTER TABLE llx_product_fournisseur_price ADD COLUMN multicurrency_code varchar(255); +ALTER TABLE llx_product_fournisseur_price ADD COLUMN multicurrency_tx double(24,8) DEFAULT 1; +ALTER TABLE llx_product_fournisseur_price ADD COLUMN multicurrency_price double(24,8) DEFAULT NULL; +ALTER TABLE llx_product_fournisseur_price ADD COLUMN multicurrency_price_ttc double(24,8) DEFAULT NULL; + +ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN fk_multicurrency integer; +ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_code varchar(255); +ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_tx double(24,8) DEFAULT 1; +ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price double(24,8) DEFAULT NULL; +ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price_ttc double(24,8) DEFAULT NULL; + create table llx_payment_various ( diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql index 94032b784f448777a2289e42b98b54051bb59d33..f341b103edb95474a30f85533031d283a30cefeb 100755 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql @@ -43,5 +43,11 @@ create table llx_product_fournisseur_price fk_supplier_price_expression integer, -- Link to the rule for dynamic price calculation import_key varchar(14), -- Import key delivery_time_days integer, - supplier_reputation varchar(10) + supplier_reputation varchar(10), + + fk_multicurrency integer, + multicurrency_code varchar(255), + multicurrency_tx double(24,8) DEFAULT 1, + multicurrency_price double(24,8) DEFAULT NULL, + multicurrency_price_ttc double(24,8) DEFAULT NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price_log.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price_log.sql index 3d54f9ef341ddff123e8b87dc29c03a4fb5f4aba..e9b789224137f57a04b5a9a7919549a54a0f3a5c 100644 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price_log.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price_log.sql @@ -24,6 +24,11 @@ create table llx_product_fournisseur_price_log fk_product_fournisseur integer NOT NULL, price double(24,8) DEFAULT 0, quantity double, - fk_user integer + fk_user integer, + fk_multicurrency integer, + multicurrency_code varchar(255), + multicurrency_tx double(24,8) DEFAULT 1, + multicurrency_price double(24,8) DEFAULT NULL, + multicurrency_price_ttc double(24,8) DEFAULT NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_price.sql b/htdocs/install/mysql/tables/llx_product_price.sql index ee2ee953c49269615ddb279a094dbfdf1051b36f..a7f9ba38751583ee67ce08c234de142d17ceae01 100755 --- a/htdocs/install/mysql/tables/llx_product_price.sql +++ b/htdocs/install/mysql/tables/llx_product_price.sql @@ -46,6 +46,9 @@ create table llx_product_price fk_multicurrency integer, multicurrency_code varchar(255), - multicurrency_price double(24,8) DEFAULT NULL + multicurrency_tx double(24,8) DEFAULT 1, + multicurrency_price double(24,8) DEFAULT NULL, + multicurrency_price_ttc double(24,8) DEFAULT NULL + )ENGINE=innodb;