dolibarr  17.0.3
modPaymentByBankTransfer.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
5  * Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
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 <https://www.gnu.org/licenses/>.
19  */
20 
29 include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
30 
31 
36 {
37 
43  public function __construct($db)
44  {
45  global $conf;
46 
47  $this->db = $db;
48  $this->numero = 56;
49 
50  $this->family = "financial";
51  $this->module_position = '52';
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 = "Management of payment by bank transfer";
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  // Name of png file (without png) used for this module
61  $this->picto = 'payment';
62 
63  // Data directories to create when module is enabled
64  $this->dirs = array("/paymentbybanktransfer/temp", "/paymentbybanktransfer/receipts");
65 
66  // Dependencies
67  $this->hidden = false; // A condition to hide module
68  $this->depends = array("modFournisseur", "modBanque"); // List of module class names as string that must be enabled if this module is enabled
69  $this->requiredby = array(); // List of module ids to disable if this one is disabled
70  $this->conflictwith = array(); // List of module class names as string this module is in conflict with
71  $this->phpmin = array(7, 0); // Minimum version of PHP required by module
72 
73  // Config pages
74  $this->config_page_url = array("paymentbybanktransfer.php");
75 
76  // Constants
77  $this->const = array();
78  $r = 0;
79 
80  /*$this->const[$r][0] = "BANK_ADDON_PDF";
81  $this->const[$r][1] = "chaine";
82  $this->const[$r][2] = "sepamandate";
83  $this->const[$r][3] = 'Name of manager to generate SEPA mandate';
84  $this->const[$r][4] = 0;
85  $r++;*/
86 
87 
88  // Boxes
89  $this->boxes = array();
90 
91  // Permissions
92  $this->rights = array();
93  $this->rights_class = 'paymentbybanktransfer';
94  $r = 0;
95  $r++;
96  $this->rights[$r][0] = 561;
97  $this->rights[$r][1] = 'Read bank transfer payment orders';
98  $this->rights[$r][2] = 'r';
99  $this->rights[$r][3] = 0;
100  $this->rights[$r][4] = 'read';
101 
102  $r++;
103  $this->rights[$r][0] = 562;
104  $this->rights[$r][1] = 'Create/modify a bank transfer payment order';
105  $this->rights[$r][2] = 'w';
106  $this->rights[$r][3] = 0;
107  $this->rights[$r][4] = 'create';
108 
109  $r++;
110  $this->rights[$r][0] = 563;
111  $this->rights[$r][1] = 'Send/Transmit bank transfer payment order';
112  $this->rights[$r][2] = 'a';
113  $this->rights[$r][3] = 0;
114  $this->rights[$r][4] = 'send';
115 
116  $r++;
117  $this->rights[$r][0] = 564;
118  $this->rights[$r][1] = 'Record Debits/Rejects of bank transfer payment order';
119  $this->rights[$r][2] = 'a';
120  $this->rights[$r][3] = 0;
121  $this->rights[$r][4] = 'debit';
122 
123  // Menus
124  //-------
125  $this->menu = 1; // This module add menu entries. They are coded into menu manager.
126  }
127 
128 
137  public function init($options = '')
138  {
139  global $conf;
140 
141  // Permissions
142  $this->remove($options);
143 
144  $sql = array();
145 
146  return $this->_init($sql, $options);
147  }
148 }
modPaymentByBankTransfer\__construct
__construct($db)
Constructor.
Definition: modPaymentByBankTransfer.class.php:43
db
$conf db
API class for accounts.
Definition: inc.php:41
description
print *****$script_file(".$version.") pid cd cd cd description as description
Definition: email_expire_services_to_customers.php:83
name
$conf db name
Definition: repair.php:122
DolibarrModules\_init
_init($array_sql, $options='')
Enables a module.
Definition: DolibarrModules.class.php:397
modPaymentByBankTransfer
Class to describe and enable module of payment by Bank transfer.
Definition: modPaymentByBankTransfer.class.php:35
modPaymentByBankTransfer\init
init($options='')
Function called when module is enabled.
Definition: modPaymentByBankTransfer.class.php:137
DolibarrModules
Class DolibarrModules.
Definition: DolibarrModules.class.php:37