dolibarr  16.0.1
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 
97  public function getNextValue($objsoc = null, $invoice = null, $mode = 'next')
98  {
99  global $langs;
100  return $langs->trans('NotAvailable');
101  }
102 
108  public function getVersion()
109  {
110  global $langs;
111  $langs->load("admin");
112 
113  if ($this->version == 'development') {
114  return $langs->trans('VersionDevelopment');
115  }
116  if ($this->version == 'experimental') {
117  return $langs->trans('VersionExperimental');
118  }
119  if ($this->version == 'dolibarr') {
120  return DOL_VERSION;
121  }
122  if ($this->version) {
123  return $this->version;
124  }
125  return $langs->trans('NotAvailable');
126  }
127 }
getExample()
Return an example of numbering.
Classe mere des modeles de numerotation des tickets de caisse.
getVersion()
Renvoi version du modele de numerotation.
getNextValue($objsoc=null, $invoice=null, $mode= 'next')
Renvoi prochaine valeur attribuee.
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.