This commit is contained in:
Laurent Destailleur 2021-09-24 13:51:52 +02:00
parent 8b7c677121
commit dc36724a10
18 changed files with 47 additions and 47 deletions

View File

@ -29,10 +29,10 @@ create table llx_commande_fournisseurdet
label varchar(255), -- product label label varchar(255), -- product label
description text, description text,
vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. 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 tva_tx double(7,4) DEFAULT 0, -- taux tva
localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate
localtax1_type varchar(10) NULL, -- localtax1 type 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 localtax2_type varchar(10) NULL, -- localtax2 type
qty real, -- quantity qty real, -- quantity
remise_percent real DEFAULT 0, -- pourcentage de remise remise_percent real DEFAULT 0, -- pourcentage de remise

View File

@ -29,10 +29,10 @@ create table llx_commandedet
label varchar(255) DEFAULT NULL, label varchar(255) DEFAULT NULL,
description text, description text,
vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. 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 tva_tx double(7,4), -- Vat rate
localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate
localtax1_type varchar(10) NULL, -- localtax1 type 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 localtax2_type varchar(10) NULL, -- localtax2 type
qty real, -- quantity qty real, -- quantity
remise_percent real DEFAULT 0, -- pourcentage de remise remise_percent real DEFAULT 0, -- pourcentage de remise

View File

@ -38,10 +38,10 @@ create table llx_contratdet
date_cloture datetime, date_cloture datetime,
vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. 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 tva_tx double(7,4) DEFAULT 0, -- taux tva
localtax1_tx double(6,3) DEFAULT 0, -- local tax 1 rate localtax1_tx double(7,4) DEFAULT 0, -- local tax 1 rate
localtax1_type varchar(10) NULL, -- localtax1 type 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 localtax2_type varchar(10) NULL, -- localtax2 type
qty real NOT NULL, -- quantity qty real NOT NULL, -- quantity
remise_percent real DEFAULT 0, -- pourcentage de remise remise_percent real DEFAULT 0, -- pourcentage de remise

View File

@ -31,10 +31,10 @@ CREATE TABLE llx_expensereport_det
value_unit double(24,8) NOT NULL, -- P.U. TTC (example 120) value_unit double(24,8) NOT NULL, -- P.U. TTC (example 120)
remise_percent real, remise_percent real,
vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. 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 tva_tx double(7,4), -- Vat rate
localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate
localtax1_type varchar(10) NULL, -- localtax1 type 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 localtax2_type varchar(10) NULL, -- localtax2 type
total_ht double(24,8) DEFAULT 0 NOT NULL, total_ht double(24,8) DEFAULT 0 NOT NULL,
total_tva double(24,8) DEFAULT 0 NOT NULL, total_tva double(24,8) DEFAULT 0 NOT NULL,

View File

@ -33,10 +33,10 @@ create table llx_facture_fourn_det
remise_percent real DEFAULT 0, -- % de la remise ligne (exemple 20%) remise_percent real DEFAULT 0, -- % de la remise ligne (exemple 20%)
fk_remise_except integer NULL, -- Lien vers table des remises fixes 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. 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 tva_tx double(7,4), -- TVA taux product/service
localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate
localtax1_type varchar(10) NULL, -- localtax1 type 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 localtax2_type varchar(10) NULL, -- localtax2 type
total_ht double(24,8), -- Total line price of product excluding tax total_ht double(24,8), -- Total line price of product excluding tax
tva double(24,8), -- Total TVA of line tva double(24,8), -- Total TVA of line

View File

@ -31,10 +31,10 @@ create table llx_facturedet
label varchar(255) DEFAULT NULL, label varchar(255) DEFAULT NULL,
description text, description text,
vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. 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%) tva_tx double(7,4), -- Vat rate (example 20%)
localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate
localtax1_type varchar(10) NULL, -- localtax1 type 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 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. 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%) remise_percent real DEFAULT 0, -- % de la remise ligne (exemple 20%)

View File

@ -30,10 +30,10 @@ create table llx_facturedet_rec
label varchar(255) DEFAULT NULL, label varchar(255) DEFAULT NULL,
description text, description text,
vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. 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 tva_tx double(7,4), -- taux tva
localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate
localtax1_type varchar(10) NULL, -- localtax1 type 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 localtax2_type varchar(10) NULL, -- localtax2 type
qty real, -- quantity qty real, -- quantity
remise_percent real DEFAULT 0, -- pourcentage de remise remise_percent real DEFAULT 0, -- pourcentage de remise

View File

@ -47,11 +47,11 @@ create table llx_product
price_base_type varchar(3) DEFAULT 'HT', price_base_type varchar(3) DEFAULT 'HT',
cost_price double(24,8) DEFAULT NULL, -- Cost price without tax. Can be used for margin calculation. 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. 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 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', 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', localtax2_type varchar(10) NOT NULL DEFAULT '0',
fk_user_author integer DEFAULT NULL, -- user making creation fk_user_author integer DEFAULT NULL, -- user making creation
fk_user_modif integer, -- user making last change fk_user_modif integer, -- user making last change

View File

@ -35,11 +35,11 @@ create table llx_product_customer_price
price_min_ttc double(24,8) DEFAULT 0, price_min_ttc double(24,8) DEFAULT 0,
price_base_type varchar(3) DEFAULT 'HT', 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(6,3), tva_tx double(7,4),
recuperableonly integer NOT NULL DEFAULT '0', -- Other NPR VAT 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', 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', localtax2_type varchar(10) NOT NULL DEFAULT '0',
fk_user integer, fk_user integer,
import_key varchar(14) -- Import key import_key varchar(14) -- Import key

View File

@ -34,11 +34,11 @@ create table llx_product_customer_price_log
price_min_ttc double(24,8) DEFAULT 0, price_min_ttc double(24,8) DEFAULT 0,
price_base_type varchar(3) DEFAULT 'HT', 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(6,3), tva_tx double(7,4),
recuperableonly integer NOT NULL DEFAULT '0', -- Other NPR VAT 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', 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', localtax2_type varchar(10) NOT NULL DEFAULT '0',
fk_user integer, fk_user integer,
import_key varchar(14) -- Import key import_key varchar(14) -- Import key

View File

@ -39,10 +39,10 @@ create table llx_product_fournisseur_price
default_vat_code varchar(10), default_vat_code varchar(10),
barcode varchar(180) DEFAULT NULL, -- barcode barcode varchar(180) DEFAULT NULL, -- barcode
fk_barcode_type integer DEFAULT NULL, -- barcode type fk_barcode_type integer DEFAULT NULL, -- barcode type
tva_tx double(6,3) NOT NULL, tva_tx double(7,4) NOT NULL,
localtax1_tx double(6,3) DEFAULT 0, localtax1_tx double(7,4) DEFAULT 0,
localtax1_type varchar(10) NOT NULL 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', localtax2_type varchar(10) NOT NULL DEFAULT '0',
info_bits integer NOT NULL DEFAULT 0, info_bits integer NOT NULL DEFAULT 0,
fk_user integer, fk_user integer,

View File

@ -35,11 +35,11 @@ create table llx_product_price
price_min_ttc double(24,8) default NULL, price_min_ttc double(24,8) default NULL,
price_base_type varchar(3) DEFAULT 'HT', 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(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', 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', 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', localtax2_type varchar(10) NOT NULL DEFAULT '0',
fk_user_author integer, fk_user_author integer,
tosell tinyint DEFAULT 1, tosell tinyint DEFAULT 1,

View File

@ -29,10 +29,10 @@ create table llx_propaldet
description text, description text,
fk_remise_except integer NULL, -- Lien vers table des remises fixes 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. 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 tva_tx double(7,4) DEFAULT 0, -- Vat rate
localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate localtax1_tx double(7,4) DEFAULT 0, -- localtax1 rate
localtax1_type varchar(10) NULL, -- localtax1 type 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 localtax2_type varchar(10) NULL, -- localtax2 type
qty real, -- quantity qty real, -- quantity
remise_percent real DEFAULT 0, -- pourcentage de remise remise_percent real DEFAULT 0, -- pourcentage de remise

View File

@ -99,9 +99,9 @@ create table llx_societe
fk_shipping_method integer, -- preferred shipping method id fk_shipping_method integer, -- preferred shipping method id
tva_assuj tinyint DEFAULT 1, -- assujeti ou non a la TVA tva_assuj tinyint DEFAULT 1, -- assujeti ou non a la TVA
localtax1_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 1 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_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 barcode varchar(180), -- barcode
fk_barcode_type integer NULL DEFAULT 0, -- barcode type fk_barcode_type integer NULL DEFAULT 0, -- barcode type
price_level integer NULL, -- level of price for multiprices price_level integer NULL, -- level of price for multiprices

View File

@ -27,7 +27,7 @@ create table llx_societe_remise
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datec datetime, -- creation date datec datetime, -- creation date
fk_user_author integer, -- creation user 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 note text
)ENGINE=innodb; )ENGINE=innodb;

View File

@ -29,7 +29,7 @@ create table llx_societe_remise_except
amount_ht double(24,8) NOT NULL, amount_ht double(24,8) NOT NULL,
amount_tva double(24,8) DEFAULT 0 NOT NULL, amount_tva double(24,8) DEFAULT 0 NOT NULL,
amount_ttc 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. 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_user integer NOT NULL,
fk_facture_line integer, fk_facture_line integer,

View File

@ -27,7 +27,7 @@ create table llx_societe_remise_supplier
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
datec datetime, -- creation date datec datetime, -- creation date
fk_user_author integer, -- creation user 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 note text
)ENGINE=innodb; )ENGINE=innodb;

View File

@ -24,10 +24,10 @@ CREATE TABLE llx_supplier_proposaldet (
description text, description text,
fk_remise_except integer DEFAULT NULL, 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. 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 tva_tx double(7,4) DEFAULT 0, -- Vat rate
localtax1_tx double(6,3) DEFAULT 0, localtax1_tx double(7,4) DEFAULT 0,
localtax1_type varchar(10) DEFAULT NULL, 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, localtax2_type varchar(10) DEFAULT NULL,
qty double DEFAULT NULL, qty double DEFAULT NULL,
remise_percent double DEFAULT '0', remise_percent double DEFAULT '0',