dolibarr/htdocs/includes/modules/modPropale.class.php

114 lines
3.5 KiB
PHP
Raw Normal View History

2003-06-24 17:19:11 +02:00
<?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
2003-06-24 17:19:11 +02:00
*
* 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$
*
*/
2003-11-13 16:09:12 +01:00
include_once "DolibarrModules.class.php";
2003-09-10 18:03:44 +02:00
2003-11-13 16:09:12 +01:00
class modPropale extends DolibarrModules
2003-06-24 17:19:11 +02:00
{
/*
* Initialisation
*
*/
Function modPropale($DB)
{
$this->db = $DB ;
2003-11-13 16:09:12 +01:00
$this->numero = 20 ;
$this->family = "crm";
2003-11-13 16:09:12 +01:00
$this->name = "Propositions commerciales";
2004-05-08 22:42:44 +02:00
$this->description = "Gestion des propositions commerciales";
2003-11-13 16:09:12 +01:00
$this->const_name = "MAIN_MODULE_PROPALE";
$this->const_config = MAIN_MODULE_PROPALE;
// D<>pendances
2003-11-13 16:09:12 +01:00
$this->depends = array("modSociete","modCommercial");
2003-11-07 18:46:37 +01:00
$this->config_page_url = "propale.php";
2003-11-13 16:09:12 +01:00
2003-09-10 18:31:37 +02:00
$this->const = array();
2003-09-11 17:19:56 +02:00
$this->boxes = array();
2003-09-10 18:31:37 +02:00
/*
* Constantes
*/
$this->const[0][0] = "PROPALE_ADDON_PDF";
$this->const[0][1] = "chaine";
$this->const[0][2] = "rouge";
$this->const[0][3] = 'Nom du gestionnaire de g<>n<EFBFBD>ration des propales en PDF';
$this->const[0][4] = 0;
2003-09-10 18:31:37 +02:00
$this->const[1][0] = "PROPALE_ADDON";
$this->const[1][1] = "chaine";
$this->const[1][2] = "mod_propale_ivoire";
$this->const[1][3] = 'Nom du gestionnaire de num<75>rotation des propales';
$this->const[1][4] = 0;
2003-11-13 16:09:12 +01:00
/*
* Boites
*/
2003-09-11 17:19:56 +02:00
$this->boxes[0][0] = "Proposition commerciales";
$this->boxes[0][1] = "box_propales.php";
2003-06-24 17:19:11 +02:00
}
/*
*
*
*
*/
Function init()
2003-09-10 18:31:37 +02:00
{
2003-08-11 20:35:29 +02:00
/*
* Permissions et valeurs par d<EFBFBD>faut
2003-08-11 20:35:29 +02:00
*/
$sql = array(
"insert into ".MAIN_DB_PREFIX."rights_def values (20,'Tous les droits sur les propositions commerciales','propale','a',0);",
"insert into ".MAIN_DB_PREFIX."rights_def values (21,'Lire les propositions commerciales','propale','r',1);",
"insert into ".MAIN_DB_PREFIX."rights_def values (22,'Cr<43>er modifier les propositions commerciales','propale','w',0);",
"insert into ".MAIN_DB_PREFIX."rights_def values (24,'Valider les propositions commerciales','propale','d',0);",
"insert into ".MAIN_DB_PREFIX."rights_def values (25,'Envoyer les propositions commerciales aux clients','propale','d',0);",
"insert into ".MAIN_DB_PREFIX."rights_def values (26,'Cl<43>turer les propositions commerciales','propale','d',0);",
"insert into ".MAIN_DB_PREFIX."rights_def values (27,'Supprimer les propositions commerciales','propale','d',0);",
"REPLACE INTO ".MAIN_DB_PREFIX."propal_model_pdf SET nom = '".$this->const[0][2]."'",
2003-08-11 20:35:29 +02:00
);
//"insert into ".MAIN_DB_PREFIX."rights_def values (23,'Modifier les propositions commerciales d\'autrui','propale','m',0);",
2003-09-10 18:03:44 +02:00
2003-09-11 17:19:56 +02:00
return $this->_init($sql);
2003-08-11 20:35:29 +02:00
2003-06-24 17:19:11 +02:00
}
2003-07-23 15:58:58 +02:00
/*
*
*
*/
Function remove()
{
$sql = array(
"DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'propale';"
);
2003-09-10 18:03:44 +02:00
return $this->_remove($sql);
2003-07-23 15:58:58 +02:00
}
2003-06-24 17:19:11 +02:00
}
?>