dolibarr  18.0.0-alpha
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') {
100  return $langs->trans("VersionDevelopment");
101  } elseif ($this->version == 'experimental') {
102  return $langs->trans("VersionExperimental");
103  } elseif ($this->version == 'dolibarr') {
104  return DOL_VERSION;
105  } elseif ($this->version) {
106  return $this->version;
107  } else {
108  return $langs->trans("NotAvailable");
109  }
110  }
111 }
ModeleNumRefPayments\getExample
getExample()
Return numbering example.
Definition: modules_payment.php:58
ModeleNumRefPayments\isEnabled
isEnabled()
Return if a module can be used or not.
Definition: modules_payment.php:36
ModeleNumRefPayments\info
info()
Return the default description of numbering module.
Definition: modules_payment.php:46
ModeleNumRefPayments\getNextValue
getNextValue($objsoc, $object)
Returns the next value.
Definition: modules_payment.php:83
ModeleNumRefPayments
Payment numbering references mother class.
Definition: modules_payment.php:24
ModeleNumRefPayments\canBeActivated
canBeActivated()
Checks if the numbers already in the database do not cause conflicts that would prevent this numberin...
Definition: modules_payment.php:71
ModeleNumRefPayments\getVersion
getVersion()
Returns the module numbering version.
Definition: modules_payment.php:94