Passed
Push — GENERAL_BUG_REVIEW_240911 ( c757bd...0ad96d )
by Rafael
45:56
created

ModelePDFCommandes   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 20
dl 0
loc 39
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A liste_modeles() 0 10 1
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-2012  Regis Houssin               <[email protected]>
7
 * Copyright (C) 2006       Andre Cianfarani            <[email protected]>
8
 * Copyright (C) 2012       Juanjo Menent	            <[email protected]>
9
 * Copyright (C) 2014       Marcos García               <[email protected]>
10
 * Copyright (C) 2024       Rafael San José             <[email protected]>
11
 *
12
 * This program is free software; you can redistribute it and/or modify
13
 * it under the terms of the GNU General Public License as published by
14
 * the Free Software Foundation; either version 3 of the License, or
15
 * (at your option) any later version.
16
 *
17
 * This program is distributed in the hope that it will be useful,
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 * GNU General Public License for more details.
21
 *
22
 * You should have received a copy of the GNU General Public License
23
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
24
 * or see https://www.gnu.org/
25
 */
26
27
namespace Dolibarr\Code\Commande\Classes;
28
29
use Dolibarr\Code\Core\Classes\CommonDocGenerator;
30
31
/**
32
 *  \file           htdocs/core/modules/commande/modules_commande.php
33
 *  \ingroup        commande
34
 *  \brief          File that contains parent class for orders models
35
 *                  and parent class for orders numbering models
36
 */
37
38
/**
39
 *  Parent class for orders models
40
 */
41
abstract class ModelePDFCommandes extends CommonDocGenerator
42
{
43
    public $posxpicture;
44
    public $posxtva;
45
    public $posxup;
46
    public $posxqty;
47
    public $posxunit;
48
    public $posxdesc;
49
    public $posxdiscount;
50
    public $postotalht;
51
52
    public $tva;
53
    public $tva_array;
54
    public $localtax1;
55
    public $localtax2;
56
57
    public $atleastoneratenotnull = 0;
58
    public $atleastonediscount = 0;
59
60
61
    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
62
63
    /**
64
     *  Return list of active generation modules
65
     *
66
     * @param DoliDB $db Database handler
0 ignored issues
show
Bug introduced by
The type Dolibarr\Code\Commande\Classes\DoliDB was not found. Did you mean DoliDB? If so, make sure to prefix the type with \.
Loading history...
67
     * @param integer $maxfilenamelength Max length of value to show
68
     * @return array                       List of templates
69
     */
70
    public static function liste_modeles($db, $maxfilenamelength = 0)
71
    {
72
        // phpcs:enable
73
        $type = 'order';
74
        $list = array();
75
76
        include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
77
        $list = getListOfModels($db, $type, $maxfilenamelength);
78
79
        return $list;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $list also could return the type integer which is incompatible with the documented return type array.
Loading history...
80
    }
81
}
82