diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql b/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql index c7a7f8ecf7f..b780d24f1e2 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql @@ -29,10 +29,10 @@ create table llx_commande_fournisseurdet label varchar(255), -- product label description text, vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. - tva_tx double(6,3) DEFAULT 0, -- taux tva - localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate + tva_tx double(7,4) DEFAULT 0, -- taux tva + localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate localtax1_type varchar(10) NULL, -- localtax1 type - localtax2_tx double(6,3) DEFAULT 0, -- localtax2 rate + localtax2_tx double(7,4) DEFAULT 0, -- localtax2 rate localtax2_type varchar(10) NULL, -- localtax2 type qty real, -- quantity remise_percent real DEFAULT 0, -- pourcentage de remise diff --git a/htdocs/install/mysql/tables/llx_commandedet.sql b/htdocs/install/mysql/tables/llx_commandedet.sql index c7b94a46add..caff1ce7028 100644 --- a/htdocs/install/mysql/tables/llx_commandedet.sql +++ b/htdocs/install/mysql/tables/llx_commandedet.sql @@ -29,10 +29,10 @@ create table llx_commandedet label varchar(255) DEFAULT NULL, description text, vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. - tva_tx double(6,3), -- Vat rate - localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate + tva_tx double(7,4), -- Vat rate + localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate localtax1_type varchar(10) NULL, -- localtax1 type - localtax2_tx double(6,3) DEFAULT 0, -- localtax2 rate + localtax2_tx double(7,4) DEFAULT 0, -- localtax2 rate localtax2_type varchar(10) NULL, -- localtax2 type qty real, -- quantity remise_percent real DEFAULT 0, -- pourcentage de remise diff --git a/htdocs/install/mysql/tables/llx_contratdet.sql b/htdocs/install/mysql/tables/llx_contratdet.sql index bbe19955e33..e9be3c4ad0c 100644 --- a/htdocs/install/mysql/tables/llx_contratdet.sql +++ b/htdocs/install/mysql/tables/llx_contratdet.sql @@ -38,10 +38,10 @@ create table llx_contratdet date_cloture datetime, vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. - tva_tx double(6,3) DEFAULT 0, -- taux tva - localtax1_tx double(6,3) DEFAULT 0, -- local tax 1 rate + tva_tx double(7,4) DEFAULT 0, -- taux tva + localtax1_tx double(7,4) DEFAULT 0, -- local tax 1 rate localtax1_type varchar(10) NULL, -- localtax1 type - localtax2_tx double(6,3) DEFAULT 0, -- local tax 2 rate + localtax2_tx double(7,4) DEFAULT 0, -- local tax 2 rate localtax2_type varchar(10) NULL, -- localtax2 type qty real NOT NULL, -- quantity remise_percent real DEFAULT 0, -- pourcentage de remise diff --git a/htdocs/install/mysql/tables/llx_expensereport_det.sql b/htdocs/install/mysql/tables/llx_expensereport_det.sql index bd97600e2c8..e6304f64c7f 100644 --- a/htdocs/install/mysql/tables/llx_expensereport_det.sql +++ b/htdocs/install/mysql/tables/llx_expensereport_det.sql @@ -31,10 +31,10 @@ CREATE TABLE llx_expensereport_det value_unit double(24,8) NOT NULL, -- P.U. TTC (example 120) remise_percent real, vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. - tva_tx double(6,3), -- Vat rate - localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate + tva_tx double(7,4), -- Vat rate + localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate localtax1_type varchar(10) NULL, -- localtax1 type - localtax2_tx double(6,3) DEFAULT 0, -- localtax2 rate + localtax2_tx double(7,4) DEFAULT 0, -- localtax2 rate localtax2_type varchar(10) NULL, -- localtax2 type total_ht double(24,8) DEFAULT 0 NOT NULL, total_tva double(24,8) DEFAULT 0 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_det.sql b/htdocs/install/mysql/tables/llx_facture_fourn_det.sql index 40b613d4ac5..4012fb7087d 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_det.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_det.sql @@ -33,10 +33,10 @@ create table llx_facture_fourn_det remise_percent real DEFAULT 0, -- % de la remise ligne (exemple 20%) fk_remise_except integer NULL, -- Lien vers table des remises fixes vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. - tva_tx double(6,3), -- TVA taux product/service - localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate + tva_tx double(7,4), -- TVA taux product/service + localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate localtax1_type varchar(10) NULL, -- localtax1 type - localtax2_tx double(6,3) DEFAULT 0, -- localtax2 rate + localtax2_tx double(7,4) DEFAULT 0, -- localtax2 rate localtax2_type varchar(10) NULL, -- localtax2 type total_ht double(24,8), -- Total line price of product excluding tax tva double(24,8), -- Total TVA of line diff --git a/htdocs/install/mysql/tables/llx_facturedet.sql b/htdocs/install/mysql/tables/llx_facturedet.sql index 3b1ea86cc0e..5e48b16be09 100644 --- a/htdocs/install/mysql/tables/llx_facturedet.sql +++ b/htdocs/install/mysql/tables/llx_facturedet.sql @@ -31,10 +31,10 @@ create table llx_facturedet label varchar(255) DEFAULT NULL, description text, vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. - tva_tx double(6,3), -- Vat rate (example 20%) - localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate + tva_tx double(7,4), -- Vat rate (example 20%) + localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate localtax1_type varchar(10) NULL, -- localtax1 type - localtax2_tx double(6,3) DEFAULT 0, -- localtax2 rate + localtax2_tx double(7,4) DEFAULT 0, -- localtax2 rate localtax2_type varchar(10) NULL, -- localtax2 type qty real, -- Quantity (exemple 2). Note: for credit note, the price is negative, not the quantity. Like for discount, price is negative, not quantity. remise_percent real DEFAULT 0, -- % de la remise ligne (exemple 20%) diff --git a/htdocs/install/mysql/tables/llx_facturedet_rec.sql b/htdocs/install/mysql/tables/llx_facturedet_rec.sql index a66d7ccb0c3..f515276c442 100644 --- a/htdocs/install/mysql/tables/llx_facturedet_rec.sql +++ b/htdocs/install/mysql/tables/llx_facturedet_rec.sql @@ -30,10 +30,10 @@ create table llx_facturedet_rec label varchar(255) DEFAULT NULL, description text, vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. - tva_tx double(6,3), -- taux tva - localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate + tva_tx double(7,4), -- taux tva + localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate localtax1_type varchar(10) NULL, -- localtax1 type - localtax2_tx double(6,3) DEFAULT 0, -- localtax2 rate + localtax2_tx double(7,4) DEFAULT 0, -- localtax2 rate localtax2_type varchar(10) NULL, -- localtax2 type qty real, -- quantity remise_percent real DEFAULT 0, -- pourcentage de remise diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index 463ed33a86e..78560c5a05e 100644 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -47,11 +47,11 @@ create table llx_product price_base_type varchar(3) DEFAULT 'HT', cost_price double(24,8) DEFAULT NULL, -- Cost price without tax. Can be used for margin calculation. 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), -- Default VAT rate of product + tva_tx double(7,4), -- Default VAT rate of product recuperableonly integer NOT NULL DEFAULT '0', -- French NPR VAT - localtax1_tx double(6,3) DEFAULT 0, + localtax1_tx double(7,4) DEFAULT 0, localtax1_type varchar(10) NOT NULL DEFAULT '0', - localtax2_tx double(6,3) DEFAULT 0, + localtax2_tx double(7,4) 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 diff --git a/htdocs/install/mysql/tables/llx_product_customer_price.sql b/htdocs/install/mysql/tables/llx_product_customer_price.sql index 361a42a5b54..7f843a8784e 100644 --- a/htdocs/install/mysql/tables/llx_product_customer_price.sql +++ b/htdocs/install/mysql/tables/llx_product_customer_price.sql @@ -35,11 +35,11 @@ create table llx_product_customer_price 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), + tva_tx double(7,4), recuperableonly integer NOT NULL DEFAULT '0', -- Other NPR VAT - localtax1_tx double(6,3) DEFAULT 0, -- Other local VAT 1 + localtax1_tx double(7,4) 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_tx double(7,4) DEFAULT 0, -- Other local VAT 2 localtax2_type varchar(10) NOT NULL DEFAULT '0', fk_user integer, import_key varchar(14) -- Import key diff --git a/htdocs/install/mysql/tables/llx_product_customer_price_log.sql b/htdocs/install/mysql/tables/llx_product_customer_price_log.sql index 29906fe7ff2..cd591b41099 100644 --- a/htdocs/install/mysql/tables/llx_product_customer_price_log.sql +++ b/htdocs/install/mysql/tables/llx_product_customer_price_log.sql @@ -34,11 +34,11 @@ create table llx_product_customer_price_log 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), + tva_tx double(7,4), recuperableonly integer NOT NULL DEFAULT '0', -- Other NPR VAT - localtax1_tx double(6,3) DEFAULT 0, -- Other local VAT 1 + localtax1_tx double(7,4) 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_tx double(7,4) DEFAULT 0, -- Other local VAT 2 localtax2_type varchar(10) NOT NULL DEFAULT '0', fk_user integer, import_key varchar(14) -- Import key diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql index 2a01df30e4b..51b691e8ae2 100644 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql @@ -39,10 +39,10 @@ create table llx_product_fournisseur_price default_vat_code varchar(10), barcode varchar(180) DEFAULT NULL, -- barcode fk_barcode_type integer DEFAULT NULL, -- barcode type - tva_tx double(6,3) NOT NULL, - localtax1_tx double(6,3) DEFAULT 0, + tva_tx double(7,4) NOT NULL, + localtax1_tx double(7,4) DEFAULT 0, localtax1_type varchar(10) NOT NULL DEFAULT '0', - localtax2_tx double(6,3) DEFAULT 0, + localtax2_tx double(7,4) DEFAULT 0, localtax2_type varchar(10) NOT NULL DEFAULT '0', 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 ff862e427e0..9ebbeed9f96 100644 --- a/htdocs/install/mysql/tables/llx_product_price.sql +++ b/htdocs/install/mysql/tables/llx_product_price.sql @@ -35,11 +35,11 @@ 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) DEFAULT 0 NOT NULL, -- Used only when option PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL is on (not supported) + tva_tx double(7,4) 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_tx double(7,4) DEFAULT 0, localtax1_type varchar(10) NOT NULL DEFAULT '0', - localtax2_tx double(6,3) DEFAULT 0, + localtax2_tx double(7,4) DEFAULT 0, localtax2_type varchar(10) NOT NULL DEFAULT '0', fk_user_author integer, tosell tinyint DEFAULT 1, diff --git a/htdocs/install/mysql/tables/llx_propaldet.sql b/htdocs/install/mysql/tables/llx_propaldet.sql index 7156d90af2f..4dc9d570838 100644 --- a/htdocs/install/mysql/tables/llx_propaldet.sql +++ b/htdocs/install/mysql/tables/llx_propaldet.sql @@ -29,10 +29,10 @@ create table llx_propaldet description text, fk_remise_except integer NULL, -- Lien vers table des remises fixes vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. - tva_tx double(6,3) DEFAULT 0, -- Vat rate - localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate + tva_tx double(7,4) DEFAULT 0, -- Vat rate + localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate localtax1_type varchar(10) NULL, -- localtax1 type - localtax2_tx double(6,3) DEFAULT 0, -- localtax2 rate + localtax2_tx double(7,4) DEFAULT 0, -- localtax2 rate localtax2_type varchar(10) NULL, -- localtax2 type qty real, -- quantity remise_percent real DEFAULT 0, -- pourcentage de remise diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index c40a42ee0bd..7112b6e93ea 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -99,9 +99,9 @@ create table llx_societe fk_shipping_method integer, -- preferred shipping method id tva_assuj tinyint DEFAULT 1, -- assujeti ou non a la TVA localtax1_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 1 - localtax1_value double(6,3), + localtax1_value double(7,4), localtax2_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 2 - localtax2_value double(6,3), + localtax2_value double(7,4), barcode varchar(180), -- barcode fk_barcode_type integer NULL DEFAULT 0, -- barcode type price_level integer NULL, -- level of price for multiprices diff --git a/htdocs/install/mysql/tables/llx_societe_remise.sql b/htdocs/install/mysql/tables/llx_societe_remise.sql index 2d4e3a9c258..37746051b0b 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise.sql @@ -27,7 +27,7 @@ create table llx_societe_remise tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- creation date fk_user_author integer, -- creation user - remise_client double(6,3) DEFAULT 0 NOT NULL, -- discount + remise_client double(7,4) DEFAULT 0 NOT NULL, -- discount note text )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_societe_remise_except.sql b/htdocs/install/mysql/tables/llx_societe_remise_except.sql index 63762f8ad32..8fed65fe5f0 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise_except.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise_except.sql @@ -29,7 +29,7 @@ create table llx_societe_remise_except amount_ht double(24,8) NOT NULL, amount_tva double(24,8) DEFAULT 0 NOT NULL, amount_ttc double(24,8) DEFAULT 0 NOT NULL, - tva_tx double(6,3) DEFAULT 0 NOT NULL, + tva_tx double(7,4) DEFAULT 0 NOT NULL, vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. fk_user integer NOT NULL, fk_facture_line integer, diff --git a/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql b/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql index d6dfdc20d9d..85ba8e9b7ff 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql @@ -27,7 +27,7 @@ create table llx_societe_remise_supplier tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- creation date fk_user_author integer, -- creation user - remise_supplier double(6,3) DEFAULT 0 NOT NULL, -- discount + remise_supplier double(7,4) DEFAULT 0 NOT NULL, -- discount note text )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_supplier_proposaldet.sql b/htdocs/install/mysql/tables/llx_supplier_proposaldet.sql index 6990bf334e5..4e3d8bd13f9 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposaldet.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposaldet.sql @@ -24,10 +24,10 @@ CREATE TABLE llx_supplier_proposaldet ( description text, fk_remise_except integer DEFAULT NULL, vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. - tva_tx double(6,3) DEFAULT 0, -- Vat rate - localtax1_tx double(6,3) DEFAULT 0, + tva_tx double(7,4) DEFAULT 0, -- Vat rate + localtax1_tx double(7,4) DEFAULT 0, localtax1_type varchar(10) DEFAULT NULL, - localtax2_tx double(6,3) DEFAULT 0, + localtax2_tx double(7,4) DEFAULT 0, localtax2_type varchar(10) DEFAULT NULL, qty double DEFAULT NULL, remise_percent double DEFAULT '0',