dolibarr  18.0.0
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  $type = 'delivery';
56  $list = array();
57 
58  include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
59  $list = getListOfModels($db, $type, $maxfilenamelength);
60 
61  return $list;
62  }
63 }
64 
65 
66 
72 {
76  public $error = '';
77 
83  public function isEnabled()
84  {
85  return true;
86  }
87 
93  public function info()
94  {
95  global $langs;
96  $langs->load("deliveries");
97  return $langs->trans("NoDescription");
98  }
99 
105  public function getExample()
106  {
107  global $langs;
108  $langs->load("deliveries");
109  return $langs->trans("NoExample");
110  }
111 
118  public function canBeActivated()
119  {
120  return true;
121  }
122 
130  public function getNextValue($objsoc, $object)
131  {
132  global $langs;
133  return $langs->trans("NotAvailable");
134  }
135 
141  public function getVersion()
142  {
143  global $langs;
144  $langs->load("admin");
145 
146  if ($this->version == 'development') {
147  return $langs->trans("VersionDevelopment");
148  } elseif ($this->version == 'experimental') {
149  return $langs->trans("VersionExperimental");
150  } elseif ($this->version == 'dolibarr') {
151  return DOL_VERSION;
152  } elseif ($this->version) {
153  return $this->version;
154  } else {
155  return $langs->trans("NotAvailable");
156  }
157  }
158 }
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()
Returns the default description of the numbering pattern.
Definition: modules_delivery.php:93
ModeleNumRefDeliveryOrder
Classe mere des modeles de numerotation des references de bon de livraison.
Definition: modules_delivery.php:71
getListOfModels
getListOfModels($db, $type, $maxfilenamelength=0)
Return list of activated modules usable for document generation.
Definition: functions2.lib.php:1925
ModeleNumRefDeliveryOrder\getVersion
getVersion()
Renvoi version du module numerotation.
Definition: modules_delivery.php:141
ModeleNumRefDeliveryOrder\canBeActivated
canBeActivated()
Checks if the numbers already in the database do not cause conflicts that would prevent this numberin...
Definition: modules_delivery.php:118
ModeleNumRefDeliveryOrder\getExample
getExample()
Return an example of numbering.
Definition: modules_delivery.php:105
ModeleNumRefDeliveryOrder\getNextValue
getNextValue($objsoc, $object)
Renvoi prochaine valeur attribuee.
Definition: modules_delivery.php:130
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:83