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