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