* Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * 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$ */ /** \defgroup banque Module banque \brief Module pour gérer la tenue d'un compte bancaire et rapprochements */ /** \file htdocs/includes/modules/modBanque.class.php \ingroup banque \brief Fichier de description et activation du module Banque */ include_once "DolibarrModules.class.php"; /** \class modBanque \brief Classe de description et activation du module Banque */ class modBanque extends DolibarrModules { /** * \brief Constructeur. Definit les noms, constantes et boites * \param DB handler d'accès base */ function modBanque($DB) { $this->db = $DB ; $this->id = 'banque'; // Same value xxx than in file modXxx.class.php file $this->numero = 85 ; $this->family = "financial"; $this->name = "Banque"; $this->description = "Gestion des comptes financiers de type Comptes bancaires ou postaux"; $this->revision = explode(' ','$Revision$'); $this->version = $this->revision[1]; $this->const_name = 'MAIN_MODULE_BANQUE'; $this->special = 0; $this->picto='account'; // Dépendances $this->depends = array(); $this->requiredby = array("modComptabilite","modComptabiliteExpert"); $this->conflictwith = array(); $this->langfiles = array("banks"); // Constantes $this->const = array(); $this->dirs = array(); // Boites $this->boxes = array(); $this->boxes[0][0] = "Soldes Comptes Bancaires"; $this->boxes[0][1] = "box_comptes.php"; // Permissions $this->rights = array(); $this->rights_class = 'banque'; $r=0; $r++; $this->rights[$r][0] = 111; // id de la permission $this->rights[$r][1] = 'Lire les comptes bancaires'; // libelle de la permission $this->rights[$r][2] = 'a'; // type de la permission (déprécié à ce jour) $this->rights[$r][3] = 1; // La permission est-elle une permission par défaut $this->rights[$r][4] = 'lire'; $r++; $this->rights[$r][0] = 112; // id de la permission $this->rights[$r][1] = 'Créer modifier rapprocher transactions'; // libelle de la permission $this->rights[$r][2] = 'a'; // type de la permission (déprécié à ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par défaut $this->rights[$r][4] = 'modifier'; $r++; $this->rights[$r][0] = 113; // id de la permission $this->rights[$r][1] = 'Configurer les comptes bancaires (créer, gérer catégories)'; // libelle de la permission $this->rights[$r][2] = 'a'; // type de la permission (déprécié à ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par défaut $this->rights[$r][4] = 'configurer'; } /** * \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module. * Définit également les répertoires de données à créer pour ce module. */ function init() { global $conf; // Permissions $this->remove(); $sql = array(); $this->dirs[0] = $conf->banque->dir_output; return $this->_init($sql); } /** * \brief Fonction appelée lors de la désactivation d'un module. * Supprime de la base les constantes, boites et permissions du module. */ function remove() { $sql = array(); return $this->_remove($sql); } } ?>