dolibarr 22.0.5
originsubtotalline.tpl.php
1<?php
2/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
3 * Copyright (C) 2017 Charlie Benke <charlie@patas-monkey.com>
4 * Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
5 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
25// Protection to avoid direct call of template
26if (empty($conf) || !is_object($conf)) {
27 print "Error, template page can't be called as URL";
28 exit(1);
29}
30?>
31
32<!-- BEGIN PHP TEMPLATE originproductline.tpl.php -->
33<?php
34
35'
36@phan-var-force CommonObject $this
37@phan-var-force CommonObjectLine|CommonInvoiceLine|CommonOrderLine|ExpeditionLigne|PropaleLigne $line
38';
39
40print '<tr data-id="'.$this->tpl['id'].'" class="'.(empty($this->tpl['strike']) ? '' : ' strikefordisabled').'" style="background:#'.$this->getSubtotalColors($line->qty).'">';
41print '<td class="linecolref">'.$this->tpl['description'].'</td>';
42print '<td class="linecoldescription"></td>';
43print '<td class="linecolvat right"></td>';
44print '<td class="linecoluht right"></td>';
45if (isModEnabled("multicurrency")) {
46 print '<td class="linecoluht_currency right"></td>';
47}
48
49print '<td class="linecolqty right"></td>';
50if (getDolGlobalString('PRODUCT_USE_UNITS')) {
51 print '<td class="linecoluseunit left"></td>';
52}
53
54print '<td class="linecoldiscount right"></td>';
55if ($this->tpl['qty'] < 0) {
56 print '<td class="linecolht right">'.$this->getSubtotalLineAmount($line).'</td>';
57} else {
58 print '<td class="linecolht right"></td>';
59}
60
61$selected = 1;
62if (!empty($selectedLines) && !in_array($this->tpl['id'], $selectedLines)) {
63 $selected = 0;
64}
65print '<td class="center">';
66print '<input id="cb'.$this->tpl['id'].'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$this->tpl['id'].'"'.($selected ? ' checked="checked"' : '').'>';
67print '</td>';
68print '</tr>'."\n";
69?>
70<!-- END PHP TEMPLATE originproductline.tpl.php -->
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79