dolibarr  9.0.0
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@inodbox.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 {
40  public $error='';
41 
42 
43  // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
51  static function liste_modeles($db, $maxfilenamelength=0)
52  {
53  // phpcs:enable
54  global $conf;
55 
56  $type = 'invoice_supplier';
57  $list = array();
58 
59  include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
60  $list = getListOfModels($db, $type, $maxfilenamelength);
61 
62  return $list;
63  }
64 }
65 
70 {
74  public $error='';
75 
80  function isEnabled()
81  {
82  return true;
83  }
84 
89  function info()
90  {
91  global $langs;
92  $langs->load("invoices");
93  return $langs->trans("NoDescription");
94  }
95 
100  function getExample()
101  {
102  global $langs;
103  $langs->load("invoices");
104  return $langs->trans("NoExample");
105  }
106 
111  function canBeActivated()
112  {
113  return true;
114  }
115 
123  function getNextValue($objsoc,$object,$mode)
124  {
125  global $langs;
126  return $langs->trans("NotAvailable");
127  }
128 
133  function getVersion()
134  {
135  global $langs;
136  $langs->load("admin");
137 
138  if ($this->version == 'development') return $langs->trans("VersionDevelopment");
139  if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
140  if ($this->version == 'dolibarr') return DOL_VERSION;
141  if ($this->version) return $this->version;
142  return $langs->trans("NotAvailable");
143  }
144 }
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.