Skip to content
Snippets Groups Projects
Commit 85cd3917 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Add import_key field.

parent eaa4f3ef
No related branches found
No related tags found
No related merge requests found
......@@ -35,3 +35,15 @@ alter table llx_rights_def modify column type varchar(1);
ALTER TABLE `llx_commandedet` ADD column `date_start` DATETIME DEFAULT NULL, ADD `date_end` DATETIME DEFAULT NULL ;
alter table llx_categorie add column fk_soc integer DEFAULT 0 after description;
alter table llx_product drop column nbvente;
alter table llx_product add column import_key varchar(14);
alter table llx_socpeople add column import_key varchar(14);
alter table llx_facture add column import_key varchar(14);
alter table llx_facturedet add column import_key varchar(14);
alter table llx_commande add column import_key varchar(14);
alter table llx_commandedet add column import_key varchar(14);
alter table llx_facture_fourn add column import_key varchar(14);
alter table llx_facture_fourn_det add column import_key varchar(14);
......@@ -52,6 +52,5 @@ create table llx_commande
fk_mode_reglement integer, -- mode de rglement
date_livraison date default NULL,
fk_adresse_livraison integer, -- adresse de livraison
UNIQUE INDEX (ref)
import_key varchar(14)
)type=innodb;
......@@ -25,11 +25,11 @@ create table llx_commandedet
fk_commande integer,
fk_product integer,
description text,
tva_tx double(6,3), -- taux tva
tva_tx double(6,3), -- taux tva
qty real, -- quantit
remise_percent real DEFAULT 0, -- pourcentage de remise
remise real DEFAULT 0, -- montant de la remise
fk_remise_except integer NULL, -- Lien vers table des remises fixes
fk_remise_except integer NULL, -- Lien vers table des remises fixes
price real, -- prix final
subprice double(24,8) DEFAULT 0, -- prix unitaire
total_ht double(24,8) DEFAULT 0, -- Total HT de la ligne toute quantit et incluant remise ligne et globale
......@@ -37,17 +37,18 @@ create table llx_commandedet
total_ttc double(24,8) DEFAULT 0, -- Total TTC de la ligne toute quantit et incluant remise ligne et globale
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
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)
special_code tinyint(4) UNSIGNED DEFAULT 0, -- code pour les lignes speciales
rang integer DEFAULT 0
rang integer DEFAULT 0,
import_key varchar(14)
)type=innodb;
--
-- Liste des codes pour special_code
-- List of codes for special_code
--
-- 1 : frais de port
-- 2 : ecotaxe
-- 3 : produit/service propose en option
--
\ No newline at end of file
--
......@@ -58,5 +58,7 @@ create table llx_facture
note text,
note_public text,
model_pdf varchar(50)
model_pdf varchar(50),
import_key varchar(14)
)type=innodb;
......@@ -48,5 +48,6 @@ create table llx_facture_fourn
date_lim_reglement date, -- date limite de reglement
note text,
note_public text
note_public text,
import_key varchar(14)
)type=innodb;
......@@ -31,5 +31,6 @@ create table llx_facture_fourn_det
total_ht double(24,8) DEFAULT 0,
tva double(24,8) DEFAULT 0,
total_ttc double(24,8) DEFAULT 0,
product_type integer DEFAULT 0
product_type integer DEFAULT 0,
import_key varchar(14)
)type=innodb;
......@@ -24,31 +24,32 @@ create table llx_facturedet
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_facture integer NOT NULL,
fk_product integer NULL, -- Doit pouvoir etre nul pour ligne detail sans produits
fk_product integer NULL, -- Doit pouvoir etre nul pour ligne detail sans produits
description text,
tva_taux real, -- Taux tva produit/service (exemple 19.6)
qty real, -- Quantit (exemple 2)
tva_taux real, -- Taux tva produit/service (exemple 19.6)
qty real, -- Quantit (exemple 2)
remise_percent real DEFAULT 0, -- % de la remise ligne (exemple 20%)
remise real DEFAULT 0, -- Montant calcul de la remise % sur PU HT (exemple 20)
fk_remise_except integer NULL, -- Lien vers table des remises fixes
subprice real, -- P.U. HT (exemple 100)
price real, -- P.U. HT apres remise % de ligne
total_ht real, -- Total HT de la ligne toute quantit et incluant remise ligne et globale
total_tva real, -- Total TVA de la ligne toute quantit et incluant remise ligne et globale
total_ttc real, -- Total TTC de la ligne toute quantit et incluant remise ligne et globale
fk_remise_except integer NULL, -- Lien vers table des remises fixes
subprice real, -- P.U. HT (exemple 100)
price real, -- P.U. HT apres remise % de ligne
total_ht real, -- Total HT de la ligne toute quantit et incluant remise ligne et globale
total_tva real, -- Total TVA de la ligne toute quantit et incluant remise ligne et globale
total_ttc real, -- Total TTC de la ligne toute quantit et incluant remise ligne et globale
product_type integer DEFAULT 0,
date_start datetime DEFAULT NULL, -- date debut si service
date_end datetime DEFAULT NULL, -- date fin si service
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
fk_code_ventilation integer DEFAULT 0 NOT NULL,
fk_export_compta integer DEFAULT 0 NOT NULL,
special_code tinyint(4) UNSIGNED DEFAULT 0, -- code pour les lignes speciales
rang integer DEFAULT 0 -- ordre d'affichage
rang integer DEFAULT 0, -- ordre d'affichage
import_key varchar(14)
)type=innodb;
--
-- Liste des codes pour special_code
-- List of codes for special_code
--
-- 1 : frais de port
-- 2 : ecotaxe
--
\ No newline at end of file
--
......@@ -35,7 +35,6 @@ create table llx_product
tva_tx double(6,3),
fk_user_author integer,
envente tinyint DEFAULT 1,
nbvente integer DEFAULT 0,
fk_product_type integer DEFAULT 0,
duration varchar(6),
stock_propale integer DEFAULT 0,
......@@ -49,6 +48,7 @@ create table llx_product
weight_units tinyint DEFAULT NULL,
volume float DEFAULT NULL,
volume_units tinyint DEFAULT NULL,
canvas varchar(15) DEFAULT ''
canvas varchar(15) DEFAULT '',
import_key varchar(14)
)type=innodb;
......@@ -43,5 +43,6 @@ create table llx_socpeople
priv smallint NOT NULL DEFAULT 0,
fk_user_creat integer DEFAULT 0, -- user qui a cr l'enregistrement
fk_user_modif integer,
note text
note text,
import_key varchar(14)
)type=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