dolibarr 18.0.6
modules_commandefournisseur.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
5 * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
6 * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
7 * Copyright (C) 2011-2016 Philippe Grand <philippe.grand@atoo-net.com>
8 * Copyright (C) 2014 Marcos GarcĂ­a <marcosgdf@gmail.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 * or see https://www.gnu.org/
23 */
24
31require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
32require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
33
34
39{
40 public $posxpicture;
41 public $posxtva;
42 public $posxup;
43 public $posxqty;
44 public $posxunit;
45 public $posxdesc;
46 public $posxdiscount;
47 public $postotalht;
48
49 public $tva;
50 public $tva_array;
51 public $localtax1;
52 public $localtax2;
53
54 public $atleastoneratenotnull = 0;
55 public $atleastonediscount = 0;
56
60 public $error = '';
61
62
63 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
71 public static function liste_modeles($db, $maxfilenamelength = 0)
72 {
73 // phpcs:enable
74 $type = 'order_supplier';
75 $list = array();
76
77 include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
78 $list = getListOfModels($db, $type, $maxfilenamelength);
79
80 return $list;
81 }
82}
83
84
85
90{
94 public $error = '';
95
96 public $version;
97
98
103 public function isEnabled()
104 {
105 return true;
106 }
107
112 public function info()
113 {
114 global $langs;
115 $langs->load("orders");
116 return $langs->trans("NoDescription");
117 }
118
123 public function getExample()
124 {
125 global $langs;
126 $langs->load("orders");
127 return $langs->trans("NoExample");
128 }
129
134 public function canBeActivated()
135 {
136 return true;
137 }
138
145 public function getNextValue($objsoc = 0, $object = '')
146 {
147 global $langs;
148 return $langs->trans("NotAvailable");
149 }
150
155 public function getVersion()
156 {
157 global $langs;
158 $langs->load("admin");
159
160 if ($this->version == 'development') {
161 return $langs->trans("VersionDevelopment");
162 }
163 if ($this->version == 'experimental') {
164 return $langs->trans("VersionExperimental");
165 }
166 if ($this->version == 'dolibarr') {
167 return DOL_VERSION;
168 }
169 if ($this->version) {
170 return $this->version;
171 }
172 return $langs->trans("NotAvailable");
173 }
174}
Parent class for documents generators.
Parent Class of numbering models of suppliers orders references.
info()
Returns default description of numbering model.
isEnabled()
Return if a model can be used or not.
getExample()
Returns a numbering example.
getNextValue($objsoc=0, $object='')
Returns next value assigned.
canBeActivated()
Tests if existing numbers make problems with numbering.
getVersion()
Returns version of the numbering model.
Parent class for supplier orders 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.