[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003-2004 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: modFacture.class.php,v 1.45.2.3 2006/01/05 15:36:37 eldy Exp $ 22 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/includes/modules/modFacture.class.php,v $ 23 * 24 */ 25 26 /** \defgroup facture Module facture 27 \brief Module pour gérer les factures clients et/ou fournisseurs 28 */ 29 30 31 /** \file htdocs/includes/modules/modFacture.class.php 32 \ingroup facture 33 \brief Fichier de la classe de description et activation du module Facture 34 */ 35 36 include_once "DolibarrModules.class.php"; 37 38 39 /** \class modFacture 40 \brief Classe de description et activation du module Facture 41 */ 42 43 class modFacture 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 modFacture($DB) 51 { 52 $this->db = $DB ; 53 $this->numero = 30 ; 54 55 $this->family = "financial"; 56 $this->name = "Factures"; 57 $this->description = "Gestion des factures"; 58 59 $this->revision = explode(' ','$Revision: 1.45.2.3 $'); 60 $this->version = $this->revision[1]; 61 62 $this->const_name = 'MAIN_MODULE_FACTURE'; 63 $this->special = 0; 64 $this->picto='bill'; 65 66 // Dir 67 $this->dirs = array(); 68 69 // Dépendances 70 $this->depends = array("modSociete","modComptabilite"); 71 $this->requiredby = array(); 72 73 // Config pages 74 $this->config_page_url = "facture.php"; 75 76 // Constantes 77 $this->const = array(); 78 79 $this->const[0][0] = "FAC_PDF_INTITULE"; 80 $this->const[0][1] = "chaine"; 81 $this->const[0][2] = "Facture Dolibarr"; 82 $this->const[0][4] = 1; 83 84 $this->const[1][0] = "FAC_PDF_ADRESSE"; 85 $this->const[1][1] = "texte"; 86 $this->const[1][2] = "Adresse"; 87 $this->const[1][4] = 1; 88 89 $this->const[2][0] = "FAC_PDF_TEL"; 90 $this->const[2][1] = "chaine"; 91 $this->const[2][2] = "02 97 42 42 42"; 92 $this->const[2][4] = 1; 93 94 $this->const[3][0] = "FAC_PDF_FAX"; 95 $this->const[3][1] = "chaine"; 96 $this->const[3][2] = "02 97 00 00 00"; 97 $this->const[3][4] = 1; 98 99 $this->const[4][0] = "FAC_PDF_MEL"; 100 $this->const[4][1] = "chaine"; 101 $this->const[4][2] = "your@mail.com"; 102 $this->const[4][4] = 1; 103 104 $this->const[5][0] = "FAC_PDF_WWW"; 105 $this->const[5][1] = "chaine"; 106 $this->const[5][2] = "www.masociete.com"; 107 $this->const[5][4] = 1; 108 109 $this->const[6][0] = "FAC_PDF_LOGO"; 110 $this->const[6][1] = "chaine"; 111 $this->const[6][2] = "/logo/mylogo.png"; 112 $this->const[6][4] = 1; 113 114 $this->const[7][0] = "FACTURE_ADDON_PDF"; 115 $this->const[7][1] = "chaine"; 116 $this->const[7][2] = "crabe"; 117 118 $this->const[7][0] = "FACTURE_ADDON"; 119 $this->const[7][1] = "chaine"; 120 $this->const[7][2] = "terre"; 121 122 $this->const[8][0] = "FAC_FORCE_DATE_VALIDATION"; 123 $this->const[8][1] = "yesno"; 124 $this->const[8][2] = "0"; 125 126 $this->const[9][0] = "FAC_ADD_PROD_DESC"; 127 $this->const[9][1] = "chaine"; 128 $this->const[9][2] = "0"; 129 $this->const[9][3] = "Mettre à 1 pour voir la description d'un produit dans une facture"; 130 $this->const[9][4] = 1; 131 132 // Boites 133 $this->boxes = array(); 134 135 $this->boxes[0][0] = "Factures clients récentes impayées"; 136 $this->boxes[0][1] = "box_factures_imp.php"; 137 138 $this->boxes[1][0] = "Factures fournisseurs récentes impayées"; 139 $this->boxes[1][1] = "box_factures_fourn_imp.php"; 140 141 $this->boxes[2][0] = "Dernières factures clients saisies"; 142 $this->boxes[2][1] = "box_factures.php"; 143 144 $this->boxes[3][0] = "Dernières factures fournisseurs saisies"; 145 $this->boxes[3][1] = "box_factures_fourn.php"; 146 147 // Permissions 148 $this->rights = array(); 149 $this->rights_class = 'facture'; 150 151 $this->rights[1][0] = 11; 152 $this->rights[1][1] = 'Lire les factures'; 153 $this->rights[1][2] = 'a'; 154 $this->rights[1][3] = 1; 155 $this->rights[1][4] = 'lire'; 156 157 $this->rights[2][0] = 12; 158 $this->rights[2][1] = 'Créer/modifier les factures'; 159 $this->rights[2][2] = 'a'; 160 $this->rights[2][3] = 0; 161 $this->rights[2][4] = 'creer'; 162 163 $this->rights[3][0] = 14; 164 $this->rights[3][1] = 'Valider les factures'; 165 $this->rights[3][2] = 'a'; 166 $this->rights[3][3] = 0; 167 $this->rights[3][4] = 'valider'; 168 169 $this->rights[4][0] = 15; 170 $this->rights[4][1] = 'Envoyer les factures'; 171 $this->rights[4][2] = 'a'; 172 $this->rights[4][3] = 0; 173 $this->rights[4][4] = 'envoyer'; 174 175 $this->rights[5][0] = 16; 176 $this->rights[5][1] = 'Emettre des paiements sur les factures'; 177 $this->rights[5][2] = 'a'; 178 $this->rights[5][3] = 0; 179 $this->rights[5][4] = 'paiement'; 180 181 $this->rights[6][0] = 19; 182 $this->rights[6][1] = 'Supprimer les factures'; 183 $this->rights[6][2] = 'a'; 184 $this->rights[6][3] = 0; 185 $this->rights[6][4] = 'supprimer'; 186 187 } 188 189 190 /** 191 * \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module. 192 * Définit également les répertoires de données à créer pour ce module. 193 */ 194 function init() 195 { 196 global $conf; 197 198 // Permissions 199 $this->remove(); 200 201 // Dir 202 $this->dirs[0] = $conf->facture->dir_output; 203 204 $sql = array(); 205 206 return $this->_init($sql); 207 } 208 209 /** 210 * \brief Fonction appelée lors de la désactivation d'un module. 211 * Supprime de la base les constantes, boites et permissions du module. 212 */ 213 function remove() 214 { 215 $sql = array(); 216 217 return $this->_remove($sql); 218 } 219 } 220 ?>
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 |
![]() |