dolibarr  9.0.0
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 {
28  public $error='';
29 
30 
31  // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
39  static function liste_modeles($db,$maxfilenamelength=0)
40  {
41  // phpcs:enable
42  global $conf;
43 
44  $type='supplier_payment';
45  $liste=array();
46 
47  include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
48  $liste=getListOfModels($db,$type,$maxfilenamelength);
49 
50  return $liste;
51  }
52 }
53 
60 {
64  public $error='';
65 
71  function isEnabled()
72  {
73  return true;
74  }
75 
81  function info()
82  {
83  global $langs;
84  $langs->load("bills");
85  return $langs->trans("NoDescription");
86  }
87 
93  function getExample()
94  {
95  global $langs;
96  $langs->load("bills");
97  return $langs->trans("NoExample");
98  }
99 
105  function canBeActivated()
106  {
107  return true;
108  }
109 
117  function getNextValue($objsoc,$object)
118  {
119  global $langs;
120  return $langs->trans("NotAvailable");
121  }
122 
128  function getVersion()
129  {
130  global $langs;
131  $langs->load("admin");
132 
133  if ($this->version == 'development') return $langs->trans("VersionDevelopment");
134  if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
135  if ($this->version == 'dolibarr') return DOL_VERSION;
136  if ($this->version) return $this->version;
137  return $langs->trans("NotAvailable");
138  }
139 }
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.