diff --git a/pgsql/data/data.sql b/pgsql/data/data.sql index 90d4f5e4859..f4fd2bf3875 100644 --- a/pgsql/data/data.sql +++ b/pgsql/data/data.sql @@ -1,5 +1,6 @@ -- -- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier -- -- $Id$ -- $Source$ @@ -22,92 +23,216 @@ -- Valeurs pour les bases de langues francaises -- -delete from llx_c_chargesociales; -insert into llx_c_chargesociales (id,libelle,deductible) values ( 1, 'Allocations familiales',1); -insert into llx_c_chargesociales (id,libelle,deductible) values ( 2, 'GSG Deductible',1); -insert into llx_c_chargesociales (id,libelle,deductible) values ( 3, 'GSG/CRDS NON Deductible',0); +insert into llx_cond_reglement values (1,1,1, 'A réception','Réception de facture',0,0); +insert into llx_cond_reglement values (2,2,1, '30 jours','Réglement à 30 jours',0,30); +insert into llx_cond_reglement values (3,3,1, '30 jours fin de mois','Réglement à 30 jours fin de mois',1,30); +insert into llx_cond_reglement values (4,4,1, '60 jours','Réglement à 60 jours',0,60); +insert into llx_cond_reglement values (5,5,1, '60 jours fin de mois','Réglement à 60 jours fin de mois',1,60); -delete from llx_c_actioncomm; -insert into llx_c_actioncomm (id,libelle) values ( 0, '-'); -insert into llx_c_actioncomm (id,libelle) values ( 1, 'Appel Téléphonique'); -insert into llx_c_actioncomm (id,libelle) values ( 2, 'Envoi Fax'); -insert into llx_c_actioncomm (id,libelle) values ( 3, 'Envoi propal par mail'); -insert into llx_c_actioncomm (id,libelle) values ( 4, 'Envoi d\'un email'); -insert into llx_c_actioncomm (id,libelle) values ( 5, 'Rendez-vous'); -insert into llx_c_actioncomm (id,libelle) values ( 9, 'Envoi Facture'); -insert into llx_c_actioncomm (id,libelle) values (10, 'Relance effectuée'); -insert into llx_c_actioncomm (id,libelle) values (11, 'Clôture'); +insert into llx_sqltables (name, loaded) values ('llx_album',0); -delete from llx_c_stcomm; -insert into llx_c_stcomm (id,libelle) values (-1, 'NE PAS CONTACTER'); -insert into llx_c_stcomm (id,libelle) values ( 0, 'Jamais contacté'); -insert into llx_c_stcomm (id,libelle) values ( 1, 'A contacter'); -insert into llx_c_stcomm (id,libelle) values ( 2, 'Contact en cours'); -insert into llx_c_stcomm (id,libelle) values ( 3, 'Contactée'); +-- +-- Définition des action de workflow +-- +delete from llx_action_def; +insert into llx_action_def (rowid,titre,description,objet_type) VALUES (1,'Validation fiche intervention','Déclenché lors de la validation d\'une fiche d\'intervention','ficheinter'); +insert into llx_action_def (rowid,titre,description,objet_type) VALUES (2,'Validation facture','Déclenché lors de la validation d\'une facture','facture'); -delete from llx_c_typent; -insert into llx_c_typent (id,libelle) values ( 0, 'Indifférent'); -insert into llx_c_typent (id,libelle) values ( 1, 'Start-up'); -insert into llx_c_typent (id,libelle) values ( 2, 'Grand groupe'); -insert into llx_c_typent (id,libelle) values ( 3, 'PME/PMI'); -insert into llx_c_typent (id,libelle) values ( 4, 'Administration'); -insert into llx_c_typent (id,libelle) values (100, 'Autres'); +-- +-- Boites +-- +delete from llx_boxes_def; -delete from llx_c_pays; -insert into llx_c_pays (id,libelle,code) values (0, 'France', 'FR'); -insert into llx_c_pays (id,libelle,code) values (2, 'Belgique', 'BE'); -insert into llx_c_pays (id,libelle,code) values (3, 'Italie', 'IT'); -insert into llx_c_pays (id,libelle,code) values (4, 'Espagne', 'ES'); -insert into llx_c_pays (id,libelle,code) values (5, 'Allemagne', 'DE'); -insert into llx_c_pays (id,libelle,code) values (6, 'Suisse', 'CH'); -insert into llx_c_pays (id,libelle,code) values (7, 'Royaume uni', 'GB'); -insert into llx_c_pays (id,libelle,code) values (8, 'Irlande', 'IE'); -insert into llx_c_pays (id,libelle,code) values (9, 'Chine', 'CN'); -insert into llx_c_pays (id,libelle,code) values (10, 'Tunisie', 'TN'); -insert into llx_c_pays (id,libelle,code) values (11, 'Etats Unis', 'US'); -insert into llx_c_pays (id,libelle,code) values (12, 'Maroc', 'MA'); -insert into llx_c_pays (id,libelle,code) values (13, 'Algérie', 'DZ'); -insert into llx_c_pays (id,libelle,code) values (14, 'Canada', 'CA'); -insert into llx_c_pays (id,libelle,code) values (15, 'Togo', 'TG'); -insert into llx_c_pays (id,libelle,code) values (16, 'Gabon', 'GA'); -insert into llx_c_pays (id,libelle,code) values (17, 'Pays Bas', 'NL'); -insert into llx_c_pays (id,libelle,code) values (18, 'Hongrie', 'HU'); -insert into llx_c_pays (id,libelle,code) values (19, 'Russie', 'RU'); -insert into llx_c_pays (id,libelle,code) values (20, 'Suède', 'SE'); -insert into llx_c_pays (id,libelle,code) values (21, 'Côte d\'Ivoire', 'CI'); -insert into llx_c_pays (id,libelle,code) values (23, 'Sénégal', 'SN'); -insert into llx_c_pays (id,libelle,code) values (24, 'Argentine', 'AR'); -insert into llx_c_pays (id,libelle,code) values (25, 'Cameroun', 'CM'); +delete from llx_boxes; +-- +-- Constantes de configuration +-- +insert into llx_const(name, value, type, note) values ('MAIN_MONNAIE','euros','chaine','Monnaie'); +insert into llx_const(name, value, type, note) values ('MAIN_NOT_INSTALLED','1','chaine','Test d\'installation'); -delete from llx_c_effectif; -insert into llx_c_effectif (id,libelle) values (0, 'Non spécifié'); -insert into llx_c_effectif (id,libelle) values (1, '1 - 5'); -insert into llx_c_effectif (id,libelle) values (2, '6 - 10'); -insert into llx_c_effectif (id,libelle) values (3, '11 - 50'); -insert into llx_c_effectif (id,libelle) values (4, '51 - 100'); -insert into llx_c_effectif (id,libelle) values (5, '100 - 500'); -insert into llx_c_effectif (id,libelle) values (6, '> 500'); +insert into llx_const(name, value, type, note) values ('MAIN_START_YEAR','2004','chaine','Année de départ'); -delete from llx_c_paiement; -insert into llx_c_paiement (id,libelle,type) values (0, '-', 3); -insert into llx_c_paiement (id,libelle,type) values (1, 'TIP', 1); -insert into llx_c_paiement (id,libelle,type) values (2, 'Virement', 2); -insert into llx_c_paiement (id,libelle,type) values (3, 'Prélèvement', 1); -insert into llx_c_paiement (id,libelle,type) values (4, 'Liquide', 0); -insert into llx_c_paiement (id,libelle,type) values (5, 'Paiement en ligne', 0); -insert into llx_c_paiement (id,libelle,type) values (6, 'CB', 1); -insert into llx_c_paiement (id,libelle,type) values (7, 'Chèque', 2); +INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_THEME','yellow','chaine','Thème par défaut'); +INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_TITLE','Dolibarr','chaine','Titre des pages'); -delete from llx_c_propalst; -insert into llx_c_propalst (id,label) values (0, 'Brouillon'); -insert into llx_c_propalst (id,label) values (1, 'Ouverte'); -insert into llx_c_propalst (id,label) values (2, 'Signée'); -insert into llx_c_propalst (id,label) values (3, 'Non Signée'); -insert into llx_c_propalst (id,label) values (4, 'Facturée'); + +insert into llx_const(name, value, type) values ('DONS_FORM','fsfe.fr.php','chaine'); + + + +insert into llx_const(name, value, type, note) values ('MAIN_SEARCHFORM_SOCIETE','1','yesno','Affichage du formulaire de recherche des sociétés dans la barre de gauche'); +insert into llx_const(name, value, type, note) values ('MAIN_SEARCHFORM_CONTACT','1','yesno','Affichage du formulaire de recherche des contacts dans la barre de gauche'); + +insert into llx_const(name, value, type, note) values ('COMPTA_ONLINE_PAYMENT_BPLC','1','yesno','Système de gestion de la banque populaire de Lorraine'); + +insert into llx_const(name, value, type, note) values ('COMPTA_BANK_FACTURES','1','yesno','Menu factures dans la partie bank'); + + +-- +-- Mail Adherent +-- +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_RESIL','Votre adhesion sur %SERVEUR% vient d\'etre resilie.\r\nNous esperons vous revoir tres bientot','texte','Mail de Resiliation'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_VALID','MAIN\r\nVotre adhesion vient d\'etre validee. \r\nVoici le rappel de vos coordonnees (toute information erronee entrainera la non validation de votre inscription) :\r\n\r\n%INFO%\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l\'adresse suivante : \r\n%SERVEUR%public/adherents/','texte','Mail de validation'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_EDIT','Voici le rappel des coordonnees que vous avez modifiees (toute information erronee entrainera la non validation de votre inscription) :\r\n\r\n%INFO%\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l\'adresse suivante :\r\n%SERVEUR%public/adherents/','texte','Mail d\'edition'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_NEW','Merci de votre inscription. Votre adhesion devrait etre rapidement validee.\r\nVoici le rappel des coordonnees que vous avez rentrees (toute information erronee entrainera la non validation de votre inscription) :\r\n\r\n%INFO%\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l\'adresse suivante :\r\n%SERVEUR%public/adherents/','texte','Mail de nouvel inscription'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_COTIS','Bonjour %PRENOM%,\r\nMerci de votre inscription.\r\nCet email confirme que votre cotisation a ete recue et enregistree.\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l\'adresse suivante :\r\n%SERVEUR%public/adherents/','texte','Mail de validation de cotisation'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_VALID_SUBJECT','Votre adhésion a ete validée sur %SERVEUR%','chaine','sujet du mail de validation'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_RESIL_SUBJECT','Resiliation de votre adhesion sur %SERVEUR%','chaine','sujet du mail de resiliation'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_COTIS_SUBJECT','Recu de votre cotisation','chaine','sujet du mail de validation de cotisation'); +INSERT INTO llx_const (name, value, type, note) VALUES ('SIZE_LISTE_LIMIT','20','chaine','Taille des listes'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_NEW_SUBJECT','Bienvenue sur %SERVEUR%','chaine','Sujet du mail de nouvelle adhesion'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_EDIT_SUBJECT','Votre fiche a ete editee sur %SERVEUR%','chaine','Sujet du mail d\'edition'); +-- +-- Mailman +-- +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_USE_MAILMAN','0','yesno','Utilisation de Mailman'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAILMAN_UNSUB_URL','http://%SERVER%/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%ADMINPW%&user=%EMAIL%','chaine','Url de desinscription aux listes mailman'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAILMAN_URL','http://%SERVER%/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%','chaine','url pour les inscriptions mailman'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAILMAN_LISTS','test-test,test-test2','chaine','Listes auxquelles inscrire les nouveaux adherents'); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_MAILMAN_ADMINPW','','chaine','Mot de passe Admin des liste mailman',0); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_MAILMAN_SERVER','lists.domain.com','chaine','Serveur hebergeant les interfaces d\'Admin des listes mailman',0); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_MAILMAN_LISTS_COTISANT','','chaine','Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement',0); + +INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_DEBUG','1','yesno','Debug ..'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_USE_GLASNOST','0','yesno','utilisation de glasnost ?'); +-- +-- Glasnost +-- +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_GLASNOST_SERVEUR','glasnost.j1b.org','chaine','serveur glasnost'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_GLASNOST_USER','user','chaine','Administrateur glasnost'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_GLASNOST_PASS','password','chaine','password de l\'administrateur'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_USE_GLASNOST_AUTO','0','yesno','inscription automatique a glasnost ?'); +-- +-- SPIP +-- +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_USE_SPIP','0','yesno','Utilisation de SPIP ?'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_USE_SPIP_AUTO','0','yesno','Utilisation de SPIP automatiquement'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_SPIP_USER','user','chaine','user spip'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_SPIP_PASS','pass','chaine','Pass de connection'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_SPIP_SERVEUR','localhost','chaine','serveur spip'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_SPIP_DB','spip','chaine','db spip'); +-- +-- cartes adherents +-- +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_TEXT_NEW_ADH','','texte','Texte d\'entete du formaulaire d\'adhesion en ligne',0); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_CARD_HEADER_TEXT','%ANNEE%','chaine','Texte imprime sur le haut de la carte adherent',0); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_CARD_FOOTER_TEXT','Association FreeLUG http://www.freelug.org/','chaine','Texte imprime sur le bas de la carte adherent',0); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_CARD_TEXT','%TYPE% n° %ID%\r\n%PRENOM% %NOM%\r\n<%EMAIL%>\r\n%ADRESSE%\r\n%CP% %VILLE%\r\n%PAYS%','texte','Texte imprime sur la carte adherent',0); +-- +-- OsCommerce +-- +INSERT INTO llx_const(name, value, type) VALUES ('DB_NAME_OSC','catalog','chaine'); +INSERT INTO llx_const(name, value, type) VALUES ('OSC_LANGUAGE_ID','1','chaine'); +INSERT INTO llx_const(name, value, type) VALUES ('OSC_CATALOG_URL','http://osc.lafrere.lan/','chaine'); +INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_MAIL_FROM','adherents@domain.com','chaine','From des mails'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_FROM','adherents@domain.com','chaine','From des mails adherents'); +-- +-- Menus +-- +INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_MENU_BARRETOP','default.php','chaine','Module commande'); + +-- +-- Constantes +-- + +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'); + +-- +-- Types d'entreprise +-- +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'); + +-- +-- Pays +-- +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'); + +-- +-- Effectif des sociétés +-- +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 +-- Creation du login admin lors de l'installation +insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,admin) +values ('Admin','Admin','ADM','admin','admin',1,1,1); + diff --git a/pgsql/data/data_dev.sql b/pgsql/data/data_dev.sql index 8c405f24ad2..60613c2c5e3 100644 --- a/pgsql/data/data_dev.sql +++ b/pgsql/data/data_dev.sql @@ -22,130 +22,239 @@ -- 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) +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) +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) +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) +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) +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) +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) +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,''); - +UPDATE ONLY llx_const SET name = 'MAIN_THEME', value = 'yellow', type = 'chaine', visible = 1 WHERE name = 'MAIN_THEME'; 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,admin) +values ('demo','demo','DEMO','demo','demo',1,1,'demo',1); insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,webcal_login) -values ('demo','demo','DEMO','demo','demo',1,0,'demo'); +values ('demo1','demo1','DM1','demo1','demo',1,1,'demo1'); 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'); +values ('demo2','demo2','DM2','demo2','demo',1,1,'demo2'); + +INSERT INTO llx_user_rights VALUES (1,11); +INSERT INTO llx_user_rights VALUES (1,12); +INSERT INTO llx_user_rights VALUES (1,13); +INSERT INTO llx_user_rights VALUES (1,14); +INSERT INTO llx_user_rights VALUES (1,15); +INSERT INTO llx_user_rights VALUES (1,16); +INSERT INTO llx_user_rights VALUES (1,17); +INSERT INTO llx_user_rights VALUES (1,18); +INSERT INTO llx_user_rights VALUES (1,19); +INSERT INTO llx_user_rights VALUES (1,21); +INSERT INTO llx_user_rights VALUES (1,22); +INSERT INTO llx_user_rights VALUES (1,23); +INSERT INTO llx_user_rights VALUES (1,24); +INSERT INTO llx_user_rights VALUES (1,25); +INSERT INTO llx_user_rights VALUES (1,26); +INSERT INTO llx_user_rights VALUES (1,27); +INSERT INTO llx_user_rights VALUES (1,28); +INSERT INTO llx_user_rights VALUES (1,29); +INSERT INTO llx_user_rights VALUES (1,31); +INSERT INTO llx_user_rights VALUES (1,32); +INSERT INTO llx_user_rights VALUES (1,33); +INSERT INTO llx_user_rights VALUES (1,34); +INSERT INTO llx_user_rights VALUES (1,35); +INSERT INTO llx_user_rights VALUES (1,36); +INSERT INTO llx_user_rights VALUES (1,37); +INSERT INTO llx_user_rights VALUES (1,38); +INSERT INTO llx_user_rights VALUES (1,39); +INSERT INTO llx_user_rights VALUES (1,41); +INSERT INTO llx_user_rights VALUES (1,42); +INSERT INTO llx_user_rights VALUES (1,43); +INSERT INTO llx_user_rights VALUES (1,44); +INSERT INTO llx_user_rights VALUES (1,45); +INSERT INTO llx_user_rights VALUES (1,46); +INSERT INTO llx_user_rights VALUES (1,47); +INSERT INTO llx_user_rights VALUES (1,48); +INSERT INTO llx_user_rights VALUES (1,49); +INSERT INTO llx_user_rights VALUES (1,61); +INSERT INTO llx_user_rights VALUES (1,62); +INSERT INTO llx_user_rights VALUES (1,63); +INSERT INTO llx_user_rights VALUES (1,64); +INSERT INTO llx_user_rights VALUES (1,65); +INSERT INTO llx_user_rights VALUES (1,66); +INSERT INTO llx_user_rights VALUES (1,67); +INSERT INTO llx_user_rights VALUES (1,68); +INSERT INTO llx_user_rights VALUES (1,69); + + -- --- Societe +-- Societe les fournisseurs sont sur les numéros pairs -- -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); +delete from llx_societe; -insert into societe (nom,datec,cp,ville,tel,fax, client, prefix_comm) +insert into llx_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) +insert into llx_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 llx_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 llx_societe (nom,cp,ville,tel,fax,client, prefix_comm,url, fournisseur) +values ('Foo SARL','22300','Ploubezre','01 55 55 03 18','01 55 55 55 55',1,'FOO','www.gnu.org',1); -insert into societe (nom,datec,cp,ville,tel,fax, client, prefix_comm) +insert into llx_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) +insert into llx_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 llx_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) +insert into llx_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 llx_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) +insert into llx_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 llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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'); +delete from llx_socpeople; +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email,poste) +values (10,1,'Maréchal','Ferdinand','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net','Administrateur système'); +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (11,5,'Pejat','Jean-Marie','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); -insert into socpeople (idp,fk_soc, name, firstname, phone,fax,email) +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email,poste) +values (12,1,'Poulossière','Paul','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net','Directeur technique'); +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (13,6,'Myriam','Isabelle','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); + +insert into llx_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) +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (30,3,'Philippine','Sagan','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into llx_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'); +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (41,4,'Alix','Hopper','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (14,7,'Victoire','Renoir','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (15,7,'Baudelaire','Matthias','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (16,8,'Hugo','Benjamin','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (17,9,'Rembrandt','Stéphanie','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (18,10,'Picasso','Myriam','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (19,11,'Beethoven','John','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (22,11,'Dumas','Elisabeth','01 40 15 03 18','01 40 15 06 18','dev@lafrere.net'); +insert into llx_socpeople (idp,fk_soc, name, firstname, phone,fax,email) +values (21,10,'','Joséphine','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, tva_tx) +values ('RJ451MR','Câble Réseaux RJ45 1m rouge','Câble Réseaux RJ45 1m rouge',10,19.6); -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, tva_tx) +values ('RJ454M','Câble Réseaux RJ45 4m','Câble Réseaux RJ45 4m\n couleur suivant stock',19.5,19.6); -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, tva_tx) +values ('RJ452M','Câble Réseaux RJ45 2m','Câble Réseaux RJ45 2m',10,19.6); -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, tva_tx) +values ('RJ458M','Câble Réseaux RJ45 8m','Câble Réseaux RJ45 8m',10,19.6); -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, tva_tx) +values ('RJ4515M','Câble Réseaux RJ45 15m','Câble Réseaux RJ45 15m',10,19.6); -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, tva_tx, fk_product_type, duration) +values ('HEB12MS','Hébergement serveur 12 mois','Hébergement serveur 12 mois',2400,19.6,1,'12m'); -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); +insert into llx_product (ref, label, description, price, tva_tx, fk_product_type, duration) +values ('HEB03MS','Hébergement serveur 3 mois','Hébergement serveur 3 mois',600,19.6,1,'3m'); + +insert into llx_product (ref, label, description, price, tva_tx, fk_product_type, duration) +values ('HEB06MS','Hébergement serveur 6 mois','Hébergement serveur 6 mois',1200,19.6,1,'6m'); + +insert into llx_product (ref, label, description, price, tva_tx) +values ('SW8','Switch 8 ports 100Mbits','Switch 8 ports 100Mbits',1000,19.6); + +insert into llx_product (ref, label, description, price, tva_tx) +values ('SER1U','Serveur 1U Serie 3W','Serveur avec 1G de RAM et 2 processeurs',9750,19.6); + +insert into llx_product (ref, label, description, price, tva_tx) +values ('HUB8-10','Hub 8 ports 10Mbits','Hub 8 ports',750,19.6); + +insert into llx_product (ref, label, description, price, tva_tx) +values ('PB-16','Pan. Brass. 16','Panneau de brassage extensible, incluant 1 barre de 16 prises',650,19.6); + +insert into llx_product (ref, label, description, price, tva_tx) +values ('PB-32','Pan. Brass. 32','Panneau de brassage extensible, incluant 2 barres de 16 prises',1200,19.6); + +insert into llx_product (ref, label, description, price, tva_tx) +values ('HB-USB1','Hub Usb 4 ports','Hub USB 4 ports avec bloc d\'alimentation indépendant',31,19.6); + +-- +-- Liens produits fournisseurs +-- +insert into llx_product_fournisseur (datec, fk_product,fk_soc,ref_fourn,fk_user_author) +values (now(),1,2,'2313487',1); +insert into llx_product_fournisseur (datec, fk_product,fk_soc,ref_fourn,fk_user_author) +values (now(),2,2,'2313409',1); +insert into llx_product_fournisseur (datec, fk_product,fk_soc,ref_fourn,fk_user_author) +values (now(),3,2,'2323134',1); +insert into llx_product_fournisseur (datec, fk_product,fk_soc,ref_fourn,fk_user_author) +values (now(),3,4,'2313784',1); -- -- @@ -158,89 +267,57 @@ values (1, 'FI-LP-1','2001-12-05','2001-12-05','2001-12-05',1,1,1,4,'Mise -- -- Actions commerciales -- -delete from actioncomm; -insert into actioncomm (datea, fk_action,fk_soc,fk_user_author,fk_contact) +delete from llx_actioncomm; +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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) +insert into llx_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; @@ -255,30 +332,73 @@ insert into llx_compta_account (datec, number, label, fk_user_author) values (no -- 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 +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 +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 +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 +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 +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 +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 +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 +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 +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'); +-- +-- Dumping data for table `llx_bank` +-- +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-01-13','2002-01-13',4000,'Dépôt liquide',1,1,1,'DEP',200201,NULL,1,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-01-14','2002-01-14',-20,'Liquide',1,1,1,'CB',200201,NULL,1,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-02-14','2002-02-14',-23.2,'Essence',1,1,1,'CB',200201,NULL,1,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-02-15','2002-02-15',-53.32,'Cartouches imprimante',1,1,1,'CB',200202,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-02-17','2002-02-17',-100,'Liquide',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-02-18','2002-02-18',-153.32,'Restaurant',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-02-20','2002-02-20',-1532,'Réparation climatisation',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-02-21','2002-02-21',-100,'Liquide',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-02-22','2002-02-22',-46,'Timbres postes',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-03-02','2002-03-02',-60,'Liquide',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-03-02','2002-03-02',-25.66,'Essence',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-03-03','2002-03-03',-60,'Liquide',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-03-04','2002-03-04',-15.2,'Café',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-03-06','2002-03-06',-12.3,'Péage',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-03-06','2002-03-06',-25.3,'Péage',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-03-06','2002-03-06',-9.6,'Tickets de bus',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); +INSERT INTO llx_bank (datec, datev, dateo, amount, label, fk_account, fk_user_author, fk_user_rappro, fk_type, num_releve, num_chq, rappro, note, author) +VALUES (now(),'2002-03-13','2002-03-13',-10,'Liquide',1,1,NULL,'CB',NULL,NULL,0,NULL,NULL); + +-- +-- Dumping data for table `llx_bank_account` +-- + +--INSERT INTO llx_bank_account (rowid, datec, tms, label, bank, code_banque, code_guichet, number, cle_rib, bic, iban_prefix, domiciliation, courant, clos) VALUES (1,'2001-01-01 13:06:11',20031014173428,'CCP','La PosteToto','','','','','','','',1,0); diff --git a/pgsql/data/facture_dev.sql b/pgsql/data/facture_dev.sql index 3d5930c30b7..97b23820220 100644 --- a/pgsql/data/facture_dev.sql +++ b/pgsql/data/facture_dev.sql @@ -1,14 +1,26 @@ --- MySQL dump 8.21 +-- =========================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier -- --- Host: localhost Database: dolibarr ---------------------------------------------------------- --- Server version 3.23.49-log +-- 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. +--=========================================================================== -- -- 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',''); @@ -25,41 +37,41 @@ INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_pa -- 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) +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) +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) +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) +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) +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) +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) +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) +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) +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) +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) +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) +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) +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 index 5d4cb89de31..e2df16f4aa6 100644 --- a/pgsql/data/propal_dev.sql +++ b/pgsql/data/propal_dev.sql @@ -1,14 +1,26 @@ --- MySQL dump 8.21 +-- =========================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier -- --- Host: localhost Database: dolibarr ---------------------------------------------------------- --- Server version 3.23.49-log +-- 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. +--=========================================================================== -- -- 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'); @@ -22,17 +34,10 @@ INSERT INTO llx_propal (rowid, fk_soc, fk_soc_contact, fk_projet, ref, datec, da 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); diff --git a/pgsql/drop.sql b/pgsql/drop.sql new file mode 100644 index 00000000000..23c346dfe53 --- /dev/null +++ b/pgsql/drop.sql @@ -0,0 +1,187 @@ +-- +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 ?ric Seigne +-- Copyright (C) 2004 Benoit Mortier +-- +-- $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 llx_bank_url; +drop table llx_entrepot; +drop table llx_product_stock; +drop table llx_stock_mouvement; + +drop table c_actioncomm; + +drop table c_chargesociales; + +drop table c_effectif; + +drop table c_paiement ; + +drop table c_pays ; + +drop table c_propalst ; + +drop table c_stcomm; + +drop table c_typent ; + +drop table llx_action_def; + +drop table llx_actioncomm; + +drop table llx_adherent; + +drop table llx_adherent_type; + +drop table llx_adherent_options; + +drop table llx_adherent_options_label; + +drop table llx_album; + +drop table llx_album_to_groupart ; + +drop table llx_appro ; + +drop table llx_auteur; + +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_boxes; + +drop table llx_boxes_def; + +drop table llx_chargesociales; + +drop table llx_contrat; + +drop table llx_compta; + +drop table llx_compta_account; + +drop table llx_concert ; + +drop table llx_cond_reglement ; + +drop table llx_const; + +drop table llx_cotisation; + +drop table llx_deplacement; + +drop table llx_domain ; + +drop table llx_don; + +drop table llx_don_projet; + +drop table llx_editeur; + +drop table llx_fa_pr; + +drop table llx_facture; + +drop table llx_facture_rec; + +drop table llx_facturedet; + +drop table llx_facturedet_rec; + +drop table llx_facture_fourn; + +drop table llx_facture_fourn_det; + +drop table llx_fichinter; + +drop table llx_groupart; + +drop table llx_lieu_concert ; + +drop table llx_livre; + +drop table llx_livre_to_auteur ; + +drop table llx_newsletter; + +drop table llx_notify ; + +drop table llx_notify_def; + +drop table llx_paiement; + +drop table llx_paiementfourn; + +drop table llx_pointmort; + +drop table llx_product; + +drop table llx_product_fournisseur; + +drop table llx_product_price; + +drop table llx_projet; + +drop table llx_propal; + +drop table llx_propal_model_pdf; + +drop table llx_propaldet; + +drop table llx_rights_def; + +drop table llx_service; + +drop table llx_societe; + +drop table llx_socpeople; + +drop table llx_soc_events; + +drop table llx_soc_recontact; + +drop table llx_socstatutlog ; + +drop table llx_sqltables; + +drop table llx_todocomm ; + +drop table llx_transaction_bplc ; + +drop table llx_tva; + +drop table llx_user; + +drop table llx_user_rights; + +drop table llx_ventes; + +drop table llx_voyage; + +drop table llx_voyage_reduc; + +drop table llx_facture_tva_sum; diff --git a/pgsql/foreign_keys.sql b/pgsql/foreign_keys.sql new file mode 100644 index 00000000000..bd961ac490e --- /dev/null +++ b/pgsql/foreign_keys.sql @@ -0,0 +1,33 @@ +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- ============================================================================ + +ALTER TABLE llx_fichinter ADD CONSTRAINT fichinter_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); + +ALTER TABLE llx_propal ADD CONSTRAINT propal_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); + +ALTER TABLE llx_facture ADD CONSTRAINT facture_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); + +ALTER TABLE llx_facturedet ADD CONSTRAINT facturedet_fk_facture_rowid FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); + +ALTER TABLE llx_facture_tva_sum ADD CONSTRAINT facture_tva_sum_fk_facture_rowid FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); + +ALTER TABLE llx_socpeople ADD CONSTRAINT socpeople_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); diff --git a/pgsql/header-cvs b/pgsql/header-cvs new file mode 100644 index 00000000000..f3167f18284 --- /dev/null +++ b/pgsql/header-cvs @@ -0,0 +1,21 @@ +-- ============================================================================ +-- Copyright (C) 2004 Benoit Mortier +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- ============================================================================ + diff --git a/pgsql/pgsql.sql b/pgsql/pgsql.sql new file mode 100644 index 00000000000..1e9db7772d2 --- /dev/null +++ b/pgsql/pgsql.sql @@ -0,0 +1,1316 @@ +-- ============================================================================ +-- Copyright (C) 2004 Benoit Mortier +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- ============================================================================ + + +create table c_actioncomm +( + id SERIAL PRIMARY KEY, + libelle varchar(30), + todo int +); + + +create table c_chargesociales +( + id SERIAL PRIMARY KEY, + libelle varchar(80), + deductible smallint NOT NULL default 0 +); + + + + +create table c_effectif +( + id SERIAL PRIMARY KEY, + libelle varchar(30) +); + + + +create table c_paiement +( + id SERIAL PRIMARY KEY, + libelle varchar(30), + type smallint +); + + + + +create table c_pays +( + id SERIAL PRIMARY KEY, + libelle varchar(25), + code char(2) NOT NULL +); + + + +create table c_propalst +( + id SERIAL PRIMARY KEY, + label varchar(30) +); + + +create table c_stcomm +( + id SERIAL PRIMARY KEY, + libelle varchar(30) +); + + +create table c_typent +( + id SERIAL PRIMARY KEY, + libelle varchar(30) +); + + +create table llx_adherent +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + statut smallint NOT NULL DEFAULT 0, + public smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ? + fk_adherent_type smallint, + datevalid timestamp, -- date de validation + datec timestamp, -- date de creation + prenom varchar(50), + nom varchar(50), + societe varchar(50), + adresse text, + cp varchar(30), + ville varchar(50), + pays varchar(50), + email varchar(255), + login varchar(50) NOT NULL, -- login utilise pour editer sa fiche + pass varchar(50), -- pass utilise pour editer sa fiche + naiss date, -- date de naissance + 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 +); + + + + +create table llx_adherent_type +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + statut smallint NOT NULL DEFAULT 0, + libelle varchar(50), + cotisation CHAR(3) CHECK (cotisation IN ('yes','no')) NOT NULL DEFAULT 'yes', + vote CHAR(3) CHECK (vote IN ('yes','no')) NOT NULL DEFAULT 'yes', + note text, + mail_valid text -- mail envoye a la validation +); + +create table llx_album +( + rowid serial PRIMARY KEY, + osc_id integer NOT NULL, + tms timestamp, + ref varchar(12), + title varchar(64), + annee smallint, -- pourquoi smallint(64) + description text, + collectif smallint, + fk_user_author integer +); + + + +create table llx_bank +( + rowid SERIAL PRIMARY KEY, + 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 +); + + +create table llx_bank_account +( + rowid SERIAL PRIMARY KEY, + 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, + clos smallint default 0 not null +); + +create table llx_bank_categ +( + rowid SERIAL PRIMARY KEY, + label varchar(255) +); + +create table llx_bank_class +( + lineid SERIAL, + fk_categ integer not null +); + +create table llx_bank_url +( + rowid SERIAL PRIMARY KEY, + fk_bank integer, + url_id integer, + url varchar(255), + label varchar(255) +); + + +create table llx_bookmark +( + rowid SERIAL PRIMARY KEY, + fk_soc integer, + fk_user integer, + dateb timestamp +); + +create table llx_boxes +( + rowid SERIAL PRIMARY KEY, + box_id integer NOT NULL, + position smallint NOT NULL + +); + +create table llx_boxes_def +( + rowid SERIAL PRIMARY KEY, + name varchar(255) NOT NULL, + file varchar(255) NOT NULL, + note text +); +create table llx_chargesociales +( + rowid SERIAL PRIMARY KEY, + 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 +); + + + + + +create table llx_compta +( + rowid SERIAL PRIMARY KEY, + 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 + +); + + +create table llx_compta_account +( + rowid SERIAL PRIMARY KEY, + datec timestamp, + number varchar(12), + label varchar(255), + fk_user_author integer, + note text + +); + +create table llx_concert +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + date_concert timestamp, + description text, + collectif int DEFAULT 0 NOT NULL, + fk_groupart integer, + fk_lieu_concert integer, + fk_user_author integer +); + + +create table llx_cond_reglement +( + rowid SERIAL PRIMARY KEY, + sortorder smallint, + actif int default 1, + libelle varchar(255), + libelle_facture text, + fdm smallint, -- reglement fin de mois + nbjour smallint +); + +create table llx_const +( + rowid SERIAL PRIMARY KEY, + name varchar(255), + value text, -- max 65535 caracteres + type CHAR(6) CHECK (type IN ('yesno','texte','chaine')), + visible int DEFAULT 1 NOT NULL, + note text +); + +CREATE UNIQUE INDEX llx_const_idx ON llx_const (name); + +create table llx_contrat +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + enservice smallint default 0, + mise_en_service timestamp, + fin_validite timestamp, + date_cloture timestamp, + fk_soc integer NOT NULL, + fk_product integer NOT NULL, + fk_facture integer NOT NULL default 0, + fk_user_author integer NOT NULL, + fk_user_mise_en_service integer NOT NULL, + fk_user_cloture integer NOT NULL +); + + + +create table llx_cotisation +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + datec timestamp, + fk_adherent integer, + dateadh timestamp, + cotisation real, + note text +); + +create table llx_deplacement +( + rowid SERIAL PRIMARY KEY, + datec timestamp, + tms timestamp, + dated timestamp, + fk_user integer NOT NULL, + fk_user_author integer, + type smallint NOT NULL, + km smallint, + fk_soc integer, + note text +); + +create table llx_domain +( + rowid SERIAL PRIMARY KEY, + datec timestamp, + label varchar(255), + note text +); + + + +create table llx_don +( + rowid SERIAL PRIMARY KEY, + 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 +); + + +create table llx_don_projet +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + datec timestamp, + libelle varchar(255), + fk_user_author integer NOT NULL, + note text +); + +create table llx_editeur +( + rowid SERIAL PRIMARY KEY, + oscid integer NOT NULL, + tms timestamp, + nom varchar(255), + fk_user_author integer +); + + +create table llx_entrepot +( + rowid SERIAL PRIMARY KEY, + datec timestamp, + tms timestamp, + label varchar(255), + description text, + fk_user_author integer + +); + + +create table llx_fa_pr +( + rowid SERIAL PRIMARY KEY, + fk_facture integer, + fk_propal integer +); + +create table llx_facture +( + rowid SERIAL PRIMARY KEY, + 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 + fk_projet integer, -- projet auquel est associé la facture + fk_cond_reglement integer, -- condition de reglement + date_lim_reglement date, -- date limite de reglement + note text +); + +create unique index llx_facture_facnumber on llx_facture(facnumber); + +create index llx_facture_fksoc on llx_facture(fk_soc); + +create table llx_facture_fourn +( + rowid SERIAL PRIMARY KEY, + 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, + total_ht real default 0, + total_tva real default 0, + total_ttc 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); + +create table llx_facture_fourn_det +( + rowid SERIAL PRIMARY KEY, + fk_facture_fourn integer NOT NULL, + fk_product integer NULL, + description text, + pu_ht real default 0, + qty smallint default 1, + total_ht real default 0, + tva_taux real default 0, + tva real default 0, + total_ttc real default 0 +); + +create table llx_facture_rec +( + rowid SERIAL PRIMARY KEY, + titre varchar(50) NOT NULL, + fk_soc integer NOT NULL, + datec timestamp, -- date de creation + amount real default 0 NOT NULL, + remise real default 0, + remise_percent real default 0, + tva real default 0, + total real default 0, + total_ttc real default 0, + fk_user_author integer, -- createur + fk_projet integer, -- projet auquel est associé la facture + fk_cond_reglement integer, -- condition de reglement + note text +); + +CREATE INDEX llx_facture_rec_fksoc ON llx_facture_rec (fk_soc); + +create table llx_facture_tva_sum +( + fk_facture integer NOT NULL, + amount real NOT NULL, + tva_tx real NOT NULL +); + +CREATE INDEX llx_facture_tva_sum_fk_facture ON llx_facture_tva_sum (fk_facture); + +create table llx_facturedet +( + rowid SERIAL PRIMARY KEY, + fk_facture integer NOT NULL, + fk_product integer NOT NULL DEFAULT 0, + description text, + tva_taux real default 19.6, -- taux tva + qty real, -- quantité + remise_percent real default 0, -- pourcentage de remise + remise real default 0, -- montant de la remise + subprice real, -- prix avant remise + price real -- prix final +); + +CREATE INDEX llx_facturedet_fk_facture ON llx_facturedet (fk_facture); + +create table llx_facturedet_rec +( + rowid SERIAL PRIMARY KEY, + fk_facture integer NOT NULL, + fk_product integer, + description text, + tva_taux real default 19.6, -- taux tva + qty real, -- quantité + remise_percent real default 0, -- pourcentage de remise + remise real default 0, -- montant de la remise + subprice real, -- prix avant remise + price real -- prix final +); + +create table llx_fichinter +( + rowid SERIAL PRIMARY KEY, + 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); + +CREATE INDEX llx_fichinter_fk_soc ON llx_fichinter(fk_soc); + +create table llx_groupart +( + rowid SERIAL PRIMARY KEY, + osc_id integer NOT NULL, + tms timestamp, + nom varchar(64), + groupart CHAR(8) CHECK (groupart IN ('artiste','groupe')) NOT NULL, + fk_user_author integer +); + + +create table llx_lieu_concert +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + nom varchar(64) NOT NULL, + description text, + ville varchar(64) NOT NULL, + fk_user_author integer +); + + +create table llx_livre +( + rowid SERIAL PRIMARY KEY, + oscid integer NOT NULL, + tms timestamp, + status smallint, + date_ajout timestamp, + ref varchar(12), + title varchar(64), + annee smallint, + description text, + prix decimal(15,4), + fk_editeur integer, + fk_user_author integer, + frais_de_port smallint default 1, + +UNIQUE(ref) + +); + + + + +create table llx_livre_to_auteur +( + fk_livre integer NOT NULL, + fk_auteur integer NOT NULL, + + UNIQUE(fk_livre, fk_auteur) +); + + +create table llx_newsletter +( + rowid SERIAL PRIMARY KEY, + datec timestamp, + tms timestamp, + email_subject varchar(32) NOT NULL, + email_from_name varchar(255) NOT NULL, + email_from_email varchar(255) NOT NULL, + email_replyto varchar(255) NOT NULL, + email_body text, + target smallint, + sql_target text, + status smallint NOT NULL DEFAULT 0, + date_send_request timestamp, -- debut de l'envoi demandé + date_send_begin timestamp, -- debut de l'envoi + date_send_end timestamp, -- fin de l'envoi + nbsent integer, -- nombre de mails envoyés + nberror integer, -- nombre de mails envoyés + fk_user_author integer, + fk_user_valid integer, + fk_user_modif integer +); + +create table llx_notify +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + daten timestamp, -- date de la notification + fk_action integer NOT NULL, + fk_contact integer NOT NULL, + objet_type CHAR(10) CHECK (objet_type IN ('ficheinter','facture','propale')), + objet_id integer NOT NULL +); + +create table llx_notify_def +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + datec date, -- date de creation + fk_action integer NOT NULL, + fk_soc integer NOT NULL, + fk_contact integer NOT NULL +); + +create table llx_paiement +( + rowid SERIAL PRIMARY KEY, + 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 +); + +create table llx_paiementfourn +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + datec timestamp, -- date de creation de l'enregistrement + fk_facture_fourn integer, -- facture + datep timestamp, -- date de paiement + amount real default 0, -- montant + fk_user_author integer, -- auteur + fk_paiement integer NOT NULL, -- moyen de paiement + num_paiement varchar(50), -- numéro de paiement (cheque) + note text +); + +create table llx_pointmort +( + month timestamp, + amount real +); + + +create table llx_product +( + rowid SERIAL PRIMARY KEY, + datec timestamp, + tms timestamp, + ref varchar(15), + label varchar(255), + description text, + price double precision, + tva_tx double precision default 19.6, + fk_user_author integer, + envente smallint default 1, + nbvente integer default 0, + fk_product_type integer default 0, + duration varchar(6) +); + + +create table llx_product_fournisseur +( + rowid SERIAL PRIMARY KEY, + datec timestamp, + tms timestamp, + fk_product integer, + fk_soc integer, + ref_fourn varchar(30), + fk_user_author integer +); + +CREATE INDEX llx_product_fournisseur_fk_product ON llx_product_fournisseur (fk_product); + +CREATE INDEX llx_product_fournisseur_fk_soc ON llx_product_fournisseur (fk_soc); + +create table llx_product_price +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + fk_product integer NOT NULL, + date_price timestamp NOT NULL, + price double precision, + tva_tx double precision default 19.6, + fk_user_author integer, + envente smallint default 1 +); + + +create table llx_product_stock +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + fk_product integer NOT NULL, + fk_stock integer NOT NULL, + value integer +); + +CREATE INDEX llx_product_stock_fk_product ON llx_product_stock (fk_product); + +CREATE INDEX llx_product_stock_fk_stock ON llx_product_stock (fk_stock); + + +create table llx_projet +( + rowid SERIAL PRIMARY KEY, + 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); + +create table llx_propal +( + rowid SERIAL PRIMARY KEY, + 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_percent real default 0, + remise real default 0, + tva real default 0, + total real default 0, + note text, + model_pdf varchar(50) +); + +create unique index llx_propal_ref on llx_propal(ref); + +create index llx_propal_fk_soc on llx_propal(fk_soc); + +create table llx_propal_model_pdf +( + nom varchar(50) PRIMARY KEY, + libelle varchar(255), + description text +); + +create table llx_propaldet +( + rowid SERIAL PRIMARY KEY, + fk_propal integer, + fk_product integer, + description text, + tva_tx real default 19.6, -- taux tva + qty real, -- quantité + remise_percent real default 0, -- pourcentage de remise + remise real default 0, -- montant de la remise + subprice real, -- prix avant remise + price real -- prix final +); + +create table llx_rights_def +( + id integer PRIMARY KEY, + libelle varchar(255), + module varchar(12), + type CHAR CHECK (type IN ('r','w','m','d','a')), + bydefault smallint default 0 +); + + +create table llx_service +( + rowid SERIAL PRIMARY KEY, + 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); + +create table llx_soc_events +( + rowid SERIAL PRIMARY KEY, + 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 +); + +create table llx_soc_recontact +( + rowid SERIAL PRIMARY KEY, + fk_soc integer, + datere timestamp, + author varchar(15) +); + +create table llx_societe +( + idp SERIAL PRIMARY KEY, + 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 llx_societe_prefix_comm on llx_societe(prefix_comm); + +create table llx_socpeople +( + idp SERIAL PRIMARY KEY, + 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), + fk_user integer default 0, + note text +); + +CREATE INDEX llx_socpeople_fk_soc ON llx_socpeople(fk_soc); + +create table llx_socstatutlog +( + id SERIAL PRIMARY KEY, + datel timestamp, + fk_soc integer, + fk_statut integer, + author varchar(30) +); + +create table llx_sqltables +( + rowid SERIAL PRIMARY KEY, + name varchar(255), + loaded smallint +); + + +create table llx_stock_mouvement +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + datem timestamp, + fk_product integer NOT NULL, + fk_stock integer NOT NULL, + value integer, + type_mouvement smallint, + fk_user_author integer +); + + CREATE INDEX llx_stock_mouvement_fk_product ON llx_stock_mouvement (fk_product); + + CREATE INDEX llx_stock_mouvement_fk_stock ON llx_stock_mouvement (fk_stock); + +create table llx_todocomm +( + id SERIAL PRIMARY KEY, + 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 +); + + + +create table llx_transaction_bplc +( + rowid SERIAL PRIMARY KEY, + 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 +); + +create table llx_tva +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + datep date, -- date de paiement + datev date, -- date de valeur + amount real NOT NULL default 0, + label varchar(255), + note text +); + +create table llx_user +( + rowid SERIAL PRIMARY KEY, + 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, + fk_societe integer default 0, + fk_socpeople integer default 0, + note text +); + +create unique index llx_user_login on llx_user(login); + + +create table llx_user_rights +( + fk_user integer NOT NULL, + fk_id integer NOT NULL, + + UNIQUE(fk_user,fk_id) +); + +create table llx_ventes +( + rowid SERIAL PRIMARY KEY, + 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) +); + +create table llx_voyage +( + rowid SERIAL PRIMARY KEY, + 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 +); + + + +create table llx_voyage_reduc +( + rowid SERIAL PRIMARY KEY, + 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 +); + +create table llx_appro +( + rowid SERIAL PRIMARY KEY, + datec timestamp, + tms timestamp, + fk_product integer NOT NULL, + quantity smallint NOT NULL, + price real, + fk_user_author integer +); + + +create table llx_auteur +( + rowid SERIAL PRIMARY KEY, + oscid integer NOT NULL, + tms timestamp, + nom varchar(255), + fk_user_author integer +); + +create table llx_action_def +( + rowid SERIAL PRIMARY KEY, + tms timestamp, + titre varchar(255) NOT NULL, + description text, + objet_type CHAR(10) CHECK (objet_type IN ('ficheinter','facture','propale')) +); + +create table llx_adherent_options +( + optid SERIAL PRIMARY KEY, + tms timestamp, + adhid integer NOT NULL -- id de l'adherent auquel correspond ces attributs optionnel +); + +CREATE UNIQUE INDEX llx_adherent_options_adhid ON llx_adherent_options (adhid); + +create table llx_adherent_options_label +( + name SERIAL PRIMARY KEY, -- nom de l'attribut + tms timestamp, + label varchar(255) NOT NULL -- label correspondant a l'attribut +); + +create table llx_album_to_groupart +( + fk_album integer NOT NULL, + fk_groupart integer NOT NULL, + + UNIQUE (fk_album, fk_groupart) +); + +create table llx_actioncomm +( + id SERIAL PRIMARY KEY, + 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, + fk_facture integer +); + + + + + +insert into llx_cond_reglement values (1,1,1, 'A réception','Réception de facture',0,0); +insert into llx_cond_reglement values (2,2,1, '30 jours','Réglement à 30 jours',0,30); +insert into llx_cond_reglement values (3,3,1, '30 jours fin de mois','Réglement à 30 jours fin de mois',1,30); +insert into llx_cond_reglement values (4,4,1, '60 jours','Réglement à 60 jours',0,60); +insert into llx_cond_reglement values (5,5,1, '60 jours fin de mois','Réglement à 60 jours fin de mois',1,60); + + +insert into llx_sqltables (name, loaded) values ('llx_album',0); + +delete from llx_action_def; +insert into llx_action_def (rowid,titre,description,objet_type) VALUES (1,'Validation fiche intervention','Déclenché lors de la validation d\'une fiche d\'intervention','ficheinter'); +insert into llx_action_def (rowid,titre,description,objet_type) VALUES (2,'Validation facture','Déclenché lors de la validation d\'une facture','facture'); + +delete from llx_boxes_def; + +delete from llx_boxes; +insert into llx_const(name, value, type, note) values ('MAIN_MONNAIE','euros','chaine','Monnaie'); +insert into llx_const(name, value, type, note) values ('MAIN_NOT_INSTALLED','1','chaine','Test d\'installation'); + +insert into llx_const(name, value, type, note) values ('MAIN_START_YEAR','2004','chaine','Année de départ'); + +INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_THEME','yellow','chaine','Thème par défaut'); +INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_TITLE','Dolibarr','chaine','Titre des pages'); + + +insert into llx_const(name, value, type) values ('DONS_FORM','fsfe.fr.php','chaine'); + + + +insert into llx_const(name, value, type, note) values ('MAIN_SEARCHFORM_SOCIETE','1','yesno','Affichage du formulaire de recherche des sociétés dans la barre de gauche'); +insert into llx_const(name, value, type, note) values ('MAIN_SEARCHFORM_CONTACT','1','yesno','Affichage du formulaire de recherche des contacts dans la barre de gauche'); + +insert into llx_const(name, value, type, note) values ('COMPTA_ONLINE_PAYMENT_BPLC','1','yesno','Système de gestion de la banque populaire de Lorraine'); + +insert into llx_const(name, value, type, note) values ('COMPTA_BANK_FACTURES','1','yesno','Menu factures dans la partie bank'); + + +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_RESIL','Votre adhesion sur %SERVEUR% vient d\'etre resilie.\r\nNous esperons vous revoir tres bientot','texte','Mail de Resiliation'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_VALID','MAIN\r\nVotre adhesion vient d\'etre validee. \r\nVoici le rappel de vos coordonnees (toute information erronee entrainera la non validation de votre inscription) :\r\n\r\n%INFO%\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l\'adresse suivante : \r\n%SERVEUR%public/adherents/','texte','Mail de validation'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_EDIT','Voici le rappel des coordonnees que vous avez modifiees (toute information erronee entrainera la non validation de votre inscription) :\r\n\r\n%INFO%\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l\'adresse suivante :\r\n%SERVEUR%public/adherents/','texte','Mail d\'edition'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_NEW','Merci de votre inscription. Votre adhesion devrait etre rapidement validee.\r\nVoici le rappel des coordonnees que vous avez rentrees (toute information erronee entrainera la non validation de votre inscription) :\r\n\r\n%INFO%\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l\'adresse suivante :\r\n%SERVEUR%public/adherents/','texte','Mail de nouvel inscription'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_COTIS','Bonjour %PRENOM%,\r\nMerci de votre inscription.\r\nCet email confirme que votre cotisation a ete recue et enregistree.\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l\'adresse suivante :\r\n%SERVEUR%public/adherents/','texte','Mail de validation de cotisation'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_VALID_SUBJECT','Votre adhésion a ete validée sur %SERVEUR%','chaine','sujet du mail de validation'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_RESIL_SUBJECT','Resiliation de votre adhesion sur %SERVEUR%','chaine','sujet du mail de resiliation'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_COTIS_SUBJECT','Recu de votre cotisation','chaine','sujet du mail de validation de cotisation'); +INSERT INTO llx_const (name, value, type, note) VALUES ('SIZE_LISTE_LIMIT','20','chaine','Taille des listes'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_NEW_SUBJECT','Bienvenue sur %SERVEUR%','chaine','Sujet du mail de nouvelle adhesion'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_EDIT_SUBJECT','Votre fiche a ete editee sur %SERVEUR%','chaine','Sujet du mail d\'edition'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_USE_MAILMAN','0','yesno','Utilisation de Mailman'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAILMAN_UNSUB_URL','http://%SERVER%/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%ADMINPW%&user=%EMAIL%','chaine','Url de desinscription aux listes mailman'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAILMAN_URL','http://%SERVER%/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%','chaine','url pour les inscriptions mailman'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAILMAN_LISTS','test-test,test-test2','chaine','Listes auxquelles inscrire les nouveaux adherents'); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_MAILMAN_ADMINPW','','chaine','Mot de passe Admin des liste mailman',0); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_MAILMAN_SERVER','lists.domain.com','chaine','Serveur hebergeant les interfaces d\'Admin des listes mailman',0); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_MAILMAN_LISTS_COTISANT','','chaine','Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement',0); + +INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_DEBUG','1','yesno','Debug ..'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_USE_GLASNOST','0','yesno','utilisation de glasnost ?'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_GLASNOST_SERVEUR','glasnost.j1b.org','chaine','serveur glasnost'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_GLASNOST_USER','user','chaine','Administrateur glasnost'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_GLASNOST_PASS','password','chaine','password de l\'administrateur'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_USE_GLASNOST_AUTO','0','yesno','inscription automatique a glasnost ?'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_USE_SPIP','0','yesno','Utilisation de SPIP ?'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_USE_SPIP_AUTO','0','yesno','Utilisation de SPIP automatiquement'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_SPIP_USER','user','chaine','user spip'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_SPIP_PASS','pass','chaine','Pass de connection'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_SPIP_SERVEUR','localhost','chaine','serveur spip'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_SPIP_DB','spip','chaine','db spip'); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_TEXT_NEW_ADH','','texte','Texte d\'entete du formaulaire d\'adhesion en ligne',0); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_CARD_HEADER_TEXT','%ANNEE%','chaine','Texte imprime sur le haut de la carte adherent',0); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_CARD_FOOTER_TEXT','Association FreeLUG http://www.freelug.org/','chaine','Texte imprime sur le bas de la carte adherent',0); +insert into llx_const(name, value, type, note, visible) values ('ADHERENT_CARD_TEXT','%TYPE% n° %ID%\r\n%PRENOM% %NOM%\r\n<%EMAIL%>\r\n%ADRESSE%\r\n%CP% %VILLE%\r\n%PAYS%','texte','Texte imprime sur la carte adherent',0); +INSERT INTO llx_const(name, value, type) VALUES ('DB_NAME_OSC','catalog','chaine'); +INSERT INTO llx_const(name, value, type) VALUES ('OSC_LANGUAGE_ID','1','chaine'); +INSERT INTO llx_const(name, value, type) VALUES ('OSC_CATALOG_URL','http://osc.lafrere.lan/','chaine'); +INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_MAIL_FROM','adherents@domain.com','chaine','From des mails'); +INSERT INTO llx_const (name, value, type, note) VALUES ('ADHERENT_MAIL_FROM','adherents@domain.com','chaine','From des mails adherents'); +INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_MENU_BARRETOP','default.php','chaine','Module commande'); + + +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'); + +insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,admin) +values ('Admin','Admin','ADM','admin','admin',1,1,1); + diff --git a/pgsql/purge-boutique.sql b/pgsql/purge-boutique.sql new file mode 100644 index 00000000000..8a85b6666bf --- /dev/null +++ b/pgsql/purge-boutique.sql @@ -0,0 +1,29 @@ +-- +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- =========================================================================== + +delete from llx_auteur; + +delete from llx_editeur; + +delete from llx_livre; + +delete from llx_livre_to_auteur; diff --git a/pgsql/rename-tables.sql b/pgsql/rename-tables.sql new file mode 100644 index 00000000000..ccfe77e4969 --- /dev/null +++ b/pgsql/rename-tables.sql @@ -0,0 +1,29 @@ +-- ============================================================================ +-- Copyright (C) 2001-2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- ============================================================================ + +ALTER TABLE societe RENAME TO llx_societe ; + +ALTER TABLE socpeople RENAME TO llx_socpeople ; + +ALTER TABLE socstatutlog RENAME TO llx_socstatutlog ; + +ALTER TABLE actioncomm RENAME TO llx_actioncomm ;