dolibarr 18.0.6
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
19require_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
102 public $version;
103
104
110 public function isEnabled()
111 {
112 return true;
113 }
114
120 public function info()
121 {
122 global $langs;
123 $langs->load("bills");
124 return $langs->trans("NoDescription");
125 }
126
132 public function getExample()
133 {
134 global $langs;
135 $langs->load("bills");
136 return $langs->trans("NoExample");
137 }
138
145 public function canBeActivated()
146 {
147 return true;
148 }
149
157 public function getNextValue($objsoc, $object)
158 {
159 global $langs;
160 return $langs->trans("NotAvailable");
161 }
162
168 public function getVersion()
169 {
170 global $langs;
171 $langs->load("admin");
172
173 if ($this->version == 'development') {
174 return $langs->trans("VersionDevelopment");
175 } elseif ($this->version == 'experimental') {
176 return $langs->trans("VersionExperimental");
177 } elseif ($this->version == 'dolibarr') {
178 return DOL_VERSION;
179 } elseif ($this->version) {
180 return $this->version;
181 }
182 return $langs->trans("NotAvailable");
183 }
184}
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.