1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* Copyright (C) 2018 Quentin Vial-Gouteyron <[email protected]> |
4
|
|
|
* Copyright (C) 2024 Rafael San José <[email protected]> |
5
|
|
|
* |
6
|
|
|
* This program is free software; you can redistribute it and/or modify |
7
|
|
|
* it under the terms of the GNU General Public License as published by |
8
|
|
|
* the Free Software Foundation; either version 3 of the License, or |
9
|
|
|
* (at your option) any later version. |
10
|
|
|
* |
11
|
|
|
* This program is distributed in the hope that it will be useful, |
12
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14
|
|
|
* GNU General Public License for more details. |
15
|
|
|
* |
16
|
|
|
* You should have received a copy of the GNU General Public License |
17
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. |
18
|
|
|
* or see https://www.gnu.org/ |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace Dolibarr\Code\Reception\Classes; |
22
|
|
|
|
23
|
|
|
use Dolibarr\Code\Core\Classes\CommonDocGenerator; |
24
|
|
|
use DoliDB; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* \file htdocs/core/modules/reception/modules_reception.php |
28
|
|
|
* \ingroup reception |
29
|
|
|
* \brief File that contains parent class for sending receipts models |
30
|
|
|
* and parent class for sending receipts numbering models |
31
|
|
|
*/ |
32
|
|
|
|
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* Parent class of sending receipts models |
36
|
|
|
*/ |
37
|
|
|
abstract class ModelePdfReception extends CommonDocGenerator |
38
|
|
|
{ |
39
|
|
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
40
|
|
|
/** |
41
|
|
|
* Return list of active generation modules |
42
|
|
|
* |
43
|
|
|
* @param DoliDB $db Database handler |
44
|
|
|
* @param integer $maxfilenamelength Max length of value to show |
45
|
|
|
* @return array List of templates |
46
|
|
|
*/ |
47
|
|
|
public static function liste_modeles($db, $maxfilenamelength = 0) |
48
|
|
|
{ |
49
|
|
|
// phpcs:enable |
50
|
|
|
$type = 'reception'; |
51
|
|
|
$list = array(); |
52
|
|
|
|
53
|
|
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; |
54
|
|
|
$list = getListOfModels($db, $type, $maxfilenamelength); |
55
|
|
|
|
56
|
|
|
return $list; |
|
|
|
|
57
|
|
|
} |
58
|
|
|
} |
59
|
|
|
|