Skip to content
Snippets Groups Projects
Commit a37707f9 authored by Christophe Battarel's avatar Christophe Battarel
Browse files

updata database for margin module

parent 9116db98
No related branches found
No related tags found
No related merge requests found
......@@ -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_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_end datetime DEFAULT NULL, -- date fin si service
info_bits integer DEFAULT 0, -- TVA NPR ou non
marge_tx double(6,3) DEFAULT 0, -- taux de marge (marge sur prix d'achat)
marque_tx double(6,3) DEFAULT 0, -- taux de marque (marge sur prix de vente)
buy_price_ht double(24,8) DEFAULT 0, -- prix d'achat HT
fk_product_fournisseur_price int(11) DEFAULT NULL, -- rfrence prix fournisseur
special_code integer UNSIGNED DEFAULT 0, -- code pour les lignes speciales
rang integer DEFAULT 0,
import_key varchar(14)
......
......@@ -45,6 +45,8 @@ create table llx_facturedet
date_start datetime DEFAULT NULL, -- date debut si service
date_end datetime DEFAULT NULL, -- date fin si service
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, -- rfrence prix fournisseur
fk_code_ventilation integer DEFAULT 0 NOT NULL,
fk_export_compta integer DEFAULT 0 NOT NULL,
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,
entity integer DEFAULT 1 NOT NULL, -- multi company id
datec datetime,
tms timestamp,
fk_product integer,
tms timestamp,
fk_product integer,
fk_soc integer,
ref_fourn varchar(30),
fk_availability integer,
ref_fourn varchar(30),
fk_availability integer,
price double(24,8) DEFAULT 0,
quantity double,
unitprice double(24,8) DEFAULT 0,
quantity double,
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,
fk_user integer
)ENGINE=innodb;
......@@ -44,10 +44,9 @@ create table llx_propaldet
date_end datetime DEFAULT NULL, -- date fin si service
info_bits integer DEFAULT 0, -- TVA NPR ou non
pa_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)
marque_tx double(6,3) DEFAULT 0, -- taux de marque (marge sur prix de vente)
buy_price_ht double(24,8) DEFAULT 0, -- prix d'achat HT
fk_product_fournisseur_price int(11) DEFAULT NULL, -- rfrence prix fournisseur
special_code integer DEFAULT 0, -- code pour les lignes speciales
rang integer DEFAULT 0 -- ordre affichage sur la propal
)ENGINE=innodb;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment