[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-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: modStock.class.php,v 1.16 2005/10/22 13:45:24 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/includes/modules/modStock.class.php,v $ 21 * 22 */ 23 24 /** 25 \defgroup stock Module stock 26 \brief Module pour gérer la tenue de stocks produits 27 */ 28 29 /** 30 \file htdocs/includes/modules/modStock.class.php 31 \ingroup stock 32 \brief Fichier de description et activation du module Stock 33 */ 34 35 include_once "DolibarrModules.class.php"; 36 37 /** 38 \class modStock 39 \brief Classe de description et activation du module Stock 40 */ 41 42 class modStock 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 modStock($DB) 50 { 51 $this->db = $DB ; 52 $this->numero = 52 ; 53 54 $this->family = "products"; 55 $this->name = "Stock produits"; 56 $this->description = "Gestion des stocks"; 57 58 $this->revision = explode(' ','$Revision: 1.16 $'); 59 $this->version = $this->revision[1]; 60 61 $this->const_name = 'MAIN_MODULE_STOCK'; 62 $this->special = 0; 63 $this->picto='stock'; 64 65 // Dir 66 $this->dirs = array(); 67 68 // Dépendences 69 $this->depends = array("modProduit"); 70 $this->requiredby = array(); 71 72 // Constantes 73 $this->const = array(); 74 75 // Boxes 76 $this->boxes = array(); 77 78 // Permissions 79 $this->rights = array(); 80 $this->rights_class = 'stock'; 81 82 $this->rights[0][0] = 1001; 83 $this->rights[0][1] = 'Lire les stocks'; 84 $this->rights[0][2] = 'r'; 85 $this->rights[0][3] = 1; 86 $this->rights[0][4] = 'lire'; 87 $this->rights[0][5] = ''; 88 89 $this->rights[1][0] = 1002; 90 $this->rights[1][1] = 'Créer/Modifier les stocks'; 91 $this->rights[1][2] = 'w'; 92 $this->rights[1][3] = 0; 93 $this->rights[1][4] = 'creer'; 94 $this->rights[1][5] = ''; 95 96 $this->rights[2][0] = 1003; 97 $this->rights[2][1] = 'Supprimer les stocks'; 98 $this->rights[2][2] = 'd'; 99 $this->rights[2][3] = 0; 100 $this->rights[2][4] = 'supprimer'; 101 $this->rights[2][5] = ''; 102 103 $this->rights[3][0] = 1004; 104 $this->rights[3][1] = 'Lire mouvements de stocks'; 105 $this->rights[3][2] = 'r'; 106 $this->rights[3][3] = 1; 107 $this->rights[3][4] = 'mouvement'; 108 $this->rights[3][5] = 'lire'; 109 110 $this->rights[4][0] = 1005; 111 $this->rights[4][1] = 'Créer/modifier mouvements de stocks'; 112 $this->rights[4][2] = 'w'; 113 $this->rights[4][3] = 0; 114 $this->rights[4][4] = 'mouvement'; 115 $this->rights[4][5] = 'creer'; 116 117 } 118 119 /** 120 * \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module. 121 * Définit également les répertoires de données à créer pour ce module. 122 */ 123 function init() 124 { 125 $sql = array(); 126 127 return $this->_init($sql); 128 } 129 130 /** 131 * \brief Fonction appelée lors de la désactivation d'un module. 132 * Supprime de la base les constantes, boites et permissions du module. 133 */ 134 function remove() 135 { 136 $sql = array(); 137 138 return $this->_remove($sql); 139 140 } 141 } 142 ?>
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 |
![]() |