diff --git a/pgsql/tables/llx_boxes.sql b/pgsql/tables/llx_boxes.sql new file mode 100644 index 00000000000..881f4dae909 --- /dev/null +++ b/pgsql/tables/llx_boxes.sql @@ -0,0 +1,33 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- =========================================================================== +-- +-- position : 0-index.php, 1-left, 2-right +-- +-- + +create table llx_boxes +( + rowid SERIAL PRIMARY KEY, + box_id integer NOT NULL, + position smallint NOT NULL + +); diff --git a/pgsql/tables/llx_boxes_def.sql b/pgsql/tables/llx_boxes_def.sql new file mode 100644 index 00000000000..56a08315024 --- /dev/null +++ b/pgsql/tables/llx_boxes_def.sql @@ -0,0 +1,29 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- =========================================================================== + +create table llx_boxes_def +( + rowid SERIAL PRIMARY KEY, + name varchar(255) NOT NULL, + file varchar(255) NOT NULL, + note text +); diff --git a/pgsql/tables/llx_concert.sql b/pgsql/tables/llx_concert.sql new file mode 100644 index 00000000000..c3d311c5c62 --- /dev/null +++ b/pgsql/tables/llx_concert.sql @@ -0,0 +1,34 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ============================================================================ + +create table llx_concert +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + date_concert timestamp, + description text, + collectif int DEFAULT 0 NOT NULL, + fk_groupart integer, + fk_lieu_concert integer, + fk_user_author integer +); + diff --git a/pgsql/tables/llx_cond_reglement.sql b/pgsql/tables/llx_cond_reglement.sql new file mode 100644 index 00000000000..2fa4bcb5e3e --- /dev/null +++ b/pgsql/tables/llx_cond_reglement.sql @@ -0,0 +1,33 @@ +-- ============================================================================ +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit mortier +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ============================================================================ + +create table llx_cond_reglement +( + rowid SERIAL PRIMARY KEY, + sortorder smallint, + actif int default 1, + libelle varchar(255), + libelle_facture text, + fdm smallint, -- reglement fin de mois + nbjour smallint +); diff --git a/pgsql/tables/llx_const.sql b/pgsql/tables/llx_const.sql new file mode 100644 index 00000000000..ecc09ea44c9 --- /dev/null +++ b/pgsql/tables/llx_const.sql @@ -0,0 +1,38 @@ +-- ============================================================================ +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2003 Jean-Louis Bergamo +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- =========================================================================== +-- +-- Definitions des constantes utilisés comme parametres de configuration +-- + +create table llx_const +( + rowid SERIAL PRIMARY KEY, + name varchar(255), + value text, -- max 65535 caracteres + type CHAR(6) CHECK (type IN ('yesno','texte','chaine')), + visible int DEFAULT 1 NOT NULL, + note text +); + +CREATE UNIQUE INDEX llx_const_idx ON llx_const (name); diff --git a/pgsql/tables/llx_contrat.sql b/pgsql/tables/llx_contrat.sql new file mode 100644 index 00000000000..d7122517fe4 --- /dev/null +++ b/pgsql/tables/llx_contrat.sql @@ -0,0 +1,38 @@ +-- ============================================================================ +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ============================================================================ + +create table llx_contrat +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + enservice smallint default 0, + mise_en_service timestamp, + fin_validite timestamp, + date_cloture timestamp, + fk_soc integer NOT NULL, + fk_product integer NOT NULL, + fk_facture 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 +); + diff --git a/pgsql/tables/llx_deplacement.sql b/pgsql/tables/llx_deplacement.sql new file mode 100644 index 00000000000..f3224f6ae75 --- /dev/null +++ b/pgsql/tables/llx_deplacement.sql @@ -0,0 +1,35 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ============================================================================ + +create table llx_deplacement +( + rowid SERIAL PRIMARY KEY, + datec timestamp, + tms timestamp, + dated timestamp, + fk_user integer NOT NULL, + fk_user_author integer, + type smallint NOT NULL, + km smallint, + fk_soc integer, + note text +); diff --git a/pgsql/tables/llx_editeur.sql b/pgsql/tables/llx_editeur.sql new file mode 100644 index 00000000000..1942a667cdf --- /dev/null +++ b/pgsql/tables/llx_editeur.sql @@ -0,0 +1,32 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ============================================================================ + +create table llx_editeur +( + rowid SERIAL PRIMARY KEY, + oscid integer NOT NULL, + tms timestamp, + nom varchar(255), + fk_user_author integer +); + diff --git a/pgsql/tables/llx_entrepot.sql b/pgsql/tables/llx_entrepot.sql new file mode 100644 index 00000000000..f245ebbbafe --- /dev/null +++ b/pgsql/tables/llx_entrepot.sql @@ -0,0 +1,34 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ============================================================================ + +create table llx_entrepot +( + rowid SERIAL PRIMARY KEY, + datec timestamp, + tms timestamp, + label varchar(255), + description text, + fk_user_author integer + +); + diff --git a/pgsql/tables/llx_facture_fourn_det.sql b/pgsql/tables/llx_facture_fourn_det.sql new file mode 100644 index 00000000000..db21fabb860 --- /dev/null +++ b/pgsql/tables/llx_facture_fourn_det.sql @@ -0,0 +1,35 @@ +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- =================================================================== + +create table llx_facture_fourn_det +( + rowid SERIAL PRIMARY KEY, + fk_facture_fourn integer NOT NULL, + fk_product integer NULL, + description text, + pu_ht real default 0, + qty smallint default 1, + total_ht real default 0, + tva_taux real default 0, + tva real default 0, + total_ttc real default 0 +); diff --git a/pgsql/tables/llx_facture_rec.sql b/pgsql/tables/llx_facture_rec.sql new file mode 100644 index 00000000000..8e5758972f9 --- /dev/null +++ b/pgsql/tables/llx_facture_rec.sql @@ -0,0 +1,40 @@ +-- =========================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- =========================================================================== + +create table llx_facture_rec +( + rowid SERIAL PRIMARY KEY, + titre varchar(50) NOT NULL, + fk_soc integer NOT NULL, + datec timestamp, -- date de creation + 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_user_author integer, -- createur + fk_projet integer, -- projet auquel est associé la facture + fk_cond_reglement integer, -- condition de reglement + note text +); + +CREATE INDEX llx_facture_rec_fksoc ON llx_facture_rec (fk_soc); diff --git a/pgsql/tables/llx_facture_tva_sum.sql b/pgsql/tables/llx_facture_tva_sum.sql new file mode 100644 index 00000000000..a9d70985a5e --- /dev/null +++ b/pgsql/tables/llx_facture_tva_sum.sql @@ -0,0 +1,30 @@ +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- =================================================================== + +create table llx_facture_tva_sum +( + fk_facture integer NOT NULL, + amount real NOT NULL, + tva_tx real NOT NULL +); + +CREATE INDEX llx_facture_tva_sum_fk_facture ON llx_facture_tva_sum (fk_facture); diff --git a/pgsql/tables/llx_facturedet_rec.sql b/pgsql/tables/llx_facturedet_rec.sql new file mode 100644 index 00000000000..affc3309635 --- /dev/null +++ b/pgsql/tables/llx_facturedet_rec.sql @@ -0,0 +1,35 @@ +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- 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 +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- =================================================================== + +create table llx_facturedet_rec +( + rowid SERIAL PRIMARY KEY, + fk_facture integer NOT NULL, + fk_product integer, + description text, + tva_taux real default 19.6, -- taux tva + qty real, -- quantité + 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 +);