dolibarr 25.0.0-alpha
objectline_title.tpl.php
1<?php
2/* Copyright (C) 2010-2013 Regis Houssin <regis.houssin@inodbox.com>
3 * Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
5 * Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
6 * Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
7 * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
8 * Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es>
9 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
10 * Copyright (C) 2025 Nick Fragoulis
11 * Copyright (C) 2026 Jose MARTINEZ <jose.martinez@pichinov.com>
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program. If not, see <https://www.gnu.org/licenses/>.
25 *
26 * Need to have the following variables defined:
27 * $object (invoice, order, ...)
28 * $conf
29 * $langs
30 * $element (used to test $user->hasRight($element, 'creer'))
31 * $permtoedit (used to replace test $user->hasRight($element, 'creer'))
32 * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
33 * $outputalsopricetotalwithtax
34 * $usemargins (0 to disable all margins columns, 1 to show according to margin setup)
35 *
36 * $type, $text, $description, $line
37 */
47// Protection to avoid direct call of template
48if (empty($object) || !is_object($object)) {
49 print "Error, template page can't be called as URL";
50 exit(1);
51}
52
53'@phan-var-force CommonObject $this
54 @phan-var-force CommonObject $object';
55
56global $filtertype;
57if (empty($filtertype)) {
58 $filtertype = 0;
59}
60
61print "<!-- BEGIN PHP TEMPLATE reception/tpl/objectline_title.tpl.php -->\n";
62
63
64// Title line
65print "<thead>\n";
66
67print '<tr class="liste_titre nodrag nodrop">';
68
69// Adds a line numbering column
70if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) {
71 print '<td class="linecolnum center">&nbsp;</td>';
72}
73
74// Product
75print '<th class="linecoldescription">'.$langs->trans('Description');
76
77// Qty
78print '<th class="linecolrefsupplier">'.$langs->trans('RefSupplier').'</th>';
79print '<th class="linecolcostprice right">'.$langs->trans('BuyingPrice').'</th>';
80print '<th class="linecolqty right">'.$langs->trans('Qty').'</th>';
81
82
83// Unit
84if (getDolGlobalString('PRODUCT_USE_UNITS')) {
85 print '<th class="linecoluseunit left">'.$langs->trans('Unit').'</th>';
86}
87print '<th class="linecolwarehouse right">'.$langs->trans('Warehouse').'</th>';
88if (isModEnabled('productbatch')) {
89 print '<th class="linecolbatch">'.$langs->trans('Batch').'</th>';
90}
91
92print '<td class="linecoledit" style="width: 10px"></td>'; // No width to allow autodim
93
94print '<td class="linecoldelete" style="width: 10px"></td>';
95
96print '<td class="linecolmove" style="width: 10px"></td>';
97
98if ($action == 'selectlines') {
99 print '<td class="linecolcheckall center">';
100 print '<input type="checkbox" class="linecheckboxtoggle" />';
101 print '<script>$(document).ready(function() {$(".linecheckboxtoggle").click(function() {var checkBoxes = $(".linecheckbox");checkBoxes.prop("checked", this.checked);})});</script>';
102 print '</td>';
103}
104
105print "</tr>\n";
106print "</thead>\n";
107
108print "<!-- END PHP TEMPLATE objectline_title.tpl.php -->\n";
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.