Adaptation pour dolibarr head

This commit is contained in:
opensides 2004-06-14 10:34:43 +00:00
parent eec68dcbb2
commit 9f1f0cf74e
17 changed files with 32 additions and 16 deletions

View File

@ -24,8 +24,8 @@ create table llx_c_pays
(
id SERIAL PRIMARY KEY,
libelle varchar(25),
code char(2) NOT NULL,
active tinyint default 1 NOT NULL
code char(2) NOT NULL,
active smallint default 1 NOT NULL
);

View File

@ -20,6 +20,7 @@
-- $Source$
--
-- ========================================================================
create table llx_chargesociales
(
rowid SERIAL PRIMARY KEY,

View File

@ -31,7 +31,7 @@ create table llx_const
name varchar(255),
value text, -- max 65535 caracteres
type CHAR(6) CHECK (type IN ('yesno','texte','chaine')),
visible int DEFAULT 1 NOT NULL,
visible smallint DEFAULT 1 NOT NULL,
note text
);

View File

@ -1,5 +1,6 @@
-- ============================================================================
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@ -31,6 +32,7 @@ create table llx_contrat
fk_soc integer NOT NULL,
fk_product integer NOT NULL,
fk_facture integer NOT NULL default 0,
fk_facturedet integer NOT NULL default 0,
fk_user_author integer NOT NULL,
fk_user_mise_en_service integer NOT NULL,
fk_user_cloture integer NOT NULL

View File

@ -1,4 +1,6 @@
-- ===================================================================
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
--
-- $Id$
-- $Source$
--
@ -27,5 +29,6 @@ create table llx_cotisation
fk_adherent integer,
dateadh timestamp,
cotisation real,
fk_bank int(11) default NULL,
note text
);

View File

@ -28,7 +28,7 @@ create table llx_entrepot
tms timestamp,
label varchar(255),
description text,
statut tinyint default 1, -- 1 ouvert, 0 fermé
fk_user_author integer
);

View File

@ -26,9 +26,6 @@ create table llx_expeditiondet
fk_expedition integer not null,
fk_commande_ligne integer not null,
qty real, -- quantité
key(fk_expedition),
key(fk_commande_ligne)
);
CREATE INDEX llx_expeditiondet_fk_expedition ON llx_expeditiondet(fk_expedition);

View File

@ -31,8 +31,10 @@ create table llx_facture
paye smallint default 0 NOT NULL,
amount real default 0 NOT NULL,
remise real default 0,
remise_percent real default 0,
tva real default 0,
total real default 0,
total_ttc real default 0,
fk_statut smallint default 0 NOT NULL,
author varchar(50),
fk_user integer, -- createur de la facture

View File

@ -44,4 +44,4 @@ create table llx_facture_fourn
note text
);
create unique index llx_facture_fourn_facnumber on llx_facture_fourn(facnumber);
create unique index llx_facture_fourn_facnumber on llx_facture_fourn(facnumber, fksoc);

View File

@ -32,7 +32,9 @@ create table llx_facturedet
remise_percent real default 0, -- pourcentage de remise
remise real default 0, -- montant de la remise
subprice real, -- prix avant remise
price real -- prix final
price real, -- prix final
date_start timestamp, -- date debut si service
date_end timestamp -- date fin si service
);
CREATE INDEX llx_facturedet_fk_facture ON llx_facturedet (fk_facture);

View File

@ -39,4 +39,3 @@ create table llx_fichinter
CREATE UNIQUE INDEX llx_fichinter_ref ON llx_fichinter(ref);
CREATE INDEX llx_fichinter_fk_soc ON llx_fichinter(fk_soc);

View File

@ -28,6 +28,7 @@ create table llx_groupart
tms timestamp,
nom varchar(64),
groupart CHAR(8) CHECK (groupart IN ('artiste','groupe')) NOT NULL,
description text NOT NULL,
fk_user_author integer
);

View File

@ -1,4 +1,6 @@
-- ===================================================================
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
--
-- $Id$
-- $Source$
--
@ -23,10 +25,14 @@ create table llx_paiement
rowid SERIAL PRIMARY KEY,
fk_facture integer,
datec timestamp,
tms timestamp,
datep timestamp, -- payment date
amount real default 0,
author varchar(50),
fk_paiement integer NOT NULL,
num_paiement varchar(50),
note text
note text,
fk_bank integer NOT NULL,
fk_user_creat integer, -- utilisateur qui a créé l'info
fk_user_modif integer -- utilisateur qui a modifié l'info
);

View File

@ -31,5 +31,6 @@ create table llx_paiementfourn
fk_user_author integer, -- auteur
fk_paiement integer NOT NULL, -- moyen de paiement
num_paiement varchar(50), -- numéro de paiement (cheque)
note text
note text,
fk_bank integer NOT NULL
);

View File

@ -35,6 +35,8 @@ create table llx_product
envente smallint default 1,
nbvente integer default 0,
fk_product_type integer default 0,
duration varchar(6)
duration varchar(6),
stock_propale integer default 0,
stock_commande integer default 0,
seuil_stock_alerte integer default 0
);

View File

@ -27,7 +27,7 @@ create table llx_product_stock
tms timestamp,
fk_product integer NOT NULL,
fk_stock integer NOT NULL,
value integer
reel integer
);
CREATE INDEX llx_product_stock_fk_product ON llx_product_stock (fk_product);

View File

@ -30,6 +30,7 @@ create table llx_propal
fk_projet integer default 0, -- projet auquel est rattache la propale
ref varchar(30) NOT NULL, -- propal number
datec timestamp, -- date de creation
fin_validite timestamp, -- date de fin de validite
date_valid timestamp, -- date de validation
date_cloture timestamp, -- date de cloture
datep date, -- date de la propal
@ -48,4 +49,3 @@ create table llx_propal
create unique index llx_propal_ref on llx_propal(ref);
create index llx_propal_fk_soc on llx_propal(fk_soc);