dolibarr  9.0.0
modComptabilite.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2008 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 3 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, see <http://www.gnu.org/licenses/>.
19  */
20 
29 include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
30 
31 
36 {
37 
43  function __construct($db)
44  {
45  global $conf;
46 
47  $this->db = $db;
48  $this->numero = 10;
49 
50  $this->family = "financial";
51  $this->module_position = '60';
52  // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
53  $this->name = preg_replace('/^mod/i','',get_class($this));
54  $this->description = "Gestion sommaire de comptabilite";
55 
56  // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
57  $this->version = 'dolibarr';
58 
59  $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
60  $this->picto='accounting';
61 
62  // Config pages
63  $this->config_page_url = array("compta.php");
64 
65  // Dependencies
66  $this->depends = array("modFacture","modBanque");
67  $this->requiredby = array();
68  $this->conflictwith = array("modAccounting");
69  $this->langfiles = array("compta");
70 
71  // Constants
72  $this->const = array();
73 
74  // Data directories to create when module is enabled
75  $this->dirs = array("/comptabilite/temp",
76  "/comptabilite/rapport",
77  "/comptabilite/export",
78  "/comptabilite/bordereau"
79  );
80 
81  // Boxes
82  $this->boxes = array();
83 
84  // Permissions
85  $this->rights = array();
86  $this->rights_class = 'compta';
87  $r=0;
88 
89  $r++;
90  $this->rights[$r][0] = 95;
91  $this->rights[$r][1] = 'Lire CA, bilans, resultats';
92  $this->rights[$r][2] = 'r';
93  $this->rights[$r][3] = 0;
94  $this->rights[$r][4] = 'resultat';
95  $this->rights[$r][5] = 'lire';
96 
97 
98  // Menus
99  //-------
100  $this->menu = 1; // This module add menu entries. They are coded into menu manager.
101  }
102 
103 
112  function init($options='')
113  {
114  global $conf;
115 
116  // Nettoyage avant activation
117  $this->remove($options);
118 
119  $sql = array();
120 
121  return $this->_init($sql,$options);
122  }
123 }
Class DolibarrModules.
</td >< td class="liste_titre" align="right"></td ></tr >< tr class="liste_titre">< input type="checkbox" onClick="toggle(this)"/> Ref p ref Label p label Duration p duration warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow img yes disabled img no img no< tr class="oddeven">< td >< input type="checkbox" class="check" name="' . $i . '"' . $disabled . '></td >< td >< input type="checkbox" class="check" name="choose'.$i.'"></td >< td class="nowrap"></td >< td >< input type="hidden" name="desc' . $i . '" value="' . dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
Definition: replenish.php:573
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:103
__construct($db)
Constructor.
_init($array_sql, $options='')
Enables a module.
init($options='')
Function called when module is enabled.
Class to describe and enable module Comptabilite.