[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/includes/modules/ -> modPrelevement.class.php (source)

   1  <?php
   2  /* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2005      Laurent Destailleur  <eldy@users.sourceforge.net>
   4   *
   5   * This program is free software; you can redistribute it and/or modify
   6   * it under the terms of the GNU General Public License as published by
   7   * the Free Software Foundation; either version 2 of the License, or
   8   * (at your option) any later version.
   9   *
  10   * This program is distributed in the hope that it will be useful,
  11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13   * GNU General Public License for more details.
  14   *
  15   * You should have received a copy of the GNU General Public License
  16   * along with this program; if not, write to the Free Software
  17   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18   *
  19   * $Id: modPrelevement.class.php,v 1.22 2005/10/22 13:45:24 eldy Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/includes/modules/modPrelevement.class.php,v $
  21   *
  22   */
  23  
  24  /**
  25     \defgroup   prelevement     Module prelevement
  26     \brief      Module de gestion des prélèvements bancaires
  27  */
  28  
  29  /**
  30     \file       htdocs/includes/modules/modPrelevement.class.php
  31     \ingroup    prelevement
  32     \brief      Fichier de description et activation du module Prelevement
  33  */
  34  
  35  include_once  "DolibarrModules.class.php";
  36  
  37  /**
  38     \class modPrelevement
  39     \brief      Classe de description et activation du module Prelevement
  40  */
  41  
  42  class modPrelevement 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 modPrelevement($DB)
  50    {
  51      global $conf;
  52      
  53      $this->db = $DB ;
  54      $this->numero = 57 ;
  55  
  56      $this->family = "financial";
  57      $this->name = "Prelevement";
  58      $this->description = "Gestion des Prélèvements";
  59  
  60      $this->revision = explode(' ','$Revision: 1.22 $');
  61      $this->version = $this->revision[1];
  62  
  63      $this->const_name = 'MAIN_MODULE_PRELEVEMENT';
  64      $this->special = 0;
  65  
  66      // Dir
  67      $this->dirs = array();
  68      $this->data_directory = $conf->prelevement->dir_output . "/bon";
  69  
  70      // Dépendances
  71      $this->depends = array("modFacture");
  72      $this->requiredby = array();
  73  
  74      // Constantes
  75      $this->const = array();
  76  
  77      // Boites
  78      $this->boxes = array();
  79  
  80      // Permissions
  81      $this->rights = array();
  82      $this->rights_class = 'prelevement';
  83  
  84      $this->rights[1][0] = 151;
  85      $this->rights[1][1] = 'Consulter les prélèvements';
  86      $this->rights[1][2] = 'r';
  87      $this->rights[1][3] = 1;
  88      $this->rights[1][4] = 'bons';
  89      $this->rights[1][5] = 'lire';
  90  
  91      $this->rights[2][0] = 152;
  92      $this->rights[2][1] = 'Configurer les prélèvements';
  93      $this->rights[2][2] = 'w';
  94      $this->rights[2][3] = 0;    
  95      $this->rights[2][4] = 'bons';
  96      $this->rights[2][5] = 'configurer';
  97  
  98      $this->rights[3][0] = 153;
  99      $this->rights[3][1] = 'Consulter les bons de prélèvements';
 100      $this->rights[3][2] = 'r';
 101      $this->rights[3][3] = 0;
 102      $this->rights[3][4] = 'bons';
 103      $this->rights[3][5] = 'lire';
 104  
 105      $this->rights[4][0] = 154;
 106      $this->rights[4][1] = 'Créer un bon de prélèvement';
 107      $this->rights[4][2] = 'w';
 108      $this->rights[4][3] = 0;
 109      $this->rights[4][4] = 'bons';
 110      $this->rights[4][5] = 'creer';
 111    }
 112  
 113  
 114     /**
 115      *   \brief      Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
 116      *               Définit également les répertoires de données à créer pour ce module.
 117      */
 118    function init()
 119    {
 120      global $conf;
 121      
 122      // Permissions
 123      $this->remove();
 124  
 125      // Dir
 126      $this->dirs[0] = $conf->prelevement->dir_output;
 127      $this->dirs[1] = $conf->prelevement->dir_output."/bon" ;
 128  
 129      $sql = array();
 130      
 131      return $this->_init($sql);
 132    }
 133  
 134    /**
 135     *    \brief      Fonction appelée lors de la désactivation d'un module.
 136     *                Supprime de la base les constantes, boites et permissions du module.
 137     */
 138    function remove()
 139    {
 140      $sql = array();
 141  
 142      return $this->_remove($sql);
 143    }
 144  }
 145  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics