dolibarr  13.0.2
modules_delivery.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
5  * Copyright (C) 2006-2011 Regis Houssin <regis.houssin@inodbox.com>
6  * Copyright (C) 2011-2012 Philippe Grand <philippe.grand@atoo-net.com>
7  * Copyright (C) 2014 Marcos GarcĂ­a <marcosgdf@gmail.com>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <https://www.gnu.org/licenses/>.
21  * or see https://www.gnu.org/
22  */
23 
31 require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
32 
33 
38 {
42  public $error = '';
43 
44  // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
52  public static function liste_modeles($db, $maxfilenamelength = 0)
53  {
54  // phpcs:enable
55  global $conf;
56 
57  $type = 'delivery';
58  $liste = array();
59 
60  include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
61  $liste = getListOfModels($db, $type, $maxfilenamelength);
62 
63  return $liste;
64  }
65 }
66 
67 
68 
74 {
78  public $error = '';
79 
85  public function isEnabled()
86  {
87  return true;
88  }
89 
95  public function info()
96  {
97  global $langs;
98  $langs->load("deliveries");
99  return $langs->trans("NoDescription");
100  }
101 
107  public function getExample()
108  {
109  global $langs;
110  $langs->load("deliveries");
111  return $langs->trans("NoExample");
112  }
113 
120  public function canBeActivated()
121  {
122  return true;
123  }
124 
132  public function getNextValue($objsoc, $object)
133  {
134  global $langs;
135  return $langs->trans("NotAvailable");
136  }
137 
143  public function getVersion()
144  {
145  global $langs;
146  $langs->load("admin");
147 
148  if ($this->version == 'development') return $langs->trans("VersionDevelopment");
149  elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
150  elseif ($this->version == 'dolibarr') return DOL_VERSION;
151  elseif ($this->version) return $this->version;
152  else return $langs->trans("NotAvailable");
153  }
154 }
getVersion()
Renvoi version du module numerotation.
canBeActivated()
Checks if the numbers already in the database do not cause conflicts that would prevent this numberin...
getExample()
Return an example of numbering.
isEnabled()
Return if a module can be used or not.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation modules.
Classe mere des modeles de bon de livraison.
info()
Renvoi la description par defaut du modele de numerotation.
Classe mere des modeles de numerotation des references de bon de livraison.
getNextValue($objsoc, $object)
Renvoi prochaine valeur attribuee.
Parent class for documents generators.
getListOfModels($db, $type, $maxfilenamelength=0)
Return list of activated modules usable for document generation.