FIX New vat code not correctly implemented if "1 price per customer".

This commit is contained in:
Laurent Destailleur
2017-05-12 13:12:17 +02:00
parent 80b0d91154
commit 5581e5da72
6 changed files with 32 additions and 13 deletions

View File

@@ -263,6 +263,9 @@ update llx_accounting_account set account_parent = 0 where account_parent = '';
ALTER TABLE llx_product_price ALTER COLUMN date_price SET DEFAULT NULL;
ALTER TABLE llx_product_price ADD COLUMN default_vat_code varchar(10) after tva_tx;
ALTER TABLE llx_product_customer_price ADD COLUMN default_vat_code varchar(10) after tva_tx;
ALTER TABLE llx_product_customer_price_log 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;
ALTER TABLE llx_events MODIFY COLUMN ip varchar(250);

View File

@@ -33,6 +33,7 @@ create table llx_product_customer_price
price_min double(24,8) DEFAULT 0,
price_min_ttc double(24,8) DEFAULT 0,
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),
recuperableonly integer NOT NULL DEFAULT '0', -- Other NPR VAT
localtax1_tx double(6,3) DEFAULT 0, -- Other local VAT 1

View File

@@ -30,6 +30,7 @@ create table llx_product_customer_price_log
price_min double(24,8) DEFAULT 0,
price_min_ttc double(24,8) DEFAULT 0,
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),
recuperableonly integer NOT NULL DEFAULT '0', -- Other NPR VAT
localtax1_tx double(6,3) DEFAULT 0, -- Other local VAT 1