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