From c8a56c8b32d4d867a1f4441fb67bf3798fc310f7 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 3 Dec 2004 10:08:27 +0000 Subject: [PATCH] Nouveau fichier & Copyright --- .../sql/llx_telephonie_client_statistique.sql | 22 +++++++ .../sql/llx_telephonie_commande.key.sql | 27 ++++++++ .../sql/llx_telephonie_commande.sql | 25 ++++++-- .../sql/llx_telephonie_facture.key.sql | 31 +++++++++ .../sql/llx_telephonie_fournisseur.sql | 29 +++++++++ .../sql/llx_telephonie_societe_ligne.sql | 64 ++++++------------- .../llx_telephonie_societe_ligne_statut.sql | 45 +++++++++++++ 7 files changed, 193 insertions(+), 50 deletions(-) create mode 100644 htdocs/telephonie/sql/llx_telephonie_commande.key.sql create mode 100644 htdocs/telephonie/sql/llx_telephonie_facture.key.sql create mode 100644 htdocs/telephonie/sql/llx_telephonie_fournisseur.sql create mode 100644 htdocs/telephonie/sql/llx_telephonie_societe_ligne_statut.sql diff --git a/htdocs/telephonie/sql/llx_telephonie_client_statistique.sql b/htdocs/telephonie/sql/llx_telephonie_client_statistique.sql index 67b533b6883..5de9772c7de 100644 --- a/htdocs/telephonie/sql/llx_telephonie_client_statistique.sql +++ b/htdocs/telephonie/sql/llx_telephonie_client_statistique.sql @@ -1,3 +1,25 @@ +-- ======================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ======================================================================== +-- create table llx_telephonie_client_statistique ( dates date, diff --git a/htdocs/telephonie/sql/llx_telephonie_commande.key.sql b/htdocs/telephonie/sql/llx_telephonie_commande.key.sql new file mode 100644 index 00000000000..e9fc8790034 --- /dev/null +++ b/htdocs/telephonie/sql/llx_telephonie_commande.key.sql @@ -0,0 +1,27 @@ +-- ======================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ======================================================================== + +ALTER TABLE llx_telephonie_commande ADD INDEX (fk_user_creat); +ALTER TABLE llx_telephonie_commande ADD INDEX (fk_fournisseur); + +ALTER TABLE llx_telephonie_commande ADD FOREIGN KEY (fk_user_creat) REFERENCES llx_user (rowid); +ALTER TABLE llx_telephonie_commande ADD FOREIGN KEY (fk_fournisseur) REFERENCES llx_telephonie_fournisseur (rowid); diff --git a/htdocs/telephonie/sql/llx_telephonie_commande.sql b/htdocs/telephonie/sql/llx_telephonie_commande.sql index 5bcd2ca106c..b2961ea7155 100644 --- a/htdocs/telephonie/sql/llx_telephonie_commande.sql +++ b/htdocs/telephonie/sql/llx_telephonie_commande.sql @@ -1,7 +1,24 @@ - +-- ======================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville -- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. -- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. -- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ======================================================================== -- create table llx_telephonie_commande ( rowid integer AUTO_INCREMENT PRIMARY KEY, @@ -12,9 +29,3 @@ create table llx_telephonie_commande ( )type=innodb; - -ALTER TABLE llx_telephonie_commande ADD INDEX (fk_user_creat); -ALTER TABLE llx_telephonie_commande ADD INDEX (fk_fournisseur); - -ALTER TABLE llx_telephonie_commande ADD FOREIGN KEY (fk_user_creat) REFERENCES llx_user (rowid); -ALTER TABLE llx_telephonie_commande ADD FOREIGN KEY (fk_fournisseur) REFERENCES llx_telephonie_fournisseur (rowid); diff --git a/htdocs/telephonie/sql/llx_telephonie_facture.key.sql b/htdocs/telephonie/sql/llx_telephonie_facture.key.sql new file mode 100644 index 00000000000..42be1585af3 --- /dev/null +++ b/htdocs/telephonie/sql/llx_telephonie_facture.key.sql @@ -0,0 +1,31 @@ +-- ======================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ======================================================================== + +-- +ALTER TABLE llx_telephonie_facture ADD INDEX (fk_facture); +ALTER TABLE llx_telephonie_facture ADD INDEX (fk_ligne); + +-- +-- +ALTER TABLE llx_telephonie_facture ADD FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); + +ALTER TABLE llx_telephonie_facture ADD FOREIGN KEY (fk_ligne) REFERENCES llx_telephonie_societe_ligne (rowid); diff --git a/htdocs/telephonie/sql/llx_telephonie_fournisseur.sql b/htdocs/telephonie/sql/llx_telephonie_fournisseur.sql new file mode 100644 index 00000000000..fdae2b622e3 --- /dev/null +++ b/htdocs/telephonie/sql/llx_telephonie_fournisseur.sql @@ -0,0 +1,29 @@ +-- ======================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ======================================================================== + +create table llx_telephonie_fournisseur ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + nom varchar(255), + email_commande varchar(255), + commande_active tinyint default 0 + +)type=innodb; diff --git a/htdocs/telephonie/sql/llx_telephonie_societe_ligne.sql b/htdocs/telephonie/sql/llx_telephonie_societe_ligne.sql index 26989d2baa5..519a3dc35dc 100644 --- a/htdocs/telephonie/sql/llx_telephonie_societe_ligne.sql +++ b/htdocs/telephonie/sql/llx_telephonie_societe_ligne.sql @@ -1,3 +1,24 @@ +-- ======================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ======================================================================== -- -- Statut des lignes -- @@ -6,49 +27,6 @@ -- 2 recue -- 3 probleme -- -create table llx_telephonie_societe_ligne ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - datec datetime, - fk_client_comm integer NOT NULL, -- Client décideur - fk_soc integer NOT NULL, - ligne varchar(12) NOT NULL, - fk_soc_facture integer NOT NULL, - statut smallint DEFAULT 0, - fk_fournisseur integer NOT NULL, - remise real DEFAULT 0, - note text, - fk_commercial integer NOT NULL, - fk_concurrent integer DEFAULT 1 NOT NULL, - fk_user_creat integer, - date_commande datetime, - fk_user_commande integer, - isfacturable enum('oui','non') DEFAULT 'oui', - mode_paiement enum('vir','pre') DEFAULT 'pre', - - code_analytique varchar(12), - - UNIQUE INDEX(fk_soc, ligne) -)type=innodb; - -ALTER TABLE llx_telephonie_societe_ligne ADD INDEX (fk_fournisseur); -ALTER TABLE llx_telephonie_societe_ligne ADD INDEX (fk_client_comm); -ALTER TABLE llx_telephonie_societe_ligne ADD INDEX (fk_soc); -ALTER TABLE llx_telephonie_societe_ligne ADD INDEX (fk_soc_facture); -ALTER TABLE llx_telephonie_societe_ligne ADD INDEX (fk_user_creat); -ALTER TABLE llx_telephonie_societe_ligne ADD INDEX (fk_user_commande); -ALTER TABLE llx_telephonie_societe_ligne ADD INDEX (fk_commercial); -ALTER TABLE llx_telephonie_societe_ligne ADD INDEX (fk_concurrent); - -ALTER TABLE llx_telephonie_societe_ligne ADD FOREIGN KEY (fk_fournisseur) REFERENCES llx_telephonie_fournisseur (rowid); -ALTER TABLE llx_telephonie_societe_ligne ADD FOREIGN KEY (fk_client_comm) REFERENCES llx_societe(idp); -ALTER TABLE llx_telephonie_societe_ligne ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe(idp); -ALTER TABLE llx_telephonie_societe_ligne ADD FOREIGN KEY (fk_soc_facture) REFERENCES llx_societe(idp); -ALTER TABLE llx_telephonie_societe_ligne ADD FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid); -ALTER TABLE llx_telephonie_societe_ligne ADD FOREIGN KEY (fk_user_commande) REFERENCES llx_user(rowid); -ALTER TABLE llx_telephonie_societe_ligne ADD FOREIGN KEY (fk_commercial) REFERENCES llx_user(rowid); -ALTER TABLE llx_telephonie_societe_ligne ADD FOREIGN KEY (fk_concurrent) REFERENCES llx_telephonie_concurrents (rowid); - - create table llx_telephonie_societe_ligne_statut ( rowid integer AUTO_INCREMENT PRIMARY KEY, diff --git a/htdocs/telephonie/sql/llx_telephonie_societe_ligne_statut.sql b/htdocs/telephonie/sql/llx_telephonie_societe_ligne_statut.sql new file mode 100644 index 00000000000..519a3dc35dc --- /dev/null +++ b/htdocs/telephonie/sql/llx_telephonie_societe_ligne_statut.sql @@ -0,0 +1,45 @@ +-- ======================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- +-- ======================================================================== +-- +-- Statut des lignes +-- +-- 0 a commander +-- 1 commandée +-- 2 recue +-- 3 probleme +-- + +create table llx_telephonie_societe_ligne_statut ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms datetime, + fk_ligne integer NOT NULL, + statut smallint NOT NULL, + fk_user integer, + comment varchar(255) + +)type=innodb; + +ALTER TABLE llx_telephonie_societe_ligne_statut ADD INDEX (fk_ligne); +ALTER TABLE llx_telephonie_societe_ligne_statut ADD INDEX (fk_user); + +ALTER TABLE llx_telephonie_societe_ligne_statut ADD FOREIGN KEY (fk_ligne) REFERENCES llx_telephonie_societe_ligne(rowid); +ALTER TABLE llx_telephonie_societe_ligne_statut ADD FOREIGN KEY (fk_user) REFERENCES llx_user(rowid);