dolibarr  7.0.0-beta
modules_supplier_payment.php
1 <?php
2 /* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  * or see http://www.gnu.org/
17  */
18 
19 require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
24 {
25  var $error='';
26 
27 
35  static function liste_modeles($db,$maxfilenamelength=0)
36  {
37  global $conf;
38 
39  $type='supplier_payment';
40  $liste=array();
41 
42  include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
43  $liste=getListOfModels($db,$type,$maxfilenamelength);
44 
45  return $liste;
46  }
47 
48 }
49 
56 {
57  var $error='';
58 
64  function isEnabled()
65  {
66  return true;
67  }
68 
74  function info()
75  {
76  global $langs;
77  $langs->load("bills");
78  return $langs->trans("NoDescription");
79  }
80 
86  function getExample()
87  {
88  global $langs;
89  $langs->load("bills");
90  return $langs->trans("NoExample");
91  }
92 
98  function canBeActivated()
99  {
100  return true;
101  }
102 
110  function getNextValue($objsoc,$object)
111  {
112  global $langs;
113  return $langs->trans("NotAvailable");
114  }
115 
121  function getVersion()
122  {
123  global $langs;
124  $langs->load("admin");
125 
126  if ($this->version == 'development') return $langs->trans("VersionDevelopment");
127  if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
128  if ($this->version == 'dolibarr') return DOL_VERSION;
129  if ($this->version) return $this->version;
130  return $langs->trans("NotAvailable");
131  }
132 }
getExample()
Return numbering example.
isEnabled()
Return if a module can be used or not.
getNextValue($objsoc, $object)
Returns the next value.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation models.
info()
Return the default description of numbering module.
getVersion()
Returns the module numbering version.
Parent class for supplier invoices models.
canBeActivated()
Test if the existing numbers in the database do not cause conflicts that would prevent this numbering...
Payment numbering references mother class.
Parent class for documents generators.
getListOfModels($db, $type, $maxfilenamelength=0)
Return list of activated modules usable for document generation.