dolibarr 20.0.0
originproductline.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 *
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 */
19
20// Protection to avoid direct call of template
21if (empty($conf) || !is_object($conf)) {
22 print "Error, template page can't be called as URL";
23 exit(1);
24}
25
26?>
27
28<!-- BEGIN PHP TEMPLATE originproductline.tpl.php -->
29<?php
30'@phan-var-force CommonObject $this';
31print '<tr data-id="'.$this->tpl['id'].'" class="oddeven'.(empty($this->tpl['strike']) ? '' : ' strikefordisabled').'">';
32print '<td class="linecolref">'.$this->tpl['label'].'</td>';
33print '<td class="linecoldescription">'.$this->tpl['description'].'</td>';
34print '<td class="linecolvat right">'.$this->tpl['vat_rate'].'</td>';
35print '<td class="linecoluht right">'.$this->tpl['price'].'</td>';
36if (isModEnabled("multicurrency")) {
37 print '<td class="linecoluht_currency right">'.$this->tpl['multicurrency_price'].'</td>';
38}
39
40print '<td class="linecolqty right">'.$this->tpl['qty'].'</td>';
41if (getDolGlobalString('PRODUCT_USE_UNITS')) {
42 print '<td class="linecoluseunit left">'.$langs->trans($this->tpl['unit']).'</td>';
43}
44
45print '<td class="linecoldiscount right">'.$this->tpl['remise_percent'].'</td>';
46print '<td class="linecolht right">'.$this->tpl['total_ht'].'</td>';
47
48$selected = 1;
49if (!empty($selectedLines) && !in_array($this->tpl['id'], $selectedLines)) {
50 $selected = 0;
51}
52print '<td class="center">';
53print '<input id="cb'.$this->tpl['id'].'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$this->tpl['id'].'"'.($selected ? ' checked="checked"' : '').'>';
54print '</td>';
55print '</tr>'."\n";
56?>
57<!-- END PHP TEMPLATE originproductline.tpl.php -->
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.