updata database for margin module
This commit is contained in:
parent
9116db986f
commit
a37707f96f
@ -41,3 +41,20 @@ ALTER TABLE llx_mailing ADD COLUMN extraparams varchar(255);
|
|||||||
ALTER TABLE llx_product MODIFY ref varchar(128) NOT NULL;
|
ALTER TABLE llx_product MODIFY ref varchar(128) NOT NULL;
|
||||||
ALTER TABLE llx_product MODIFY ref_ext varchar(128);
|
ALTER TABLE llx_product MODIFY ref_ext varchar(128);
|
||||||
|
|
||||||
|
ALTER TABLE llx_product_fournisseur_price ADD charges DOUBLE( 24, 8 ) DEFAULT 0 AFTER unitprice;
|
||||||
|
ALTER TABLE llx_product_fournisseur_price ADD unitcharges DOUBLE( 24, 8 ) DEFAULT 0 AFTER charges;
|
||||||
|
|
||||||
|
alter table llx_commandedet add column fk_product_fournisseur_price int(11) after info_bits;
|
||||||
|
alter table llx_commandedet add column buy_price_ht double(24,8) after fk_product_fournisseur_price;
|
||||||
|
alter table llx_commandedet drop column marge_tx;
|
||||||
|
alter table llx_commandedet drop column marque_tx;
|
||||||
|
|
||||||
|
alter table llx_facturedet add column fk_product_fournisseur_price int(11) after info_bits;
|
||||||
|
alter table llx_facturedet add column buy_price_ht double(24,8) after fk_product_fournisseur_price;
|
||||||
|
|
||||||
|
alter table llx_propaldet add column fk_product_fournisseur_price int(11) after info_bits;
|
||||||
|
alter table llx_propaldet add column buy_price_ht double(24,8) after fk_product_fournisseur_price;
|
||||||
|
alter table llx_propaldet drop column pa_ht;
|
||||||
|
alter table llx_propaldet drop column marge_tx;
|
||||||
|
alter table llx_propaldet drop column marque_tx;
|
||||||
|
|
||||||
|
|||||||
@ -43,8 +43,8 @@ create table llx_commandedet
|
|||||||
date_start datetime DEFAULT NULL, -- date debut si service
|
date_start datetime DEFAULT NULL, -- date debut si service
|
||||||
date_end datetime DEFAULT NULL, -- date fin si service
|
date_end datetime DEFAULT NULL, -- date fin si service
|
||||||
info_bits integer DEFAULT 0, -- TVA NPR ou non
|
info_bits integer DEFAULT 0, -- TVA NPR ou non
|
||||||
marge_tx double(6,3) DEFAULT 0, -- taux de marge (marge sur prix d'achat)
|
buy_price_ht double(24,8) DEFAULT 0, -- prix d'achat HT
|
||||||
marque_tx double(6,3) DEFAULT 0, -- taux de marque (marge sur prix de vente)
|
fk_product_fournisseur_price int(11) DEFAULT NULL, -- référence prix fournisseur
|
||||||
special_code integer UNSIGNED DEFAULT 0, -- code pour les lignes speciales
|
special_code integer UNSIGNED DEFAULT 0, -- code pour les lignes speciales
|
||||||
rang integer DEFAULT 0,
|
rang integer DEFAULT 0,
|
||||||
import_key varchar(14)
|
import_key varchar(14)
|
||||||
|
|||||||
@ -45,6 +45,8 @@ create table llx_facturedet
|
|||||||
date_start datetime DEFAULT NULL, -- date debut si service
|
date_start datetime DEFAULT NULL, -- date debut si service
|
||||||
date_end datetime DEFAULT NULL, -- date fin si service
|
date_end datetime DEFAULT NULL, -- date fin si service
|
||||||
info_bits integer DEFAULT 0, -- TVA NPR ou non
|
info_bits integer DEFAULT 0, -- TVA NPR ou non
|
||||||
|
buy_price_ht double(24,8) DEFAULT 0, -- prix d'achat HT
|
||||||
|
fk_product_fournisseur_price int(11) DEFAULT NULL, -- référence prix fournisseur
|
||||||
fk_code_ventilation integer DEFAULT 0 NOT NULL,
|
fk_code_ventilation integer DEFAULT 0 NOT NULL,
|
||||||
fk_export_compta integer DEFAULT 0 NOT NULL,
|
fk_export_compta integer DEFAULT 0 NOT NULL,
|
||||||
special_code integer UNSIGNED DEFAULT 0, -- code pour les lignes speciales
|
special_code integer UNSIGNED DEFAULT 0, -- code pour les lignes speciales
|
||||||
|
|||||||
@ -23,14 +23,16 @@ create table llx_product_fournisseur_price
|
|||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
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,
|
datec datetime,
|
||||||
tms timestamp,
|
tms timestamp,
|
||||||
fk_product integer,
|
fk_product integer,
|
||||||
fk_soc integer,
|
fk_soc integer,
|
||||||
ref_fourn varchar(30),
|
ref_fourn varchar(30),
|
||||||
fk_availability integer,
|
fk_availability integer,
|
||||||
price double(24,8) DEFAULT 0,
|
price double(24,8) DEFAULT 0,
|
||||||
quantity double,
|
quantity double,
|
||||||
unitprice double(24,8) DEFAULT 0,
|
unitprice double(24,8) DEFAULT 0,
|
||||||
|
charges double(24,8) DEFAULT 0,
|
||||||
|
unitcharges double(24,8) DEFAULT 0,
|
||||||
tva_tx double(6,3) NOT NULL,
|
tva_tx double(6,3) NOT NULL,
|
||||||
fk_user integer
|
fk_user integer
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -44,9 +44,8 @@ create table llx_propaldet
|
|||||||
date_end datetime DEFAULT NULL, -- date fin si service
|
date_end datetime DEFAULT NULL, -- date fin si service
|
||||||
info_bits integer DEFAULT 0, -- TVA NPR ou non
|
info_bits integer DEFAULT 0, -- TVA NPR ou non
|
||||||
|
|
||||||
pa_ht double(24,8) DEFAULT 0, -- prix d'achat HT
|
buy_price_ht double(24,8) DEFAULT 0, -- prix d'achat HT
|
||||||
marge_tx double(6,3) DEFAULT 0, -- taux de marge (marge sur prix d'achat)
|
fk_product_fournisseur_price int(11) DEFAULT NULL, -- référence prix fournisseur
|
||||||
marque_tx double(6,3) DEFAULT 0, -- taux de marque (marge sur prix de vente)
|
|
||||||
|
|
||||||
special_code integer DEFAULT 0, -- code pour les lignes speciales
|
special_code integer DEFAULT 0, -- code pour les lignes speciales
|
||||||
rang integer DEFAULT 0 -- ordre affichage sur la propal
|
rang integer DEFAULT 0 -- ordre affichage sur la propal
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user