[ 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/ -> modComptabiliteExpert.class.php (source)

   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: modComptabiliteExpert.class.php,v 1.5 2005/10/22 13:45:24 eldy Exp $
  22   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/includes/modules/modComptabiliteExpert.class.php,v $
  23   *
  24   */
  25  
  26  /**     \defgroup   comptabilite_expert     Module comptabilite expert
  27          \brief      Module pour inclure des fonctions de comptabilité (gestion de comptes comptables et rapports)
  28  */
  29  
  30  /**
  31          \file       htdocs/includes/modules/modComptabiliteExpert.class.php
  32          \ingroup    comptabilite_expert
  33          \brief      Fichier de description et activation du module Comptabilite Expert
  34  */
  35  
  36  include_once  "DolibarrModules.class.php";
  37  
  38  /**
  39          \class      modComptabiliteExpert
  40          \brief      Classe de description et activation du module Comptabilite Expert
  41  */
  42  
  43  class modComptabiliteExpert extends DolibarrModules
  44  {
  45  
  46     /**
  47      *   \brief      Constructeur. Definit les noms, constantes et boites
  48      *   \param      DB      handler d'accès base
  49      */
  50    function modComptabiliteExpert($DB)
  51    {
  52      global $conf;
  53      
  54      $this->db = $DB ;
  55      $this->numero = 130 ;
  56      
  57      $this->family = "financial";
  58      $this->name = "ComptabiliteExpert";
  59      $this->description = "Gestion expert de comptabilité (doubles parties)";
  60  
  61  //    $this->revision = explode(' ','$Revision: 1.5 $');
  62  //    $this->version = $this->revision[1];
  63      $this->version = "development";
  64  
  65      $this->const_name = 'MAIN_MODULE_COMPTABILITE_EXPERT';
  66  
  67      // Config pages
  68      $this->config_page_url = "comptaexpert.php";
  69  
  70      // Dépendances
  71      $this->depends = array();
  72      $this->requiredby = array("modFacture");
  73      $this->conflictwith = array("modComptabilite");
  74      
  75      // Constantes
  76      $this->const = array();
  77  
  78      // Répertoires
  79      $this->dirs = array();
  80      $this->dirs[0] = $conf->comptaexpert->dir_output;
  81      $this->dirs[1] = $conf->comptaexpert->dir_output."/rapport";
  82      $this->dirs[2] = $conf->comptaexpert->dir_output."/export";
  83      $this->dirs[3] = $conf->comptaexpert->dir_images;
  84  
  85      // Boites
  86      $this->boxes = array();
  87  
  88      // Permissions
  89      $this->rights = array();
  90      $this->rights_class = 'comptaexpert';
  91  
  92      $this->rights[1][0] = 131;
  93      $this->rights[1][1] = 'Lire le plan de compte';
  94      $this->rights[1][2] = 'r';
  95      $this->rights[1][3] = 1;
  96      $this->rights[1][4] = 'plancompte';
  97      $this->rights[1][5] = 'lire';
  98  
  99      $this->rights[2][0] = 132;
 100      $this->rights[2][1] = 'Créer/modifier un plan de compte';
 101      $this->rights[2][2] = 'w';
 102      $this->rights[2][3] = 0;
 103      $this->rights[2][4] = 'plancompte';
 104      $this->rights[2][5] = 'creer';
 105  
 106      $this->rights[3][0] = 133;
 107      $this->rights[3][1] = 'Cloturer plan de compte';
 108      $this->rights[3][2] = 'w';
 109      $this->rights[3][3] = 0;
 110      $this->rights[3][4] = 'plancompte';
 111      $this->rights[3][5] = 'cloturer';
 112  
 113      $this->rights[4][0] = 141;
 114      $this->rights[4][1] = 'Lire les mouvements comptables';
 115      $this->rights[4][2] = 'r';
 116      $this->rights[4][3] = 1;
 117      $this->rights[4][4] = 'mouvements';
 118      $this->rights[4][5] = 'lire';
 119  
 120      $this->rights[5][0] = 142;
 121      $this->rights[5][1] = 'Créer/modifier/annuler les mouvements comptables';
 122      $this->rights[5][2] = 'w';
 123      $this->rights[5][3] = 0;
 124      $this->rights[5][4] = 'mouvements';
 125      $this->rights[5][5] = 'creer';
 126  
 127      $this->rights[6][0] = 145;
 128      $this->rights[6][1] = 'Lire CA, bilans, résultats, journaux, grands livres';
 129      $this->rights[6][2] = 'r';
 130      $this->rights[6][3] = 0;
 131      $this->rights[6][4] = 'comptarapport';
 132      $this->rights[6][5] = 'lire';
 133  
 134    }
 135  
 136  
 137     /**
 138      *   \brief      Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
 139      *               Définit également les répertoires de données à créer pour ce module.
 140      */
 141    function init()
 142    {
 143      global $conf;
 144      
 145      // Nettoyage avant activation
 146      $this->remove();
 147  
 148      return $this->_init($sql);
 149    }
 150  
 151    /**
 152     *    \brief      Fonction appelée lors de la désactivation d'un module.
 153     *                Supprime de la base les constantes, boites et permissions du module.
 154     */
 155    function remove()
 156    {
 157      $sql = array();
 158  
 159      return $this->_remove($sql);
 160    }
 161  }
 162  ?>


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