dolibarr  13.0.2
modules_takepos.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
5  * Copyright (C) 2011-2012 Philippe Grand <philippe.grand@atoo-net.com>
6  * Copyright (C) 2020 Open-DSI <support@open-dsi.fr>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  * or see http://www.gnu.org/
21  */
22 
34 abstract class ModeleNumRefTakepos
35 {
39  public $error = '';
40 
41 
42  public $version = '';
43 
49  public function isEnabled()
50  {
51  return true;
52  }
53 
59  public function info()
60  {
61  global $langs;
62  $langs->load("cashdesk@cashdesk");
63  return $langs->trans("NoDescription");
64  }
65 
71  public function getExample()
72  {
73  global $langs;
74  $langs->load('cashdesk@cashdesk');
75  return $langs->trans('NoExample');
76  }
77 
84  public function canBeActivated()
85  {
86  return true;
87  }
88 
94  public function getNextValue()
95  {
96  global $langs;
97  return $langs->trans('NotAvailable');
98  }
99 
105  public function getVersion()
106  {
107  global $langs;
108  $langs->load("admin");
109 
110  if ($this->version == 'development') return $langs->trans('VersionDevelopment');
111  if ($this->version == 'experimental') return $langs->trans('VersionExperimental');
112  if ($this->version == 'dolibarr') return DOL_VERSION;
113  if ($this->version) return $this->version;
114  return $langs->trans('NotAvailable');
115  }
116 }
getExample()
Return an example of numbering.
Classe mere des modeles de numerotation des tickets de caisse.
getVersion()
Renvoi version du modele de numerotation.
info()
Renvoi la description par defaut du modele de numerotation.
canBeActivated()
Checks if the numbers already in the database do not cause conflicts that would prevent this numberin...
isEnabled()
Return if a module can be used or not.
getNextValue()
Renvoi prochaine valeur attribuee.