diff --git a/pgsql/Makefile b/pgsql/Makefile new file mode 100644 index 00000000000..02d5f884042 --- /dev/null +++ b/pgsql/Makefile @@ -0,0 +1,78 @@ +# +# Copyright (C) 2001-2002 Rodolphe Quiedeville +# Copyright (C) 2002-2003 Éric Seigne +# +# $Id$ +# $Source$ +# +# 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. +# +# General Makefile for Mysql database +# + +SQL=psql +BASE=dolibarr +OPTIONS=-U postgres +OWNER=dolibarradm +OWNERPASS=azaz + +all: + cd tables \ + && make show + +show: + cd tables \ + && make show + +table: + cd tables \ + && make create + +dev: + cd data \ + && make dev + +fulldev: droptable table load dev + +droptable: + cd tables \ + && make drop + +load: + $(SQL) $(OPTIONS) $(BASE) < data/data.sql + +drop: dropdb droppriv + +droppriv: + $(SQL) $(OPTIONS) template1 -c "revoke all privileges on database $(BASE) from $(OWNER) ; " + +dropuser: + $(SQL) $(OPTIONS) template1 -c "drop user $(OWNER) ; " + +dropdb: + $(SQL) $(OPTIONS) template1 -c "drop database $(BASE) ; " + +create: drop createuser createdb createpriv + +createuser: + $(SQL) $(OPTIONS) template1 -c "create user $(OWNER) with UNENCRYPTED PASSWORD '$(OWNERPASS)' ; " + +createdb: + $(SQL) $(OPTIONS) template1 -c "create database $(BASE) with owner = $(OWNER) ; " + +createpriv: + $(SQL) $(OPTIONS) template1 -c "grant all privileges on database $(BASE) to $(OWNER) ; " + + diff --git a/pgsql/data/Makefile b/pgsql/data/Makefile new file mode 100644 index 00000000000..2750d67d945 --- /dev/null +++ b/pgsql/data/Makefile @@ -0,0 +1,32 @@ +# +# Copyright (C) 2001-2002 Rodolphe Quiedeville +# Copyright (C) 2002-2003 Éric Seigne +# +# $Id$ +# $Source$ +# +# 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. +# +# General Makefile for Mysql database +# + +SQL=psql +BASE=dolibarr +OPTIONS=-U postgres + +dev: + $(SQL) $(OPTIONS) $(BASE) < data_dev.sql + $(SQL) $(OPTIONS) $(BASE) < propal_dev.sql + $(SQL) $(OPTIONS) $(BASE) < facture_dev.sql diff --git a/pgsql/data/data.sql b/pgsql/data/data.sql new file mode 100644 index 00000000000..5d2007e0409 --- /dev/null +++ b/pgsql/data/data.sql @@ -0,0 +1,113 @@ +-- +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- +-- Valeurs pour les bases de langues francaises +-- + +delete from c_chargesociales; +insert into c_chargesociales (id,libelle,deductible) values ( 1, 'Allocations familiales',1); +insert into c_chargesociales (id,libelle,deductible) values ( 2, 'GSG Deductible',1); +insert into c_chargesociales (id,libelle,deductible) values ( 3, 'GSG/CRDS NON Deductible',0); + + +delete from c_actioncomm; +insert into c_actioncomm (id,libelle) values ( 0, '-'); +insert into c_actioncomm (id,libelle) values ( 1, 'Appel Téléphonique'); +insert into c_actioncomm (id,libelle) values ( 2, 'Envoi Fax'); +insert into c_actioncomm (id,libelle) values ( 3, 'Envoi propal par mail'); +insert into c_actioncomm (id,libelle) values ( 4, 'Envoi d\'un email'); +insert into c_actioncomm (id,libelle) values ( 5, 'Rendez-vous'); +insert into c_actioncomm (id,libelle) values ( 9, 'Envoi Facture'); +insert into c_actioncomm (id,libelle) values (10, 'Relance effectuée'); +insert into c_actioncomm (id,libelle) values (11, 'Clôture'); + +delete from c_stcomm; +insert into c_stcomm (id,libelle) values (-1, 'NE PAS CONTACTER'); +insert into c_stcomm (id,libelle) values ( 0, 'Jamais contacté'); +insert into c_stcomm (id,libelle) values ( 1, 'A contacter'); +insert into c_stcomm (id,libelle) values ( 2, 'Contact en cours'); +insert into c_stcomm (id,libelle) values ( 3, 'Contactée'); + +delete from c_typent; +insert into c_typent (id,libelle) values ( 0, 'Indifférent'); +insert into c_typent (id,libelle) values ( 1, 'Start-up'); +insert into c_typent (id,libelle) values ( 2, 'Grand groupe'); +insert into c_typent (id,libelle) values ( 3, 'PME/PMI'); +insert into c_typent (id,libelle) values ( 4, 'Administration'); +insert into c_typent (id,libelle) values (100, 'Autres'); + +delete from c_pays; +insert into c_pays (id,libelle,code) values (0, 'France', 'FR'); +insert into c_pays (id,libelle,code) values (2, 'Belgique', 'BE'); +insert into c_pays (id,libelle,code) values (3, 'Italie', 'IT'); +insert into c_pays (id,libelle,code) values (4, 'Espagne', 'ES'); +insert into c_pays (id,libelle,code) values (5, 'Allemagne', 'DE'); +insert into c_pays (id,libelle,code) values (6, 'Suisse', 'CH'); +insert into c_pays (id,libelle,code) values (7, 'Royaume uni', 'GB'); +insert into c_pays (id,libelle,code) values (8, 'Irlande', 'IE'); +insert into c_pays (id,libelle,code) values (9, 'Chine', 'CN'); +insert into c_pays (id,libelle,code) values (10, 'Tunisie', 'TN'); +insert into c_pays (id,libelle,code) values (11, 'Etats Unis', 'US'); +insert into c_pays (id,libelle,code) values (12, 'Maroc', 'MA'); +insert into c_pays (id,libelle,code) values (13, 'Algérie', 'DZ'); +insert into c_pays (id,libelle,code) values (14, 'Canada', 'CA'); +insert into c_pays (id,libelle,code) values (15, 'Togo', 'TG'); +insert into c_pays (id,libelle,code) values (16, 'Gabon', 'GA'); +insert into c_pays (id,libelle,code) values (17, 'Pays Bas', 'NL'); +insert into c_pays (id,libelle,code) values (18, 'Hongrie', 'HU'); +insert into c_pays (id,libelle,code) values (19, 'Russie', 'RU'); +insert into c_pays (id,libelle,code) values (20, 'Suède', 'SE'); +insert into c_pays (id,libelle,code) values (21, 'Côte d\'Ivoire', 'CI'); +insert into c_pays (id,libelle,code) values (23, 'Sénégal', 'SN'); +insert into c_pays (id,libelle,code) values (24, 'Argentine', 'AR'); +insert into c_pays (id,libelle,code) values (25, 'Cameroun', 'CM'); + +delete from c_effectif; +insert into c_effectif (id,libelle) values (0, 'Non spécifié'); +insert into c_effectif (id,libelle) values (1, '1 - 5'); +insert into c_effectif (id,libelle) values (2, '6 - 10'); +insert into c_effectif (id,libelle) values (3, '11 - 50'); +insert into c_effectif (id,libelle) values (4, '51 - 100'); +insert into c_effectif (id,libelle) values (5, '100 - 500'); +insert into c_effectif (id,libelle) values (6, '> 500'); + +delete from c_paiement; +insert into c_paiement (id,libelle,type) values (0, '-', 3); +insert into c_paiement (id,libelle,type) values (1, 'TIP', 1); +insert into c_paiement (id,libelle,type) values (2, 'Virement', 2); +insert into c_paiement (id,libelle,type) values (3, 'Prélèvement', 1); +insert into c_paiement (id,libelle,type) values (4, 'Liquide', 0); +insert into c_paiement (id,libelle,type) values (5, 'Paiement en ligne', 0); +insert into c_paiement (id,libelle,type) values (6, 'CB', 1); +insert into c_paiement (id,libelle,type) values (7, 'Chèque', 2); + +delete from c_propalst; +insert into c_propalst (id,label) values (0, 'Brouillon'); +insert into c_propalst (id,label) values (1, 'Ouverte'); +insert into c_propalst (id,label) values (2, 'Signée'); +insert into c_propalst (id,label) values (3, 'Non Signée'); +insert into c_propalst (id,label) values (4, 'Facturée'); + +-- +-- Utilisateur +-- +insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,admin,webcal_login) +values ('Quiedeville','Rodolphe','RQ','rodo','CRnN0Tam/s7z.',1,1,1,'rodo'); \ No newline at end of file diff --git a/pgsql/data/data_dev.sql b/pgsql/data/data_dev.sql new file mode 100644 index 00000000000..8c405f24ad2 --- /dev/null +++ b/pgsql/data/data_dev.sql @@ -0,0 +1,284 @@ +-- =========================================================================== +-- Copyright (C) 2001-2002 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$ +-- +-- Valeurs de test pour les developpements +-- Ne pas hésiter a compléter ce fichier avec de nouvelles valeurs, plus on a +-- de données, mieux on peut tester l'appli. +-- =========================================================================== +delete from llx_tva; +insert into llx_tva (datep, datev, amount) values ('2001-11-11','2001-10-01', 1960.00); +insert into llx_tva (datep, datev, amount) values ('2001-04-11','2001-01-01', 2000.00); + +delete from llx_facture_fourn; + +insert into llx_facture_fourn (facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +values ('LOL-509',1,'2001-05-09','2001-05-09',1,1000,0,196,1196,1,NULL,NULL,''); +insert into llx_facture_fourn (facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +values ('LOL-510',1,'2001-09-09','2001-09-09',1,100,0,19.6,119.6,1,NULL,NULL,''); + +insert into llx_facture_fourn (facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +values ('02-1-YHGT',2,now(),'2002-01-01',1,100,0,19.6,119.6,1,NULL,NULL,''); + +insert into llx_facture_fourn (facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +values ('02-5-YHGT',2,now(),'2002-05-01',1,1000,0,196,1196,1,NULL,NULL,''); + +insert into llx_facture_fourn (facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +values ('02-10-YHGT',2,now(),'2002-10-01',1,1000,0,196,1196,1,NULL,NULL,''); +insert into llx_facture_fourn (facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +values ('02-11-YHGT',2,now(),'2002-11-01',1,1000,0,196,1196,1,NULL,NULL,''); +insert into llx_facture_fourn (facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +values ('02-12-YHGT',2,now(),'2002-12-01',1,1000,0,196,1196,1,NULL,NULL,''); + + + +delete from llx_user; +insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,admin,webcal_login) +values ('Quiedeville','Rodolphe','RQ','rodo','CRnN0Tam/s7z.',1,1,1,'rodo'); + +insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,webcal_login) +values ('demo','demo','DEMO','demo','demo',1,0,'demo'); + +insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,webcal_login) +values ('demo1','demo1','DM1','demo1','demo',1,0,'demo1'); +insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,webcal_login) +values ('demo2','demo2','DM2','demo2','demo',1,0,'demo2'); +-- +-- Societe +-- +delete from societe; +insert into societe (nom,datec,cp,ville,tel,fax, client, prefix_comm, fournisseur) +values ('Bolix SA',now(),'56350','Allaire','01 40 15 03 18','01 40 15 06 18',1,'LO',1); + +insert into societe (nom,datec,cp,ville,tel,fax, client, prefix_comm) +values ('Cumulo',now(),'56610','Arradon','01 40 15 03 18','01 40 15 06 18',1,'CU'); + +insert into societe (nom,cp,ville,tel,fax,client, prefix_comm) +values ('Doli INC.','29300','Arzano','01 55 55 03 18','01 55 55 55 55',1,'DO'); + +insert into societe (nom,cp,ville,tel,fax,client, prefix_comm,url) +values ('Foo SARL','22300','Ploubezre','01 55 55 03 18','01 55 55 55 55',1,'FOO','www.gnu.org'); + +insert into societe (nom,datec,cp,ville,tel,fax, client, prefix_comm) +values ('Talphinfo',now(),'29400','Bodilis','01 40 15 03 18','01 40 15 06 18',1,'AP'); + +insert into societe (nom,datec,cp,ville,tel,fax, client, prefix_comm) +values ('Valphanix',now(),'29820','Bohars','01 40 15 03 18','01 40 15 06 18',1,'AL'); + +insert into societe (nom,cp,ville,tel,fax,client,url) +values ('Turin','29890','Brignogan-Plage','01 55 55 03 18','01 55 55 55 55',1,'http://www.ot-brignogan-plage.fr/'); + +insert into societe (nom,cp,ville,tel,fax,client) +values ('Yratin SA','29660','Carantec','01 55 55 03 18','01 55 55 55 55',1); + +insert into societe (nom,cp,ville,tel,fax,client) +values ('Raggos SARL','29233','Cléder','01 55 55 03 18','01 55 55 55 55',1); + +insert into societe (nom,cp,ville,tel,fax,client) +values ('Pruitosa','29870','Coat-Méal','01 55 55 03 18','01 55 55 55 55',1); + +insert into societe (nom,cp,ville,tel,fax,client) +values ('Stratus','29120','Combrit','01 55 55 03 18','01 55 55 55 55',1); + +insert into societe (nom,cp,ville,tel,fax,client) +values ('Nimbus','29490','Guipavas','01 55 55 03 18','01 55 55 55 55',1); + +insert into societe (nom,cp,ville,tel,fax,client) +values ('Iono','22110','Rostrenen','01 55 55 03 18','01 55 55 55 55',1); +-- +-- Contact +-- +delete from socpeople; +insert into socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (10,1,'Victoire','Paul','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (11,1,'Tourin','Pierre','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (12,1,'Patrick','Paul','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (13,1,'Myriam','Isabelle','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); + +insert into socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (20,2,'Corin','Arnaud','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (30,3,'Phil','Breizh','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (31,3,'Marie','Jeanne','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (41,4,'Alix','Victor','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +-- +-- +-- Produits +-- +-- +delete from llx_product; + +insert into llx_product (ref, label, description, price) +values ('CRRJ452M','Câble Réseaux RJ45 2m','Câble Réseaux RJ45 2m',10); + +insert into llx_product (ref, label, description, price) +values ('3COMSW8','Switch Cisco 8 ports 100Mbits','Switch Cisco 8 ports 100Mbits',1000); + +insert into llx_product (ref, label, description, price) +values ('ALPH','Station Alpha Serie 3w','Configuration Alpha',9750); + +insert into llx_product (ref, label, description, price) +values ('HUB8-10','Hub 8 ports 10Mbits','Hub 8 ports',750); + +insert into llx_product (ref, label, description, price) +values ('PB-16','Pan. Brass. 16','Panneau de brassage extensible, incluant 1 barre de 16 prises',650); + +insert into llx_product (ref, label, description, price) +values ('PB-32','Pan. Brass. 32','Panneau de brassage extensible, incluant 2 barres de 16 prises',1200); + +-- +-- +-- Fichinter +-- +-- +delete from llx_fichinter; +insert into llx_fichinter (fk_soc, ref, datec, date_valid, datei, fk_user_author, fk_user_valid, fk_statut, duree, note) +values (1, 'FI-LP-1','2001-12-05','2001-12-05','2001-12-05',1,1,1,4,'Mise à jour de la doc'); +-- +-- Actions commerciales +-- +delete from actioncomm; +insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact) +values ('2002-04-06',1,1,1,1); +insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact) +values ('2002-04-05',2,1,1,1); +insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact) +values ('2002-04-05',1,1,1,1); +insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact) +values ('2002-04-02',3,1,1,1); +insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact) +values ('2002-04-02',3,1,1,1); +insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact) +values ('2002-03-05',3,1,1,1); +insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact) +values ('2002-03-04',1,1,1,1); +insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact) +values ('2001-03-05',1,1,1,1); +-- +-- +-- +-- +insert into societe (idp,nom,cp,ville,tel,fax,fournisseur,prefix_comm) +values (20,'Bouleau','22800','Le Foeil','01 55 55 03 18','01 55 55 55 55',1,'BTP'); + +insert into societe (idp,nom,cp,ville,tel,fax,fournisseur,prefix_comm) +values (101,'Cerisier','22290','Goudelin','01 55 55 03 18','01 55 55 55 55',1,'CER'); + +insert into societe (idp,nom,cp,ville,tel,fax,fournisseur,prefix_comm) +values (100,'Chêne','22330','Le Gouray','01 55 55 03 18','01 55 55 55 55',1,'DEL'); + +insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm,datec) +values ('Peuplier','22300','Lanmérin','01 55 55 03 18','01 55 55 55 55',1,'JP',now()); + +insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm,datec) +values ('Poirier','22290','Lannebert','01 55 55 03 18','01 55 55 55 55',1,'PO',now()); + +insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm) +values ('Orme','22400','Noyal','01 55 55 03 18','01 55 55 55 55',1,'ORM'); + +insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm) +values ('Pin','22200','Pabu','01 55 55 03 18','01 55 55 55 55',1,'PIN'); + +insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm) +values ('Merisier','22510','Penguily','01 55 55 03 18','01 55 55 55 55',1,'IKE'); + +insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm) +values ('Hêtre','22480','Peumerit-Quintin','01 55 55 03 18','01 55 55 55 55',1,'CAS'); + +insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm) +values ('Saule','22800','Quintin','01 55 55 03 18','01 55 55 55 55',1,'ME'); + +insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm) +values ('Poirier','22940','Plaintel','01 55 55 03 18','01 55 55 55 55',1,'CEG'); + +insert into societe (nom,cp,ville,tel,fax,fournisseur,prefix_comm) +values ('Tek','22300','Rospez','01 55 55 03 18','01 55 55 55 55',1,'LMT'); +-- +-- +-- +-- +delete from llx_service; + +insert into llx_service values ( 1,now(),now(),'FDEVC1','Forfait Dev, CAT. 1','',500,NULL,now(),NULL,2,2); +insert into llx_service values ( 2,now(),now(),'FDEVC2','Forfait Dev, CAT. 2','',700,NULL,now(),NULL,2,2); +insert into llx_service values ( 3,now(),now(),'FDEVC3','Forfait Dev, CAT. 3','',900,NULL,now(),NULL,2,2); + +insert into llx_service values ( 4,now(),now(),'FADMC1','Forfait Adm, CAT. 1','',600,NULL,now(),NULL,2,2); +insert into llx_service values ( 5,now(),now(),'FADMC2','Forfait Adm, CAT. 2','',800,NULL,now(),NULL,2,2); + +insert into llx_service values ( 6,now(),now(),'FAUDC1','Forfait Aud, CAT. 2','',800,NULL,now(),NULL,2,2); +insert into llx_service values ( 7,now(),now(),'FAUDC2','Forfait Aud, CAT. 3','',1000,NULL,now(),NULL,2,2); + + +insert into llx_service values ( 8,now(),now(),'RDEVC1','Régie Dev, CAT. 1','',400,NULL,now(),NULL,2,2); +insert into llx_service values ( 9,now(),now(),'RDEVC2','Régie Dev, CAT. 2','',600,NULL,now(),NULL,2,2); +insert into llx_service values (10,now(),now(),'RDEVC3','Régie Dev, CAT. 3','',800,NULL,now(),NULL,2,2); + +insert into llx_service values (11,now(),now(),'RADMC1','Régie Adm, CAT. 1','',500,NULL,now(),NULL,2,2); +insert into llx_service values (12,now(),now(),'RADMC2','Régie Adm, CAT. 2','',700,NULL,now(),NULL,2,2); + +insert into llx_service values (13,now(),now(),'RAUDC1','Régie Aud, CAT. 2','',700,NULL,now(),NULL,2,2); +insert into llx_service values (14,now(),now(),'RAUDC2','Régie Aud, CAT. 3','',900,NULL,now(),NULL,2,2); + + +delete from llx_propal; +delete from llx_propaldet; +delete from llx_facture; +delete from llx_paiement; + + +delete from llx_compta_account; +insert into llx_compta_account (datec, number, label, fk_user_author) values (now(),'431000','URSSAF',1); +insert into llx_compta_account (datec, number, label, fk_user_author) values (now(),'654000','Clients',1); +-- +-- Charges sociales (mais non on n'en paye pas trop ;-) +-- +delete from llx_chargesociales; +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2002-05-15',NULL,'Acompte 1er Trimestre 2002',1,120,0,'2002-1-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2002-05-15',NULL,'Acompte 1er Trimestre 2002',2,200,0,'2002-1-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2002-05-15',NULL,'Acompte 1er Trimestre 2002',3,170,0,'2002-1-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2002-02-15','2002-02-10','Acompte 4ème Trimestre 2001',1,120,1,'2001-10-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2002-02-15','2002-02-10','Acompte 4ème Trimestre 2001',2,200,1,'2001-10-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2002-02-15','2002-02-10','Acompte 4ème Trimestre 2001',3,170,1,'2001-10-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2001-11-15','2001-10-10','Acompte 3ème Trimestre 2001',1,70,1,'2001-7-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2001-11-15','2001-10-10','Acompte 3ème Trimestre 2001',2,180,1,'2001-7-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2001-11-15','2001-10-10','Acompte 3ème Trimestre 2001',3,150,1,'2001-7-1'); + diff --git a/pgsql/data/facture_dev.sql b/pgsql/data/facture_dev.sql new file mode 100644 index 00000000000..3d5930c30b7 --- /dev/null +++ b/pgsql/data/facture_dev.sql @@ -0,0 +1,65 @@ +-- MySQL dump 8.21 +-- +-- Host: localhost Database: dolibarr +--------------------------------------------------------- +-- Server version 3.23.49-log + +-- +-- Dumping data for table 'llx_paiement' +-- + + +INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (1,1,'2002-05-09 03:05:03','2001-05-19 12:00:00',11960,'rodo',0,'321654654',''); +INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (2,2,'2002-05-09 03:18:10','2002-04-12 12:00:00',500,'rodo',0,'255555',''); +INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (3,2,'2002-05-09 03:18:32','2002-05-02 12:00:00',588.36,'rodo',0,'25555',''); +INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (4,3,'2002-05-09 03:21:43','2002-03-30 12:00:00',11.96,'rodo',0,'',''); +INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (5,4,'2002-05-09 03:23:47','2002-02-20 12:00:00',11960,'rodo',0,'',''); +INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (6,5,'2002-05-09 03:37:05','2002-02-09 12:00:00',23.92,'rodo',0,'',''); +INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (7,6,'2002-05-09 03:40:58','2002-05-09 12:00:00',35.88,'rodo',0,'',''); +INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (8,8,'2002-05-09 14:44:56','2002-03-12 12:00:00',5000,'rodo',0,'',''); +INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (9,7,'2002-05-09 14:49:51','2002-05-09 12:00:00',23920,'rodo',0,'',''); +INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (10,8,'2002-05-09 15:00:35','2002-05-09 12:00:00',9483.56,'rodo',0,'',''); +INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (11,9,'2002-05-09 15:02:36','2002-05-09 12:00:00',43355,'rodo',0,'',''); + +-- +-- Dumping data for table 'llx_facture' +-- + +insert into llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +values (1,'F-BO-010509',1,'2001-05-09 03:04:48','2001-05-09',1,10000,0,1960,11960,1,NULL,NULL,''); + +INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +VALUES (2,'F-DO-020410',3,'2002-05-09 03:17:44','2002-04-10',1,910,100,178.36,1088.36,1,NULL,NULL,''); + +INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +VALUES (3,'F-BO-020314',1,'2002-05-09 03:21:25','2002-03-14',1,10,0,1.96,11.96,1,NULL,NULL,''); + +INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +VALUES (4,'F-CU-020215',2,'2002-05-09 03:23:31','2002-02-15',1,10000,0,1960,11960,1,NULL,NULL,''); + +INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +VALUES (5,'F-BO-020117',1,'2002-05-09 03:36:43','2002-01-17',1,20,0,3.92,23.92,1,NULL,NULL,''); + +INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +VALUES (6,'F-BO-020119',1,'2002-05-09 03:40:26','2002-05-09',1,30,0,5.88,35.88,1,NULL,NULL,''); + +INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +VALUES (7,'F-CU-020509',2,'2002-05-09 03:46:54','2002-05-09',1,20000,0,3920,23920,1,NULL,NULL,''); + +INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +VALUES (8,'F-FOO-020309',4,'2002-05-09 14:44:34','2002-03-09',1,12110,0,2373.56,14483.56,1,NULL,NULL,''); + +INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +VALUES (9,'F-CU-020509.1',2,'2002-05-09 15:02:08','2002-05-09',1,36250,0,7105,43355,1,NULL,NULL,''); + +insert into llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +values (10,'F-BO-010310',1,'2001-03-10 03:04:48','2001-03-10',1,20000,0,3920,13920,1,NULL,NULL,''); + +insert into llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +VALUES (11,'F-DO-010410',3,'2001-04-10 03:17:44','2001-04-10',1,910,100,178.36,1088.36,1,NULL,NULL,''); + +INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +VALUES (12,'F-BO-010117',1,'2001-05-09 03:36:43','2001-01-17',1,20,0,3.92,23.92,1,NULL,NULL,''); + +INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +VALUES (13,'F-CU-010509.1',2,'2001-05-09 15:02:08','2001-05-09',1,36250,0,7105,43355,1,NULL,NULL,''); diff --git a/pgsql/data/propal_dev.sql b/pgsql/data/propal_dev.sql new file mode 100644 index 00000000000..5d4cb89de31 --- /dev/null +++ b/pgsql/data/propal_dev.sql @@ -0,0 +1,58 @@ +-- MySQL dump 8.21 +-- +-- Host: localhost Database: dolibarr +--------------------------------------------------------- +-- Server version 3.23.49-log + +-- +-- Dumping data for table 'llx_propal' +-- + + +INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, date_valid, date_cloture, datep, fk_user_author, fk_user_valid, fk_user_cloture, fk_statut, price, remise, tva, total, note) VALUES (1,1,10,0,'PR-BO-020509','2002-05-09 03:04:29','2002-05-09 03:04:37','2002-05-09 03:04:42','2002-05-09',1,1,1,2,10000,0,1960,11960,'----------\r\n'); +INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, date_valid, date_cloture, datep, fk_user_author, fk_user_valid, fk_user_cloture, fk_statut, price, remise, tva, total, note) VALUES (2,1,11,0,'PR-BO-020111','2002-05-09 03:08:33','2002-05-09 03:36:25','2002-05-09 03:36:29','2002-01-11',1,1,1,2,20,0,3.92,23.92,'----------\r\n'); +INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, date_valid, date_cloture, datep, fk_user_author, fk_user_valid, fk_user_cloture, fk_statut, price, remise, tva, total, note) VALUES (3,1,11,0,'PR-BO-020113','2002-05-09 03:08:50','2002-05-09 03:40:09','2002-05-09 03:40:13','2002-01-13',1,1,1,2,30,0,5.88,35.88,'----------\r\n'); +INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, date_valid, date_cloture, datep, fk_user_author, fk_user_valid, fk_user_cloture, fk_statut, price, remise, tva, total, note) VALUES (4,1,11,0,'PR-BO-020313','2002-05-09 03:09:13','2002-05-09 03:21:06','2002-05-09 03:21:10','2002-03-13',1,1,1,2,10,0,1.96,11.96,'----------\r\n'); +INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, date_valid, date_cloture, datep, fk_user_author, fk_user_valid, fk_user_cloture, fk_statut, price, remise, tva, total, note) VALUES (5,1,11,0,'PR-BO-020313.1','2002-05-09 03:09:28','2002-05-09 03:42:09','2002-05-09 03:42:15','2002-03-13',1,1,1,3,20,0,3.92,23.92,'----------\r\n'); +INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, date_valid, date_cloture, datep, fk_user_author, fk_user_valid, fk_user_cloture, fk_statut, price, remise, tva, total, note) VALUES (6,3,30,0,'PR-DO-020404','2002-05-09 03:16:26','2002-05-09 03:17:04','2002-05-09 03:17:13','2002-04-04',1,1,1,3,1010,0,197.96,1207.96,'----------\r\n'); +INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, date_valid, date_cloture, datep, fk_user_author, fk_user_valid, fk_user_cloture, fk_statut, price, remise, tva, total, note) VALUES (7,3,30,0,'PR-DO-020405','2002-05-09 03:16:51','2002-05-09 03:17:24','2002-05-09 03:17:28','2002-04-05',1,1,1,2,1010,100,178.36,1088.36,'----------\r\n'); +INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, date_valid, date_cloture, datep, fk_user_author, fk_user_valid, fk_user_cloture, fk_statut, price, remise, tva, total, note) VALUES (8,2,20,0,'PR-CU-020202','2002-05-09 03:22:49','2002-05-09 03:23:00','2002-05-09 03:23:05','2002-02-02',1,1,1,2,10000,0,1960,11960,'----------\r\n'); +INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, date_valid, date_cloture, datep, fk_user_author, fk_user_valid, fk_user_cloture, fk_statut, price, remise, tva, total, note) VALUES (9,2,20,0,'PR-CU-020409','2002-05-09 03:46:39','2002-05-09 03:46:45','2002-05-09 03:46:50','2002-04-09',1,1,1,2,20000,0,3920,23920,'----------\r\n'); +INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, date_valid, date_cloture, datep, fk_user_author, fk_user_valid, fk_user_cloture, fk_statut, price, remise, tva, total, note) VALUES (10,4,41,0,'PR-FOO-020509','2002-05-09 14:43:47','2002-05-09 15:07:19','2002-05-09 15:07:23','2002-05-09',1,1,1,2,12110,0,2373.56,14483.56,'----------\r\n'); +INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, date_valid, date_cloture, datep, fk_user_author, fk_user_valid, fk_user_cloture, fk_statut, price, remise, tva, total, note) VALUES (11,4,41,0,'PR-FOO-020304','2002-05-09 14:44:08','2002-05-09 14:44:18','2002-05-09 14:44:22','2002-03-04',1,1,1,2,12110,0,2373.56,14483.56,'----------\r\n'); +INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, date_valid, date_cloture, datep, fk_user_author, fk_user_valid, fk_user_cloture, fk_statut, price, remise, tva, total, note) VALUES (12,2,20,0,'PR-CU-020509','2002-05-09 15:01:37','2002-05-09 15:01:45','2002-05-09 15:01:49','2002-05-09',1,1,1,2,36250,0,7105,43355,'----------\r\n'); + +-- MySQL dump 8.21 +-- +-- Host: localhost Database: dolibarr +--------------------------------------------------------- +-- Server version 3.23.49-log + +-- +-- Dumping data for table 'llx_propaldet' +-- + + +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (1,1,2,10,1000); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (2,2,1,2,10); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (3,3,1,3,10); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (4,4,1,1,10); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (5,5,1,2,10); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (6,6,1,1,10); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (7,6,2,1,1000); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (8,7,1,1,10); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (9,7,2,1,1000); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (10,8,2,10,1000); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (11,9,2,20,1000); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (12,10,2,1,1000); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (13,10,3,1,9750); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (14,10,1,16,10); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (15,10,6,1,1200); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (16,11,2,1,1000); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (17,11,3,1,9750); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (18,11,1,16,10); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (19,11,6,1,1200); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (20,12,3,3,9750); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (21,12,2,1,1000); +INSERT INTO llx_propaldet (rowid, fk_propal, fk_product, qty, price) VALUES (22,12,6,5,1200); + diff --git a/pgsql/tables/Makefile b/pgsql/tables/Makefile new file mode 100644 index 00000000000..cd70114ea9c --- /dev/null +++ b/pgsql/tables/Makefile @@ -0,0 +1,76 @@ +# +# Copyright (C) 2001-2002 Rodolphe Quiedeville +# Copyright (C) 2002-2003 Éric Seigne +# +# $Id$ +# $Source$ +# +# 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. +# +SQL=psql +BASE=dolibarr +OPTIONS=-U postgres + +all: show + +create: + $(SQL) $(OPTIONS) $(BASE) < actioncomm.sql + $(SQL) $(OPTIONS) $(BASE) < c_actioncomm.sql + $(SQL) $(OPTIONS) $(BASE) < c_chargesociales.sql + $(SQL) $(OPTIONS) $(BASE) < c_effectif.sql + $(SQL) $(OPTIONS) $(BASE) < c_paiement.sql + $(SQL) $(OPTIONS) $(BASE) < c_pays.sql + $(SQL) $(OPTIONS) $(BASE) < c_propalst.sql + $(SQL) $(OPTIONS) $(BASE) < c_stcomm.sql + $(SQL) $(OPTIONS) $(BASE) < c_typent.sql + $(SQL) $(OPTIONS) $(BASE) < llx_adherent.sql + $(SQL) $(OPTIONS) $(BASE) < llx_bank.sql + $(SQL) $(OPTIONS) $(BASE) < llx_bank_account.sql + $(SQL) $(OPTIONS) $(BASE) < llx_bank_categ.sql + $(SQL) $(OPTIONS) $(BASE) < llx_bank_class.sql + $(SQL) $(OPTIONS) $(BASE) < llx_bookmark.sql + $(SQL) $(OPTIONS) $(BASE) < llx_chargesociales.sql + $(SQL) $(OPTIONS) $(BASE) < llx_compta.sql + $(SQL) $(OPTIONS) $(BASE) < llx_compta_account.sql + $(SQL) $(OPTIONS) $(BASE) < llx_cotisation.sql + $(SQL) $(OPTIONS) $(BASE) < llx_don.sql + $(SQL) $(OPTIONS) $(BASE) < llx_don_projet.sql + $(SQL) $(OPTIONS) $(BASE) < llx_fa_pr.sql + $(SQL) $(OPTIONS) $(BASE) < llx_facture.sql + $(SQL) $(OPTIONS) $(BASE) < llx_facture_fourn.sql + $(SQL) $(OPTIONS) $(BASE) < llx_fichinter.sql + $(SQL) $(OPTIONS) $(BASE) < llx_paiement.sql + $(SQL) $(OPTIONS) $(BASE) < llx_pointmort.sql + $(SQL) $(OPTIONS) $(BASE) < llx_product.sql + $(SQL) $(OPTIONS) $(BASE) < llx_projet.sql + $(SQL) $(OPTIONS) $(BASE) < llx_propal.sql + $(SQL) $(OPTIONS) $(BASE) < llx_propaldet.sql + $(SQL) $(OPTIONS) $(BASE) < llx_service.sql + $(SQL) $(OPTIONS) $(BASE) < llx_soc_recontact.sql + $(SQL) $(OPTIONS) $(BASE) < llx_tva.sql + $(SQL) $(OPTIONS) $(BASE) < llx_user.sql + $(SQL) $(OPTIONS) $(BASE) < llx_ventes.sql + $(SQL) $(OPTIONS) $(BASE) < llx_voyage.sql + $(SQL) $(OPTIONS) $(BASE) < llx_voyage_reduc.sql + $(SQL) $(OPTIONS) $(BASE) < societe.sql + $(SQL) $(OPTIONS) $(BASE) < socpeople.sql + $(SQL) $(OPTIONS) $(BASE) < socstatutlog.sql + + +drop: + $(SQL) $(OPTIONS) $(BASE) < drop.sql + +show: + $(SQL) $(OPTIONS) $(BASE) -c '\d' diff --git a/pgsql/tables/actioncomm.sql b/pgsql/tables/actioncomm.sql new file mode 100644 index 00000000000..203263c5120 --- /dev/null +++ b/pgsql/tables/actioncomm.sql @@ -0,0 +1,50 @@ +-- ======================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- Actions commerciales +-- +-- ======================================================================== +create table actioncomm +( + id SERIAL, + datea timestamp, -- action date + fk_action integer, + + label varchar(50), -- libelle de l'action + + fk_soc integer, + fk_contact integer default 0, + + fk_user_action integer, -- id de la personne qui doit effectuer l'action + fk_user_author integer, + + priority smallint, + + percent smallint, + + note text, + propalrowid integer +); + +--create table llx_todocomm + + + diff --git a/pgsql/tables/c_actioncomm.sql b/pgsql/tables/c_actioncomm.sql new file mode 100644 index 00000000000..01d448a0c09 --- /dev/null +++ b/pgsql/tables/c_actioncomm.sql @@ -0,0 +1,31 @@ +-- ======================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- ======================================================================== + +create table c_actioncomm +( + id SERIAL, + libelle varchar(30), + todo int +); + + diff --git a/pgsql/tables/c_chargesociales.sql b/pgsql/tables/c_chargesociales.sql new file mode 100644 index 00000000000..bb2d14039cd --- /dev/null +++ b/pgsql/tables/c_chargesociales.sql @@ -0,0 +1,31 @@ +-- ======================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- 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 c_chargesociales +( + id SERIAL, + libelle varchar(80), + deductible smallint NOT NULL default 0 +); + + + diff --git a/pgsql/tables/c_effectif.sql b/pgsql/tables/c_effectif.sql new file mode 100644 index 00000000000..b65c967932b --- /dev/null +++ b/pgsql/tables/c_effectif.sql @@ -0,0 +1,26 @@ +-- ======================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- ======================================================================== + +create table c_effectif +( + id SERIAL, + libelle varchar(30) +); + diff --git a/pgsql/tables/c_paiement.sql b/pgsql/tables/c_paiement.sql new file mode 100644 index 00000000000..a68ba4eb628 --- /dev/null +++ b/pgsql/tables/c_paiement.sql @@ -0,0 +1,39 @@ +-- ======================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- 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$ +-- +-- ======================================================================== + +-- +-- Type : +-- +-- 0 : entrée d'argent +-- 1 : sortie d'argent +-- 2 : entrée ou sortie d'argent + +create table c_paiement +( + id SERIAL, + libelle varchar(30), + type smallint +); + + + diff --git a/pgsql/tables/c_pays.sql b/pgsql/tables/c_pays.sql new file mode 100644 index 00000000000..a23423e66eb --- /dev/null +++ b/pgsql/tables/c_pays.sql @@ -0,0 +1,28 @@ +-- ======================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- ======================================================================== + +create table c_pays +( + id SERIAL, + libelle varchar(25), + code char(2) NOT NULL +); + + diff --git a/pgsql/tables/c_propalst.sql b/pgsql/tables/c_propalst.sql new file mode 100644 index 00000000000..d78809bbb60 --- /dev/null +++ b/pgsql/tables/c_propalst.sql @@ -0,0 +1,26 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table c_propalst +( + id SERIAL, + label varchar(30) +); + diff --git a/pgsql/tables/c_stcomm.sql b/pgsql/tables/c_stcomm.sql new file mode 100644 index 00000000000..783504b6734 --- /dev/null +++ b/pgsql/tables/c_stcomm.sql @@ -0,0 +1,26 @@ +-- ======================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- ======================================================================== + +create table c_stcomm +( + id SERIAL, + libelle varchar(30) +); + diff --git a/pgsql/tables/c_typent.sql b/pgsql/tables/c_typent.sql new file mode 100644 index 00000000000..f920951b32a --- /dev/null +++ b/pgsql/tables/c_typent.sql @@ -0,0 +1,25 @@ +-- ======================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- ======================================================================== + +create table c_typent +( + id SERIAL, + libelle varchar(30) +); diff --git a/pgsql/tables/drop.sql b/pgsql/tables/drop.sql new file mode 100644 index 00000000000..02b35f65cc2 --- /dev/null +++ b/pgsql/tables/drop.sql @@ -0,0 +1,126 @@ +-- +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- + +drop table actioncomm; + +drop table bots; + +drop table c_anexpe; + +drop table c_actioncomm; + +drop table c_chargesociales; + +drop table c_effectif; + +drop table c_paiement ; + +drop table c_pays ; + +drop table c_prestatype ; + +drop table c_propalst ; + +drop table c_stcomm; + +drop table c_typent ; + +drop table llx_adherent; + +drop table llx_bank; + +drop table llx_bank_account; + +drop table llx_bank_categ; + +drop table llx_bank_class; + +drop table llx_bookmark; + +drop table llx_chargesociales; + +drop table llx_compta; + +drop table llx_compta_account; + +drop table llx_cotisation; + +drop table llx_don; + +drop table llx_don_projet; + +drop table llx_fa_pr; + +drop table llx_facture; + +drop table llx_facture_fourn; + +drop table llx_fichinter; + +drop table llx_paiement; + +drop table llx_pointmort; + +drop table llx_product; + +drop table llx_projet; + +drop table llx_propal; + +drop table llx_propaldet; + +drop table llx_service; + +drop table llx_soc_recontact; + +drop table llx_tva; + +drop table llx_user; + +drop table llx_ventes; + +drop table llx_voyage; + +drop table llx_voyage_reduc; + +drop table login ; + +drop table socappoint ; + +drop table soccontact; + +drop table soccontactinfo; + +drop table socfollowresume; + +drop table socstatutlog ; + +drop table region_resume ; + +drop table societe; + +drop table soc_events; + +drop table soc_recontact; + +drop table socpeople; + diff --git a/pgsql/tables/llx_adherent.sql b/pgsql/tables/llx_adherent.sql new file mode 100644 index 00000000000..804a6bf8a9f --- /dev/null +++ b/pgsql/tables/llx_adherent.sql @@ -0,0 +1,45 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +-- statut +-- 0 : non adherent +-- 1 : adherent + +create table llx_adherent +( + rowid SERIAL, + tms timestamp, + statut smallint NOT NULL DEFAULT 0, + fk_adherent_type smallint, + datec timestamp, + prenom varchar(50), + nom varchar(50), + societe varchar(50), + adresse text, + cp varchar(30), + ville varchar(50), + pays varchar(50), + email varchar(255), + fk_user_author integer NOT NULL, + fk_user_valid integer NOT NULL, + datefin timestamp NOT NULL, -- date de fin de validité de la cotisation + note text +); + diff --git a/pgsql/tables/llx_adherent_type.sql b/pgsql/tables/llx_adherent_type.sql new file mode 100644 index 00000000000..5e824dbfdba --- /dev/null +++ b/pgsql/tables/llx_adherent_type.sql @@ -0,0 +1,33 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +-- statut +-- 0 : actif +-- 1 : inactif + +create table llx_adherent_type +( + rowid SERIAL, + tms timestamp, + statut smallint NOT NULL DEFAULT 0, + libelle varchar(50), + cotisation enum('yes','no') NOT NULL DEFAULT 'yes', + note text +); diff --git a/pgsql/tables/llx_bank.sql b/pgsql/tables/llx_bank.sql new file mode 100644 index 00000000000..5f7da0dbd11 --- /dev/null +++ b/pgsql/tables/llx_bank.sql @@ -0,0 +1,45 @@ +-- =================================================================== +-- Copyright (C) 2000-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + + +create table llx_bank +( + rowid SERIAL, + datec timestamp, + datev date, -- date de valeur + dateo date, -- date operation + amount real NOT NULL default 0, + label varchar(255), + fk_account integer, + fk_user_author integer, + fk_user_rappro integer, + fk_type varchar(4), -- CB, Virement, cheque + num_releve varchar(50), + num_chq int, + rappro int default 0, + note text, + + + author varchar(40) -- a supprimer apres migration +); + diff --git a/pgsql/tables/llx_bank_account.sql b/pgsql/tables/llx_bank_account.sql new file mode 100644 index 00000000000..4af74d951a0 --- /dev/null +++ b/pgsql/tables/llx_bank_account.sql @@ -0,0 +1,43 @@ +-- =================================================================== +-- Copyright (C) 2000-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table llx_bank_account +( + rowid SERIAL, + datec timestamp, + tms timestamp, + label varchar(30), + bank varchar(255), + + code_banque varchar(7), + code_guichet varchar(6), + number varchar(255), + cle_rib varchar(5), + bic varchar(10), + + iban_prefix varchar(5), + + domiciliation varchar(50), + + courant smallint default 0 not null +); diff --git a/pgsql/tables/llx_bank_categ.sql b/pgsql/tables/llx_bank_categ.sql new file mode 100644 index 00000000000..9a80a921803 --- /dev/null +++ b/pgsql/tables/llx_bank_categ.sql @@ -0,0 +1,25 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table llx_bank_categ +( + rowid SERIAL, + label varchar(255) +); diff --git a/pgsql/tables/llx_bank_class.sql b/pgsql/tables/llx_bank_class.sql new file mode 100644 index 00000000000..4efdf3104a7 --- /dev/null +++ b/pgsql/tables/llx_bank_class.sql @@ -0,0 +1,25 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table llx_bank_class +( + lineid SERIAL, + fk_categ integer not null +); diff --git a/pgsql/tables/llx_bookmark.sql b/pgsql/tables/llx_bookmark.sql new file mode 100644 index 00000000000..946387a7529 --- /dev/null +++ b/pgsql/tables/llx_bookmark.sql @@ -0,0 +1,28 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + + +create table llx_bookmark +( + rowid SERIAL, + fk_soc integer, + fk_user integer, + dateb timestamp +); diff --git a/pgsql/tables/llx_chargesociales.sql b/pgsql/tables/llx_chargesociales.sql new file mode 100644 index 00000000000..c8cff613116 --- /dev/null +++ b/pgsql/tables/llx_chargesociales.sql @@ -0,0 +1,36 @@ +-- ======================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- 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_chargesociales +( + rowid SERIAL, + date_ech timestamp NOT NULL, -- date d'echeance + date_pai timestamp, -- date de paiements + libelle varchar(80), + fk_type integer, + amount real default 0 NOT NULL, + paye smallint default 0 NOT NULL, + periode date +); + + + diff --git a/pgsql/tables/llx_compta.sql b/pgsql/tables/llx_compta.sql new file mode 100644 index 00000000000..3b3732bcc70 --- /dev/null +++ b/pgsql/tables/llx_compta.sql @@ -0,0 +1,38 @@ +-- =================================================================== +-- Copyright (C) 2000-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + + +create table llx_compta +( + rowid SERIAL, + datec timestamp, + datev date, -- date de valeur + amount real NOT NULL default 0, + label varchar(255), + fk_compta_account integer, + fk_user_author integer, + fk_user_valid integer, + valid int default 0, + note text + +); diff --git a/pgsql/tables/llx_compta_account.sql b/pgsql/tables/llx_compta_account.sql new file mode 100644 index 00000000000..49e4908f8ac --- /dev/null +++ b/pgsql/tables/llx_compta_account.sql @@ -0,0 +1,34 @@ +-- =================================================================== +-- Copyright (C) 2000-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + + +create table llx_compta_account +( + rowid SERIAL, + datec timestamp, + number varchar(12), + label varchar(255), + fk_user_author integer, + note text + +); diff --git a/pgsql/tables/llx_cotisation.sql b/pgsql/tables/llx_cotisation.sql new file mode 100644 index 00000000000..08281b2978e --- /dev/null +++ b/pgsql/tables/llx_cotisation.sql @@ -0,0 +1,31 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + + +create table llx_cotisation +( + rowid SERIAL, + tms timestamp, + datec timestamp, + fk_adherent integer, + dateadh timestamp, + cotisation real, + note text +); diff --git a/pgsql/tables/llx_domain.sql b/pgsql/tables/llx_domain.sql new file mode 100644 index 00000000000..dc92b292f48 --- /dev/null +++ b/pgsql/tables/llx_domain.sql @@ -0,0 +1,31 @@ +-- =================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table llx_domain +( + rowid SERIAL, + datec timestamp, + label varchar(255), + note text +); + diff --git a/pgsql/tables/llx_don.sql b/pgsql/tables/llx_don.sql new file mode 100644 index 00000000000..743f95290ea --- /dev/null +++ b/pgsql/tables/llx_don.sql @@ -0,0 +1,44 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + + +create table llx_don +( + rowid SERIAL, + tms timestamp, + fk_statut smallint NOT NULL DEFAULT 0,-- etat du don promesse/valid + datec timestamp, -- date de création de l'enregistrement + datedon timestamp, -- date du don/promesse + amount real default 0, + fk_paiement integer, + prenom varchar(50), + nom varchar(50), + societe varchar(50), + adresse text, + cp varchar(30), + ville varchar(50), + pays varchar(50), + email varchar(255), + public smallint NOT NULL DEFAULT 1, -- le don est-il public (0,1) + fk_don_projet integer NOT NULL, -- projet auquel est fait le don + fk_user_author integer NOT NULL, + fk_user_valid integer NOT NULL, + note text +); diff --git a/pgsql/tables/llx_don_projet.sql b/pgsql/tables/llx_don_projet.sql new file mode 100644 index 00000000000..d7d8ed6e2dd --- /dev/null +++ b/pgsql/tables/llx_don_projet.sql @@ -0,0 +1,30 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + + +create table llx_don_projet +( + rowid SERIAL, + tms timestamp, + datec timestamp, + libelle varchar(255), + fk_user_author integer NOT NULL, + note text +); diff --git a/pgsql/tables/llx_fa_pr.sql b/pgsql/tables/llx_fa_pr.sql new file mode 100644 index 00000000000..d79d29d1c24 --- /dev/null +++ b/pgsql/tables/llx_fa_pr.sql @@ -0,0 +1,26 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table llx_fa_pr +( + rowid SERIAL, + fk_facture integer, + fk_propal integer +); diff --git a/pgsql/tables/llx_facture.sql b/pgsql/tables/llx_facture.sql new file mode 100644 index 00000000000..daabfb7a280 --- /dev/null +++ b/pgsql/tables/llx_facture.sql @@ -0,0 +1,44 @@ +-- =========================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- 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 +( + rowid SERIAL, + facnumber varchar(50) NOT NULL, + fk_soc integer NOT NULL, + datec timestamp, -- date de creation de la facture + datef date, -- date de la facture + paye smallint default 0 NOT NULL, + amount real default 0 NOT NULL, + remise real default 0, + tva real default 0, + total real default 0, + fk_statut smallint default 0 NOT NULL, + author varchar(50), + fk_user integer, -- createur de la facture + fk_user_author integer, -- createur de la propale + fk_user_valid integer, -- valideur de la propale + note text + +); + +create unique index llx_facture_facnumber on llx_facture(facnumber); \ No newline at end of file diff --git a/pgsql/tables/llx_facture_fourn.sql b/pgsql/tables/llx_facture_fourn.sql new file mode 100644 index 00000000000..70096514719 --- /dev/null +++ b/pgsql/tables/llx_facture_fourn.sql @@ -0,0 +1,45 @@ +-- =========================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- 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 +( + rowid SERIAL, + facnumber varchar(50) NOT NULL, + fk_soc integer NOT NULL, + datec timestamp, -- date de creation de la facture + datef date, -- date de la facture + libelle varchar(255), + paye smallint default 0 NOT NULL, + amount real default 0 NOT NULL, + remise real default 0, + tva real default 0, + total real default 0, + fk_statut smallint default 0 NOT NULL, + + fk_user_author integer, -- createur de la propale + fk_user_valid integer, -- valideur de la propale + + note text +); + +create unique index llx_facture_fourn_facnumber on llx_facture_fourn(facnumber); diff --git a/pgsql/tables/llx_facturedet.sql b/pgsql/tables/llx_facturedet.sql new file mode 100644 index 00000000000..2614b45d3c9 --- /dev/null +++ b/pgsql/tables/llx_facturedet.sql @@ -0,0 +1,32 @@ +-- =================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- 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 +( + rowid SERIAL, + fk_facture integer, + fk_product integer, + datec timestamp, + note varchar(255), + price real default 0 + +); diff --git a/pgsql/tables/llx_fichinter.sql b/pgsql/tables/llx_fichinter.sql new file mode 100644 index 00000000000..057aeab4927 --- /dev/null +++ b/pgsql/tables/llx_fichinter.sql @@ -0,0 +1,47 @@ +-- =================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table llx_fichinter +( + rowid SERIAL, + fk_soc integer NOT NULL, + fk_projet integer default 0, -- projet auquel est rattache la fiche + ref varchar(30) NOT NULL, -- number + + datec timestamp, -- date de creation + date_valid timestamp, -- date de validation + + datei date, -- date de l'intervention + + fk_user_author integer, -- createur de la fiche + + fk_user_valid integer, -- valideur de la fiche + + fk_statut smallint default 0, + + duree real, + + note text +); + +create unique index llx_fichinter_ref on llx_fichinter(ref); \ No newline at end of file diff --git a/pgsql/tables/llx_paiement.sql b/pgsql/tables/llx_paiement.sql new file mode 100644 index 00000000000..892e032a5b3 --- /dev/null +++ b/pgsql/tables/llx_paiement.sql @@ -0,0 +1,33 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + + +create table llx_paiement +( + rowid SERIAL, + fk_facture integer, + datec timestamp, + datep timestamp, -- payment date + amount real default 0, + author varchar(50), + fk_paiement integer NOT NULL, + num_paiement varchar(50), + note text +); diff --git a/pgsql/tables/llx_pointmort.sql b/pgsql/tables/llx_pointmort.sql new file mode 100644 index 00000000000..0d336cd6c60 --- /dev/null +++ b/pgsql/tables/llx_pointmort.sql @@ -0,0 +1,26 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table llx_pointmort +( + month timestamp, + amount real +); + diff --git a/pgsql/tables/llx_product.sql b/pgsql/tables/llx_product.sql new file mode 100644 index 00000000000..ca4f0da167e --- /dev/null +++ b/pgsql/tables/llx_product.sql @@ -0,0 +1,32 @@ +-- =================================================================== +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table llx_product +( + rowid SERIAL, + datec timestamp, + tms timestamp, + ref varchar(15), + label varchar(255), + description text, + price smallint, + fk_user_author integer +); + diff --git a/pgsql/tables/llx_projet.sql b/pgsql/tables/llx_projet.sql new file mode 100644 index 00000000000..196a5ee255f --- /dev/null +++ b/pgsql/tables/llx_projet.sql @@ -0,0 +1,38 @@ +-- =========================================================================== +-- Copyright (C) 2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =========================================================================== + +create table llx_projet +( + rowid SERIAL, + fk_soc integer NOT NULL, + fk_statut smallint NOT NULL, + tms timestamp, + dateo date, -- date d'ouverture du projet + ref varchar(50), + title varchar(255), + fk_user_resp integer, -- responsable du projet + fk_user_creat integer, -- createur du projet + note text +); + +create unique index llx_projet_ref on llx_projet(ref); diff --git a/pgsql/tables/llx_propal.sql b/pgsql/tables/llx_propal.sql new file mode 100644 index 00000000000..6596ed5a830 --- /dev/null +++ b/pgsql/tables/llx_propal.sql @@ -0,0 +1,53 @@ +-- =================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table llx_propal +( + rowid SERIAL, + fk_soc integer, + fk_soc_contact integer, + fk_projet integer default 0, -- projet auquel est rattache la propale + ref varchar(30) NOT NULL, -- propal number + + datec timestamp, -- date de creation + date_valid timestamp, -- date de validation + date_cloture timestamp, -- date de cloture + + datep date, -- date de la propal + + fk_user_author integer, -- createur de la propale + + fk_user_valid integer, -- valideur de la propale + + fk_user_cloture integer, -- cloture de la propale signee ou non signee + + + fk_statut smallint default 0, + price real default 0, + remise real default 0, + tva real default 0, + total real default 0, + note text +); + +create unique index llx_propal_ref on llx_propal(ref); diff --git a/pgsql/tables/llx_propaldet.sql b/pgsql/tables/llx_propaldet.sql new file mode 100644 index 00000000000..eda77a5af87 --- /dev/null +++ b/pgsql/tables/llx_propaldet.sql @@ -0,0 +1,31 @@ +-- =================================================================== +-- Copyright (C) 2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table llx_propaldet +( + rowid SERIAL, + fk_propal integer, + fk_product integer, + qty smallint, + price real +); diff --git a/pgsql/tables/llx_service.sql b/pgsql/tables/llx_service.sql new file mode 100644 index 00000000000..05ae02b0ea2 --- /dev/null +++ b/pgsql/tables/llx_service.sql @@ -0,0 +1,40 @@ +-- =================================================================== +-- Copyright (C) 2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table llx_service +( + rowid SERIAL, + datec timestamp, + tms timestamp, + ref varchar(15), + label varchar(255), + description text, + price smallint, + duration varchar(32), + debut_comm timestamp, + fin_comm timestamp, + fk_user_author integer, + fk_user_modif integer +); + +create unique index llx_service_ref on llx_service(ref); diff --git a/pgsql/tables/llx_soc_recontact.sql b/pgsql/tables/llx_soc_recontact.sql new file mode 100644 index 00000000000..0422cd15086 --- /dev/null +++ b/pgsql/tables/llx_soc_recontact.sql @@ -0,0 +1,31 @@ +-- =================================================================== +-- Copyright (C) 2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- Societes a recontacter +-- +-- =================================================================== +create table llx_soc_recontact +( + rowid SERIAL, + fk_soc integer, + datere timestamp, + author varchar(15) +); \ No newline at end of file diff --git a/pgsql/tables/llx_todocomm.sql b/pgsql/tables/llx_todocomm.sql new file mode 100644 index 00000000000..38bd59c1091 --- /dev/null +++ b/pgsql/tables/llx_todocomm.sql @@ -0,0 +1,38 @@ +-- ======================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- +-- 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. +-- +-- Actions commerciales a effectuer +-- +-- ======================================================================== +create table llx_todocomm +( + id SERIAL, + datea timestamp, -- date de l'action + label varchar(50), -- libelle de l'action + fk_user_action integer, -- id de la personne qui doit effectuer l'action + fk_user_author integer, -- id auteur de l'action + fk_soc integer, -- id de la societe auquel est rattachee l'action + fk_contact integer, -- id du contact sur laquelle l'action + -- doit etre effectuee + note text +); + diff --git a/pgsql/tables/llx_tva.sql b/pgsql/tables/llx_tva.sql new file mode 100644 index 00000000000..d5489089a31 --- /dev/null +++ b/pgsql/tables/llx_tva.sql @@ -0,0 +1,33 @@ +-- =================================================================== +-- Copyright (C) 2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- 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_tva +( + rowid SERIAL, + tms timestamp, + datep date, -- date de paiement + datev date, -- date de valeur + amount real NOT NULL default 0, + label varchar(255), + note text +); diff --git a/pgsql/tables/llx_user.sql b/pgsql/tables/llx_user.sql new file mode 100644 index 00000000000..9888fb6943a --- /dev/null +++ b/pgsql/tables/llx_user.sql @@ -0,0 +1,44 @@ +-- ============================================================================ +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- 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_user +( + rowid SERIAL, + datec timestamp, + tms timestamp, + login varchar(8), + pass varchar(32), + name varchar(50), + firstname varchar(50), + code varchar(4), + email varchar(255), + admin smallint default 0, + webcal_login varchar(25), + module_comm smallint default 1, + module_compta smallint default 1, + note text + +); + +create unique index llx_user_index_login on llx_user(login); + diff --git a/pgsql/tables/llx_ventes.sql b/pgsql/tables/llx_ventes.sql new file mode 100644 index 00000000000..633742694fa --- /dev/null +++ b/pgsql/tables/llx_ventes.sql @@ -0,0 +1,35 @@ +-- =================================================================== +-- Copyright (C) 2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + +create table llx_ventes +( + rowid SERIAL, + fk_soc integer NOT NULL, + fk_product integer NOT NULL, + dated timestamp, -- date debut + datef timestamp, -- date fin + price real, + author varchar(30), + active smallint DEFAULT 0 NOT NULL, + note varchar(255) +); diff --git a/pgsql/tables/llx_voyage.sql b/pgsql/tables/llx_voyage.sql new file mode 100644 index 00000000000..5c781701b5b --- /dev/null +++ b/pgsql/tables/llx_voyage.sql @@ -0,0 +1,48 @@ +-- =================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + + +create table llx_voyage +( + rowid SERIAL, + datec timestamp, + + dateo date, -- date operation + date_depart timestamp, -- date du voyage + date_arrivee timestamp, -- date du voyage + amount real NOT NULL default 0, -- prix du billet + reduction real NOT NULL default 0, -- montant de la reduction obtenue + depart varchar(255), + arrivee varchar(255), + fk_type smallint, -- Train, Avion, Bateaux + fk_reduc integer, + distance integer, -- distance en kilometre + dossier varchar(50), -- numero de dossier + note text +); + +-- insert into llx_voyage (date_depart, date_arrivee, amount, depart, arrivee, fk_reduc) +-- values ('2002-04-21 12:05','2002-04-21 15:25',26.8,'Paris','Auray',1); + +-- insert into llx_voyage (date_depart, date_arrivee, amount, depart, arrivee, fk_reduc) +-- values ('2002-04-23 15:42','2002-04-23 19:10',26.8,'Auray','Paris',1); diff --git a/pgsql/tables/llx_voyage_reduc.sql b/pgsql/tables/llx_voyage_reduc.sql new file mode 100644 index 00000000000..65740fbb5ea --- /dev/null +++ b/pgsql/tables/llx_voyage_reduc.sql @@ -0,0 +1,39 @@ +-- =================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- =================================================================== + + +create table llx_voyage_reduc +( + rowid SERIAL, + datec timestamp, + datev date, -- date de valeur + + date_debut date, -- date operation + date_fin date, + amount real NOT NULL default 0, + label varchar(255), + numero varchar(255), + fk_type smallint, -- Train, Avion, Bateaux + + note text +); diff --git a/pgsql/tables/soc_events.sql b/pgsql/tables/soc_events.sql new file mode 100644 index 00000000000..5a5291ec25f --- /dev/null +++ b/pgsql/tables/soc_events.sql @@ -0,0 +1,33 @@ +-- ======================================================================== +-- Copyright (C) 2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- ======================================================================== + +create table soc_events +( + rowid SERIAL, + fk_soc int NOT NULL, -- + dateb timestamp NOT NULL, -- begin date + datee timestamp NOT NULL, -- end date + title varchar(100) NOT NULL, + url varchar(255), + description text +); diff --git a/pgsql/tables/societe.sql b/pgsql/tables/societe.sql new file mode 100644 index 00000000000..d64d0517cdc --- /dev/null +++ b/pgsql/tables/societe.sql @@ -0,0 +1,53 @@ +-- ======================================================================== +-- Copyright (C) 2000-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- ======================================================================== +create table societe +( + idp SERIAL, + id varchar(32), -- private id + active smallint default 0, -- + parent integer default 0, -- + tms timestamp, + datec timestamp, -- creation date + datea timestamp, -- activation date + nom varchar(60), -- company name + address varchar(255), -- company adresse + cp varchar(10), -- zipcode + ville varchar(50), -- town + fk_pays integer default 0, -- + tel varchar(20), -- phone number + fax varchar(20), -- fax number + url varchar(255), -- + fk_secteur integer default 0, -- + fk_effectif integer default 0, -- + fk_typent integer default 0, -- + siren varchar(9), -- + description text, -- + fk_stcomm smallint default 0, -- commercial statut + note text, -- + services integer default 0, -- + prefix_comm varchar(5), -- prefix commercial + client smallint default 0, -- client oui/non + fournisseur smallint default 0 -- fournisseur oui/non +); + +create unique index societe_prefix_comm on societe(prefix_comm); diff --git a/pgsql/tables/socpeople.sql b/pgsql/tables/socpeople.sql new file mode 100644 index 00000000000..c617f2c2797 --- /dev/null +++ b/pgsql/tables/socpeople.sql @@ -0,0 +1,36 @@ +-- ============================================================================ +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- ============================================================================ +create table socpeople +( + idp SERIAL, + datec timestamp, + fk_soc integer, + name varchar(50), + firstname varchar(50), + address varchar(255), + poste varchar(80), + phone varchar(30), + fax varchar(30), + email varchar(255), + note text +); diff --git a/pgsql/tables/socstatutlog.sql b/pgsql/tables/socstatutlog.sql new file mode 100644 index 00000000000..5930fb0ee99 --- /dev/null +++ b/pgsql/tables/socstatutlog.sql @@ -0,0 +1,30 @@ +-- ======================================================================== +-- Copyright (C) 2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Éric Seigne +-- +-- $Id$ +-- $Source$ +-- +-- 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. +-- +-- ======================================================================== +create table socstatutlog +( + id SERIAL, + datel timestamp, + fk_soc integer, + fk_statut integer, + author varchar(30) +); diff --git a/pgsql/tables/transaction_bplc.sql b/pgsql/tables/transaction_bplc.sql new file mode 100644 index 00000000000..a19033ca397 --- /dev/null +++ b/pgsql/tables/transaction_bplc.sql @@ -0,0 +1,37 @@ +-- =================================================================== +-- 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 transaction_bplc +( + rowid SERIAL, + tms timestamp, + + ipclient varchar(20), + num_transaction varchar(10), + date_transaction varchar(10), + heure_transaction varchar(10), + num_autorisation varchar(10), + cle_acceptation varchar(5), + code_retour varchar(4), + + ref_commande integer + +);