dolibarr  16.0.5
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  $list = array();
59 
60  include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
61  $list = getListOfModels($db, $type, $maxfilenamelength);
62 
63  return $list;
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') {
149  return $langs->trans("VersionDevelopment");
150  } elseif ($this->version == 'experimental') {
151  return $langs->trans("VersionExperimental");
152  } elseif ($this->version == 'dolibarr') {
153  return DOL_VERSION;
154  } elseif ($this->version) {
155  return $this->version;
156  } else {
157  return $langs->trans("NotAvailable");
158  }
159  }
160 }
ModelePDFDeliveryOrder\liste_modeles
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation modules.
Definition: modules_delivery.php:52
ModelePDFDeliveryOrder
Classe mere des modeles de bon de livraison.
Definition: modules_delivery.php:37
ModeleNumRefDeliveryOrder\info
info()
Renvoi la description par defaut du modele de numerotation.
Definition: modules_delivery.php:95
ModeleNumRefDeliveryOrder
Classe mere des modeles de numerotation des references de bon de livraison.
Definition: modules_delivery.php:73
getListOfModels
getListOfModels($db, $type, $maxfilenamelength=0)
Return list of activated modules usable for document generation.
Definition: functions2.lib.php:1919
ModeleNumRefDeliveryOrder\getVersion
getVersion()
Renvoi version du module numerotation.
Definition: modules_delivery.php:143
ModeleNumRefDeliveryOrder\canBeActivated
canBeActivated()
Checks if the numbers already in the database do not cause conflicts that would prevent this numberin...
Definition: modules_delivery.php:120
ModeleNumRefDeliveryOrder\getExample
getExample()
Return an example of numbering.
Definition: modules_delivery.php:107
ModeleNumRefDeliveryOrder\getNextValue
getNextValue($objsoc, $object)
Renvoi prochaine valeur attribuee.
Definition: modules_delivery.php:132
CommonDocGenerator
Parent class for documents generators.
Definition: commondocgenerator.class.php:36
ModeleNumRefDeliveryOrder\isEnabled
isEnabled()
Return if a module can be used or not.
Definition: modules_delivery.php:85