dolibarr  13.0.2
modules_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 <https://www.gnu.org/licenses/>.
16  * or see https://www.gnu.org/
17  */
18 
24 abstract class ModeleNumRefPayments
25 {
29  public $error = '';
30 
36  public function isEnabled()
37  {
38  return true;
39  }
40 
46  public function info()
47  {
48  global $langs;
49  $langs->load("bills");
50  return $langs->trans("NoDescription");
51  }
52 
58  public function getExample()
59  {
60  global $langs;
61  $langs->load("bills");
62  return $langs->trans("NoExample");
63  }
64 
71  public function canBeActivated()
72  {
73  return true;
74  }
75 
83  public function getNextValue($objsoc, $object)
84  {
85  global $langs;
86  return $langs->trans("NotAvailable");
87  }
88 
94  public function getVersion()
95  {
96  global $langs;
97  $langs->load("admin");
98 
99  if ($this->version == 'development') return $langs->trans("VersionDevelopment");
100  elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
101  elseif ($this->version == 'dolibarr') return DOL_VERSION;
102  elseif ($this->version) return $this->version;
103  else return $langs->trans("NotAvailable");
104  }
105 }
info()
Return the default description of numbering module.
getExample()
Return numbering example.
Payment numbering references mother class.
getNextValue($objsoc, $object)
Returns the next value.
canBeActivated()
Checks if the numbers already in the database do not cause conflicts that would prevent this numberin...
getVersion()
Returns the module numbering version.
isEnabled()
Return if a module can be used or not.