[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> 4 * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> 5 * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 * 21 * $Id: modComptabilite.class.php,v 1.37 2005/10/22 13:45:24 eldy Exp $ 22 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/includes/modules/modComptabilite.class.php,v $ 23 * 24 */ 25 26 /** \defgroup comptabilite Module comptabilite 27 \brief Module pour inclure des fonctions de comptabilité (gestion de comptes comptables et rapports) 28 */ 29 30 /** 31 \file htdocs/includes/modules/modComptabilite.class.php 32 \ingroup comptabilite 33 \brief Fichier de description et activation du module Comptabilite 34 */ 35 36 include_once "DolibarrModules.class.php"; 37 38 /** \class modComptabilite 39 \brief Classe de description et activation du module Comptabilite 40 */ 41 42 class modComptabilite extends DolibarrModules 43 { 44 45 /** 46 * \brief Constructeur. Definit les noms, constantes et boites 47 * \param DB handler d'accès base 48 */ 49 function modComptabilite($DB) 50 { 51 global $conf; 52 53 $this->db = $DB ; 54 $this->numero = 10 ; 55 56 $this->family = "financial"; 57 $this->name = "Comptabilite"; 58 $this->description = "Gestion sommaire de comptabilité"; 59 60 $this->revision = explode(" ","$Revision: 1.37 $"); 61 $this->version = $this->revision[1]; 62 63 $this->const_name = 'MAIN_MODULE_COMPTABILITE'; 64 65 // Config pages 66 $this->config_page_url = "compta.php"; 67 68 // Dépendances 69 $this->depends = array(); 70 $this->requiredby = array("modFacture"); 71 $this->conflictwith = array("modComptabiliteExpert"); 72 73 // Constantes 74 $this->const = array(); 75 76 // Répertoires 77 $this->dirs = array(); 78 $this->dirs[0] = $conf->compta->dir_output; 79 $this->dirs[1] = $conf->compta->dir_output."/rapport"; 80 $this->dirs[2] = $conf->compta->dir_output."/export"; 81 $this->dirs[3] = $conf->compta->dir_images; 82 83 // Boites 84 $this->boxes = array(); 85 86 // Permissions 87 $this->rights = array(); 88 $this->rights_class = 'compta'; 89 $r=0; 90 91 $r++; 92 $this->rights[$r][0] = 91; 93 $this->rights[$r][1] = 'Lire les charges'; 94 $this->rights[$r][2] = 'r'; 95 $this->rights[$r][3] = 1; 96 $this->rights[$r][4] = 'charges'; 97 $this->rights[$r][5] = 'lire'; 98 99 $r++; 100 $this->rights[$r][0] = 92; 101 $this->rights[$r][1] = 'Créer modifier les charges'; 102 $this->rights[$r][2] = 'w'; 103 $this->rights[$r][3] = 0; 104 $this->rights[$r][4] = 'charges'; 105 $this->rights[$r][5] = 'creer'; 106 107 $r++; 108 $this->rights[$r][0] = 93; 109 $this->rights[$r][1] = 'Supprimer les charges'; 110 $this->rights[$r][2] = 'd'; 111 $this->rights[$r][3] = 0; 112 $this->rights[$r][4] = 'charges'; 113 $this->rights[$r][5] = 'supprimer'; 114 115 $r++; 116 $this->rights[$r][0] = 95; 117 $this->rights[$r][1] = 'Lire CA, bilans, résultats'; 118 $this->rights[$r][2] = 'r'; 119 $this->rights[$r][3] = 1; 120 $this->rights[$r][4] = 'resultat'; 121 $this->rights[$r][5] = 'lire'; 122 123 $r++; 124 $this->rights[$r][0] = 96; 125 $this->rights[$r][1] = 'Paramétrer la ventilation'; 126 $this->rights[$r][2] = 'r'; 127 $this->rights[$r][3] = 0; 128 $this->rights[$r][4] = 'ventilation'; 129 $this->rights[$r][5] = 'parametrer'; 130 131 $r++; 132 $this->rights[$r][0] = 97; 133 $this->rights[$r][1] = 'Ventiler les lignes de facture'; 134 $this->rights[$r][2] = 'r'; 135 $this->rights[$r][3] = 0; 136 $this->rights[$r][4] = 'ventilation'; 137 $this->rights[$r][5] = 'creer'; 138 139 $r++; 140 $this->rights[$r][0] = 98; 141 $this->rights[$r][1] = "Accès à l'espace compta/tréso"; 142 $this->rights[$r][2] = 'r'; 143 $this->rights[$r][3] = 0; 144 $this->rights[$r][4] = 'general'; 145 $this->rights[$r][5] = 'lire'; 146 147 } 148 149 150 /** 151 * \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module. 152 * Définit également les répertoires de données à créer pour ce module. 153 */ 154 function init() 155 { 156 global $conf; 157 158 // Nettoyage avant activation 159 $this->remove(); 160 161 return $this->_init($sql); 162 } 163 164 /** 165 * \brief Fonction appelée lors de la désactivation d'un module. 166 * Supprime de la base les constantes, boites et permissions du module. 167 */ 168 function remove() 169 { 170 $sql = array(); 171 172 return $this->_remove($sql); 173 } 174 } 175 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |