2
0
forked from Wavyzz/dolibarr

Better management of how we store localtax vat rate for customer price.

This commit is contained in:
Laurent Destailleur
2025-08-28 02:11:53 +02:00
parent 6745e086d3
commit d16a66f269
6 changed files with 50 additions and 50 deletions

View File

@@ -39,9 +39,9 @@ create table llx_product_customer_price
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(7,4),
recuperableonly integer NOT NULL DEFAULT '0', -- Other NPR VAT
localtax1_tx double(7,4) DEFAULT 0, -- Other local VAT 1
localtax1_tx varchar(20) DEFAULT '0', -- Other local VAT 1
localtax1_type varchar(10) NOT NULL DEFAULT '0',
localtax2_tx double(7,4) DEFAULT 0, -- Other local VAT 2
localtax2_tx varchar(20) DEFAULT '0', -- Other local VAT 2
localtax2_type varchar(10) NOT NULL DEFAULT '0',
discount_percent real DEFAULT 0,
fk_user integer,

View File

@@ -35,12 +35,12 @@ 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.
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(7,4),
recuperableonly integer NOT NULL DEFAULT '0', -- Other NPR VAT
localtax1_tx double(7,4) DEFAULT 0, -- Other local VAT 1
recuperableonly integer NOT NULL DEFAULT '0', -- Other NPR VAT
localtax1_tx varchar(20) DEFAULT '0', -- Other local VAT 1
localtax1_type varchar(10) NOT NULL DEFAULT '0',
localtax2_tx double(7,4) DEFAULT 0, -- Other local VAT 2
localtax2_tx varchar(20) DEFAULT '0', -- Other local VAT 2
localtax2_type varchar(10) NOT NULL DEFAULT '0',
discount_percent real DEFAULT 0,
fk_user integer,