dolibarr  7.0.0-beta
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 <http://www.gnu.org/licenses/>.
16  * or see http://www.gnu.org/
17  */
18 
24 abstract class ModeleNumRefPayments
25 {
26  var $error='';
27 
33  function isEnabled()
34  {
35  return true;
36  }
37 
43  function info()
44  {
45  global $langs;
46  $langs->load("bills");
47  return $langs->trans("NoDescription");
48  }
49 
55  function getExample()
56  {
57  global $langs;
58  $langs->load("bills");
59  return $langs->trans("NoExample");
60  }
61 
67  function canBeActivated()
68  {
69  return true;
70  }
71 
79  function getNextValue($objsoc,$object)
80  {
81  global $langs;
82  return $langs->trans("NotAvailable");
83  }
84 
90  function getVersion()
91  {
92  global $langs;
93  $langs->load("admin");
94 
95  if ($this->version == 'development') return $langs->trans("VersionDevelopment");
96  if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
97  if ($this->version == 'dolibarr') return DOL_VERSION;
98  if ($this->version) return $this->version;
99  return $langs->trans("NotAvailable");
100  }
101 }
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()
Test if the existing numbers in the database do not cause conflicts that would prevent this numbering...
getVersion()
Returns the module numbering version.
isEnabled()
Return if a module can be used or not.