dolibarr  7.0.0-beta
modules_livraison.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@capnetworks.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 <http://www.gnu.org/licenses/>.
21  * or see http://www.gnu.org/
22  */
23 
31 require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
32 
33 
38 {
39  var $error='';
40 
48  static function liste_modeles($db,$maxfilenamelength=0)
49  {
50  global $conf;
51 
52  $type='delivery';
53  $liste=array();
54 
55  include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
56  $liste=getListOfModels($db,$type,$maxfilenamelength);
57 
58  return $liste;
59  }
60 }
61 
62 
63 
69 {
70  var $error='';
71 
77  function isEnabled()
78  {
79  return true;
80  }
81 
87  function info()
88  {
89  global $langs;
90  $langs->load("deliveries");
91  return $langs->trans("NoDescription");
92  }
93 
99  function getExample()
100  {
101  global $langs;
102  $langs->load("deliveries");
103  return $langs->trans("NoExample");
104  }
105 
112  function canBeActivated()
113  {
114  return true;
115  }
116 
124  function getNextValue($objsoc, $object)
125  {
126  global $langs;
127  return $langs->trans("NotAvailable");
128  }
129 
135  function getVersion()
136  {
137  global $langs;
138  $langs->load("admin");
139 
140  if ($this->version == 'development') return $langs->trans("VersionDevelopment");
141  if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
142  if ($this->version == 'dolibarr') return DOL_VERSION;
143  if ($this->version) return $this->version;
144  return $langs->trans("NotAvailable");
145  }
146 }
getVersion()
Renvoi version du module numerotation.
canBeActivated()
Test si les numeros deja en vigueur dans la base ne provoquent pas d de conflits qui empechera cette ...
getExample()
Renvoi un exemple de numerotation.
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.