dolibarr  17.0.4
modules_supplier_payment.php
1 <?php
2 /* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  * or see https://www.gnu.org/
17  */
18 
19 require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
24 {
28  public $error = '';
29 
33  public $page_largeur;
34 
38  public $page_hauteur;
39 
43  public $format;
44 
48  public $marge_gauche;
49 
53  public $marge_droite;
54 
58  public $marge_haute;
59 
63  public $marge_basse;
64 
65 
66  // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
74  public static function liste_modeles($db, $maxfilenamelength = 0)
75  {
76  // phpcs:enable
77  global $conf;
78 
79  $type = 'supplier_payment';
80  $list = array();
81 
82  include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
83  $list = getListOfModels($db, $type, $maxfilenamelength);
84 
85  return $list;
86  }
87 }
88 
95 {
99  public $error = '';
100 
106  public function isEnabled()
107  {
108  return true;
109  }
110 
116  public function info()
117  {
118  global $langs;
119  $langs->load("bills");
120  return $langs->trans("NoDescription");
121  }
122 
128  public function getExample()
129  {
130  global $langs;
131  $langs->load("bills");
132  return $langs->trans("NoExample");
133  }
134 
141  public function canBeActivated()
142  {
143  return true;
144  }
145 
153  public function getNextValue($objsoc, $object)
154  {
155  global $langs;
156  return $langs->trans("NotAvailable");
157  }
158 
164  public function getVersion()
165  {
166  global $langs;
167  $langs->load("admin");
168 
169  if ($this->version == 'development') {
170  return $langs->trans("VersionDevelopment");
171  } elseif ($this->version == 'experimental') {
172  return $langs->trans("VersionExperimental");
173  } elseif ($this->version == 'dolibarr') {
174  return DOL_VERSION;
175  } elseif ($this->version) {
176  return $this->version;
177  }
178  return $langs->trans("NotAvailable");
179  }
180 }
Parent class for documents generators.
Payment numbering references mother class.
canBeActivated()
Checks if the numbers already in the database do not cause conflicts that would prevent this numberin...
getVersion()
Returns the module numbering version.
info()
Return the default description of numbering module.
getExample()
Return numbering example.
isEnabled()
Return if a module can be used or not.
getNextValue($objsoc, $object)
Returns the next value.
Parent class for supplier invoices models.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation models.
getListOfModels($db, $type, $maxfilenamelength=0)
Return list of activated modules usable for document generation.