début ajout de la gestion des bons de livraison

This commit is contained in:
Regis Houssin 2006-05-05 16:04:15 +00:00
parent a0ede546e7
commit 37f6907e9f
2 changed files with 13 additions and 17 deletions

View File

@ -193,14 +193,13 @@ create table llx_livraison
fk_soc integer NOT NULL, fk_soc integer NOT NULL,
fk_soc_contact integer, fk_soc_contact integer,
fk_commande integer DEFAULT 0, fk_commande integer DEFAULT 0,
fk_expedition integer,
ref varchar(30) NOT NULL, ref varchar(30) NOT NULL,
date_creation datetime, date_creation datetime,
date_valid datetime, date_valid datetime,
fk_user_author integer, fk_user_author integer,
fk_user_valid integer, fk_user_valid integer,
fk_statut smallint default 0, fk_statut smallint default 0,
total_ht real default 0,
total_ttc real default 0,
note text, note text,
note_public text, note_public text,
model_pdf varchar(50), model_pdf varchar(50),
@ -212,15 +211,13 @@ create table llx_livraison
create table llx_livraisondet create table llx_livraisondet
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_livraison integer, fk_livraison integer,
fk_product integer, fk_commande_ligne integer NOT NULL,
label varchar(255), qty real,
description text, key(fk_livraison),
qty real, -- quantité key(fk_commande_ligne)
price real -- prix final
)type=innodb; )type=innodb;
alter table llx_livraison add column fk_expedition integer after fk_commande;
ALTER TABLE llx_livraison ADD INDEX idx_livraison_fk_soc (fk_soc); ALTER TABLE llx_livraison ADD INDEX idx_livraison_fk_soc (fk_soc);
ALTER TABLE llx_livraison ADD CONSTRAINT fk_livraison_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); ALTER TABLE llx_livraison ADD CONSTRAINT fk_livraison_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);

View File

@ -21,11 +21,10 @@
create table llx_livraisondet create table llx_livraisondet
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_livraison integer, fk_livraison integer,
fk_product integer, fk_commande_ligne integer NOT NULL,
label varchar(255), qty real, -- quantité
description text, key(fk_livraison),
qty real, -- quantité key(fk_commande_ligne)
price real -- prix final
)type=innodb; )type=innodb;