dolibarr  13.0.2
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  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <https://www.gnu.org/licenses/>.
22  *
23  * Need to have following variables defined:
24  * $object (invoice, order, ...)
25  * $conf
26  * $langs
27  * $element (used to test $user->rights->$element->creer)
28  * $permtoedit (used to replace test $user->rights->$element->creer)
29  * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
30  * $outputalsopricetotalwithtax
31  * $usemargins (0 to disable all margins columns, 1 to show according to margin setup)
32  *
33  * $type, $text, $description, $line
34  */
35 
36 // Protection to avoid direct call of template
37 if (empty($object) || !is_object($object))
38 {
39  print "Error, template page can't be called as URL";
40  exit;
41 }
42 print "<!-- BEGIN PHP TEMPLATE objectline_title.tpl.php -->\n";
43 // Title line
44 print "<thead>\n";
45 
46 print '<tr class="liste_titre nodrag nodrop">';
47 
48 // Adds a line numbering column
49 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print '<td class="linecolnum center">&nbsp;</td>';
50 
51 // Description
52 print '<td class="linecoldescription">'.$langs->trans('Description').'</td>';
53 
54 // Qty
55 print '<td class="linecolqty right">'.$form->textwithpicto($langs->trans('Qty'), $langs->trans("QtyRequiredIfNoLoss")).'</td>';
56 
57 if (!empty($conf->global->PRODUCT_USE_UNITS))
58 {
59  print '<td class="linecoluseunit left">'.$langs->trans('Unit').'</td>';
60 }
61 
62 // Qty frozen
63 print '<td class="linecolqtyfrozen right">'.$form->textwithpicto($langs->trans('QtyFrozen'), $langs->trans("QuantityConsumedInvariable")).'</td>';
64 
65 // Disable stock change
66 print '<td class="linecoldisablestockchange right">'.$form->textwithpicto($langs->trans('DisableStockChange'), $langs->trans('DisableStockChangeHelp')).'</td>';
67 
68 // Efficiency
69 print '<td class="linecolefficiency right">'.$form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')).'</td>';
70 
71 // Cost
72 print '<td class="linecolcost right">'.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCost")).'</td>';
73 
74 print '<td class="linecoledit"></td>'; // No width to allow autodim
75 
76 print '<td class="linecoldelete" style="width: 10px"></td>';
77 
78 print '<td class="linecolmove" style="width: 10px"></td>';
79 
80 if ($action == 'selectlines')
81 {
82  print '<td class="linecolcheckall center">';
83  print '<input type="checkbox" class="linecheckboxtoggle" />';
84  print '<script>$(document).ready(function() {$(".linecheckboxtoggle").click(function() {var checkBoxes = $(".linecheckbox");checkBoxes.prop("checked", this.checked);})});</script>';
85  print '</td>';
86 }
87 
88 print "</tr>\n";
89 print "</thead>\n";
90 
91 print "<!-- END PHP TEMPLATE objectline_title.tpl.php -->\n";
print
Draft customers invoices.
Definition: index.php:89