dolibarr  18.0.0-alpha
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 }
ModeleNumRefSupplierPayments\getExample
getExample()
Return numbering example.
Definition: modules_supplier_payment.php:129
ModelePDFSuppliersPayments
Parent class for supplier invoices models.
Definition: modules_supplier_payment.php:25
ModelePDFSuppliersPayments\liste_modeles
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation models.
Definition: modules_supplier_payment.php:76
ModeleNumRefSupplierPayments\info
info()
Return the default description of numbering module.
Definition: modules_supplier_payment.php:117
ModeleNumRefSupplierPayments\isEnabled
isEnabled()
Return if a module can be used or not.
Definition: modules_supplier_payment.php:107
ModeleNumRefSupplierPayments\getVersion
getVersion()
Returns the module numbering version.
Definition: modules_supplier_payment.php:165
ModeleNumRefSupplierPayments\getNextValue
getNextValue($objsoc, $object)
Returns the next value.
Definition: modules_supplier_payment.php:154
ModeleNumRefSupplierPayments\canBeActivated
canBeActivated()
Checks if the numbers already in the database do not cause conflicts that would prevent this numberin...
Definition: modules_supplier_payment.php:142
ModeleNumRefSupplierPayments
ModeleNumRefSupplierPayments.
Definition: modules_supplier_payment.php:95
getListOfModels
getListOfModels($db, $type, $maxfilenamelength=0)
Return list of activated modules usable for document generation.
Definition: functions2.lib.php:1925
CommonDocGenerator
Parent class for documents generators.
Definition: commondocgenerator.class.php:36