From 5d18aad15f53897ff7321f770843cbd5c1d5e14d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 4 Mar 2017 14:18:04 +0100 Subject: [PATCH] Add the vat_code on all table of prices --- htdocs/install/mysql/migration/5.0.0-6.0.0.sql | 4 +++- htdocs/install/mysql/tables/llx_product_fournisseur_price.sql | 1 + htdocs/install/mysql/tables/llx_product_price.sql | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) 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 c47b2d7e5fe..0dfc5f36925 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 @@ -111,4 +111,6 @@ ALTER TABLE llx_societe_remise_except ADD CONSTRAINT fk_societe_remise_fk_invoic UPDATE llx_const set value='moono-lisa' where value = 'moono' AND name = 'FCKEDITOR_SKIN'; - +ALTER TABLE llx_product_price ADD COLUMN default_vat_code varchar(10) after tva_tx; +ALTER TABLE llx_product_fournisseur_price ADD COLUMN default_vat_code varchar(10) after tva_tx; + diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql index 717f0617c83..94032b784f4 100755 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql @@ -36,6 +36,7 @@ create table llx_product_fournisseur_price unitprice double(24,8) DEFAULT 0, charges double(24,8) DEFAULT 0, -- to store transport cost. Constant PRODUCT_CHARGES must be set to see it. unitcharges double(24,8) DEFAULT 0, -- deprecated + default_vat_code varchar(10), tva_tx double(6,3) NOT NULL, info_bits integer NOT NULL DEFAULT 0, fk_user integer, diff --git a/htdocs/install/mysql/tables/llx_product_price.sql b/htdocs/install/mysql/tables/llx_product_price.sql index 9c3869f1e35..ee2ee953c49 100755 --- a/htdocs/install/mysql/tables/llx_product_price.sql +++ b/htdocs/install/mysql/tables/llx_product_price.sql @@ -31,6 +31,7 @@ create table llx_product_price price_min double(24,8) default NULL, 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, recuperableonly integer NOT NULL DEFAULT '0', localtax1_tx double(6,3) DEFAULT 0,