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

102 lines
2.8 KiB
PHP
Raw Normal View History

2003-09-12 23:32:56 +02:00
<?PHP
2004-07-13 18:08:38 +02:00
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
2003-09-12 23:32:56 +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$
*
*/
/*! \defgroup societe Module societe
\brief Module pour g<EFBFBD>rer les societes et contacts clients
*/
/*!
\file htdocs/includes/modules/modSociete.class.php
\ingroup societe
\brief Fichier de description et activation du module Societe
*/
2003-11-13 16:09:12 +01:00
include_once "DolibarrModules.class.php";
2003-09-12 23:32:56 +02:00
/*! \class modSociete
\brief Classe de description et activation du module Societe
*/
2003-11-13 16:09:12 +01:00
class modSociete extends DolibarrModules
2003-09-12 23:32:56 +02:00
{
/*
* Initialisation
*
*/
function modSociete($DB)
2003-09-12 23:32:56 +02:00
{
$this->db = $DB ;
2003-11-13 16:09:12 +01:00
$this->numero = 1 ;
$this->family = "crm";
2003-11-13 16:09:12 +01:00
$this->name = "Module societe";
$this->description = "Gestion des soci<63>t<EFBFBD>s et contacts";
2003-11-13 16:09:12 +01:00
$this->const_name = "MAIN_MODULE_SOCIETE";
$this->const_config = MAIN_MODULE_SOCIETE;
// D<>pendances
2003-09-12 23:32:56 +02:00
$this->depends = array();
$this->requiredby = array("modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande");
2003-09-12 23:32:56 +02:00
$this->const = array();
$this->boxes = array();
}
/*
*
*
*
*/
function init()
2003-09-12 23:32:56 +02:00
{
/*
* Permissions
*/
2004-09-06 21:45:23 +02:00
$this->remove();
2004-07-13 18:08:38 +02:00
$sql = array(
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (120,'Tous les droits sur les soci<63>t<EFBFBD>s','societe','a',0);",
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (121,'Lire les societes','societe','r',1);",
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (122,'Cr<43>er modifier les societes','societe','w',0);",
"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (129,'Supprimer les soci<63>t<EFBFBD>s','societe','d',0);"
2004-07-13 18:08:38 +02:00
);
2003-09-12 23:32:56 +02:00
return $this->_init($sql);
}
/*
*
*
*/
function remove()
2003-09-12 23:32:56 +02:00
{
2004-07-13 18:08:38 +02:00
$sql = array(
"DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'societe';",
);
2003-09-12 23:32:56 +02:00
return $this->_remove($sql);
}
}
?>