From d93de4b931aa0d474ffc8b6ff6c4ac669fab939d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Jan 2020 20:08:43 +0100 Subject: [PATCH] FIX Import of customer prices per segment was not possible --- htdocs/install/mysql/migration/10.0.0-11.0.0.sql | 2 ++ htdocs/install/mysql/tables/llx_product_price.sql | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index b73593c3dfd..e5d996be713 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -59,6 +59,8 @@ ALTER TABLE llx_emailcollector_emailcollectoraction ADD COLUMN position integer -- For v11 +ALTER TABLE llx_product_price MODIFY COLUMN tva_tx double(6,3) DEFAULT 0 NOT NULL; + ALTER TABLE llx_facturedet MODIFY COLUMN situation_percent real DEFAULT 100; UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NULL AND fk_prev_id IS NULL; diff --git a/htdocs/install/mysql/tables/llx_product_price.sql b/htdocs/install/mysql/tables/llx_product_price.sql index 11b2ac972cf..75a5355afe7 100644 --- a/htdocs/install/mysql/tables/llx_product_price.sql +++ b/htdocs/install/mysql/tables/llx_product_price.sql @@ -35,7 +35,7 @@ create table llx_product_price price_min_ttc double(24,8) default NULL, price_base_type varchar(3) DEFAULT 'HT', default_vat_code varchar(10), -- Same code than into table llx_c_tva (but no constraints). Should be used in priority to find default vat, npr, localtaxes for product. - tva_tx double(6,3) NOT NULL, + tva_tx double(6,3) DEFAULT 0 NOT NULL, -- Used only when option PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL is on (not supported) recuperableonly integer NOT NULL DEFAULT '0', localtax1_tx double(6,3) DEFAULT 0, localtax1_type varchar(10) NOT NULL DEFAULT '0',