dolibarr  7.0.0-beta
modules_facturefournisseur.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
3  * Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
4  * Copyright (C) 2013-2016 Philippe Grand <philippe.grand@atoo-net.com>
5  * Copyright (C) 2014 Marcos GarcĂ­a <marcosgdf@gmail.com>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  * or see http://www.gnu.org/
20  */
21 
28 require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
29 require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
30 
31 
36 {
37  var $error='';
38 
39 
47  static function liste_modeles($db,$maxfilenamelength=0)
48  {
49  global $conf;
50 
51  $type='invoice_supplier';
52  $liste=array();
53 
54  include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
55  $liste=getListOfModels($db,$type,$maxfilenamelength);
56 
57  return $liste;
58  }
59 
60 }
61 
66 {
67  var $error='';
68 
73  function isEnabled()
74  {
75  return true;
76  }
77 
82  function info()
83  {
84  global $langs;
85  $langs->load("invoices");
86  return $langs->trans("NoDescription");
87  }
88 
93  function getExample()
94  {
95  global $langs;
96  $langs->load("invoices");
97  return $langs->trans("NoExample");
98  }
99 
104  function canBeActivated()
105  {
106  return true;
107  }
108 
116  function getNextValue($objsoc,$object,$mode)
117  {
118  global $langs;
119  return $langs->trans("NotAvailable");
120  }
121 
126  function getVersion()
127  {
128  global $langs;
129  $langs->load("admin");
130 
131  if ($this->version == 'development') return $langs->trans("VersionDevelopment");
132  if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
133  if ($this->version == 'dolibarr') return DOL_VERSION;
134  if ($this->version) return $this->version;
135  return $langs->trans("NotAvailable");
136  }
137 }
canBeActivated()
Tests if the numbers already in force in the database do not cause conflicts that would prevent this ...
Parent Class of numbering models of suppliers invoices references.
isEnabled()
Return if a model can be used or not.
getNextValue($objsoc, $object, $mode)
Returns next value assigned.
Parent class for supplier invoices models.
info()
Returns the default description of the model numbering.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation models.
Parent class for documents generators.
getVersion()
Returns version of the model numbering.
getListOfModels($db, $type, $maxfilenamelength=0)
Return list of activated modules usable for document generation.
getExample()
Returns a numbering example.