FIX Maxi serious problem when updating prices and vat of a product. All

mode (one price, price per level, ...) were impacted. Localtax setup
were lost.
This commit is contained in:
Laurent Destailleur
2016-02-19 02:41:00 +01:00
parent 3b5ce32cb0
commit 4d0b9946f5
8 changed files with 256 additions and 53 deletions

View File

@@ -46,8 +46,10 @@ create table llx_product
cost_price double(24,8) DEFAULT NULL, -- Cost price without tax. Can be used for margin calculation.
tva_tx double(6,3), -- Default VAT rate of product
recuperableonly integer NOT NULL DEFAULT '0', -- French NPR VAT
localtax1_tx double(6,3) DEFAULT 0, -- Spanish local VAT 1
localtax2_tx double(6,3) DEFAULT 0, -- Spanish local VAT 2
localtax1_tx double(6,3) DEFAULT 0, --
localtax1_type varchar(10) NOT NULL DEFAULT '0', --
localtax2_tx double(6,3) DEFAULT 0, --
localtax2_type varchar(10) NOT NULL DEFAULT '0', --
fk_user_author integer DEFAULT NULL, -- user making creation
fk_user_modif integer, -- user making last change
tosell tinyint DEFAULT 1, -- Product you sell

View File

@@ -36,7 +36,9 @@ create table llx_product_customer_price
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
localtax1_type varchar(10) NOT NULL DEFAULT '0',
localtax2_tx double(6,3) DEFAULT 0, -- Other local VAT 2
localtax2_type varchar(10) NOT NULL DEFAULT '0',
fk_user integer,
import_key varchar(14) -- Import key
)ENGINE=innodb;

View File

@@ -21,7 +21,7 @@
create table llx_product_customer_price_log
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL, -- multi company id
entity integer DEFAULT 1 NOT NULL, -- multi company id
datec datetime,
fk_product integer NOT NULL,
fk_soc integer NOT NULL,
@@ -33,7 +33,9 @@ create table llx_product_customer_price_log
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
localtax1_type varchar(10) NOT NULL DEFAULT '0',
localtax2_tx double(6,3) DEFAULT 0, -- Other local VAT 2
localtax2_type varchar(10) NOT NULL DEFAULT '0',
fk_user integer,
import_key varchar(14) -- Import key
)ENGINE=innodb;

View File

@@ -34,7 +34,9 @@ create table llx_product_price
tva_tx double(6,3) NOT NULL,
recuperableonly integer NOT NULL DEFAULT '0',
localtax1_tx double(6,3) DEFAULT 0,
localtax1_type varchar(10) NOT NULL DEFAULT '0',
localtax2_tx double(6,3) DEFAULT 0,
localtax2_type varchar(10) NOT NULL DEFAULT '0',
fk_user_author integer,
tosell tinyint DEFAULT 1,
price_by_qty integer NOT NULL DEFAULT 0,