dolibarr  x.y.z
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';
20 
21 
26 {
30  public $error = '';
31 
35  public $page_largeur;
36 
40  public $page_hauteur;
41 
45  public $format;
46 
50  public $marge_gauche;
51 
55  public $marge_droite;
56 
60  public $marge_haute;
61 
65  public $marge_basse;
66 
67 
68  // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
76  public static function liste_modeles($db, $maxfilenamelength = 0)
77  {
78  // phpcs:enable
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 
96 {
100  public $error = '';
101 
107  public function isEnabled()
108  {
109  return true;
110  }
111 
117  public function info()
118  {
119  global $langs;
120  $langs->load("bills");
121  return $langs->trans("NoDescription");
122  }
123 
129  public function getExample()
130  {
131  global $langs;
132  $langs->load("bills");
133  return $langs->trans("NoExample");
134  }
135 
142  public function canBeActivated()
143  {
144  return true;
145  }
146 
154  public function getNextValue($objsoc, $object)
155  {
156  global $langs;
157  return $langs->trans("NotAvailable");
158  }
159 
165  public function getVersion()
166  {
167  global $langs;
168  $langs->load("admin");
169 
170  if ($this->version == 'development') {
171  return $langs->trans("VersionDevelopment");
172  } elseif ($this->version == 'experimental') {
173  return $langs->trans("VersionExperimental");
174  } elseif ($this->version == 'dolibarr') {
175  return DOL_VERSION;
176  } elseif ($this->version) {
177  return $this->version;
178  }
179  return $langs->trans("NotAvailable");
180  }
181 }
Parent class for documents generators.
ModeleNumRefSupplierPayments.
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.