35 if (empty($object) || !is_object($object)) {
36 print
"Error, template page can't be called as URL";
43 if (empty($forceall)) {
54 print
"<!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php -->\n";
57 print
'<tr class="oddeven tredited">';
59 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
60 print
'<td class="linecolnum center">'.($i + 1).
'</td>';
67 <div
id=
"line_<?php echo $line->id; ?>"></div>
69 <input
type=
"hidden" name=
"lineid" value=
"<?php echo $line->id; ?>">
70 <input
type=
"hidden" id=
"product_type" name=
"type" value=
"<?php echo $line->product_type; ?>">
71 <input
type=
"hidden" id=
"product_id" name=
"productid" value=
"<?php echo (!empty($line->fk_product) ? $line->fk_product : 0); ?>" />
72 <input
type=
"hidden" id=
"special_code" name=
"special_code" value=
"<?php echo $line->special_code; ?>">
73 <input
type=
"hidden" id=
"fk_parent_line" name=
"fk_parent_line" value=
"<?php echo $line->fk_parent_line; ?>">
77 if ($line->fk_product > 0) {
78 $tmpproduct =
new Product($object->db);
79 $tmpproduct->fetch($line->fk_product);
80 print $tmpproduct->getNomUrl(1);
83 if (is_object($hookmanager)) {
84 $fk_parent_line = (
GETPOST(
'fk_parent_line') ?
GETPOST(
'fk_parent_line') : $line->fk_parent_line);
85 $parameters = array(
'line'=>$line,
'fk_parent_line'=>$fk_parent_line,
'var'=>$var,
'dateSelector'=>$dateSelector,
'seller'=>$seller,
'buyer'=>$buyer);
86 $reshook = $hookmanager->executeHooks(
'formEditProductOptions', $parameters, $this, $action);
101 print
'<td class="nobottom linecolqty right">';
102 if (($line->info_bits & 2) != 2) {
107 print
'<input size="3" type="text" class="flat right" name="qty" id="qty" value="'.$line->qty.
'">';
111 if (!empty($conf->global->PRODUCT_USE_UNITS)) {
113 print
'<td class="nobottom linecoluseunit left">';
118 print
'<td class="nobottom linecolqtyfrozen right"><input type="checkbox" name="qty_frozen" id="qty_frozen" class="flat right" value="1"'.(GETPOSTISSET(
"qty_frozen") ? (
GETPOST(
'qty_frozen',
'int') ?
' checked="checked"' :
'') : ($line->qty_frozen ?
' checked="checked"' :
'')).
'>';
122 print
'<td class="nobottom linecoldisablestockchange right"><input type="checkbox" name="disable_stock_change" id="disable_stock_change" class="flat right" value="1"'.(GETPOSTISSET(
'disablestockchange') ? (
GETPOST(
"disable_stock_change",
'int') ?
' checked="checked"' :
'') : ($line->disable_stock_change ?
' checked="checked"' :
'')).
'">';
126 print
'<td class="nobottom nowrap linecollost right">';
127 print
'<input type="text" size="2" name="efficiency" id="efficiency" class="flat right" value="'.$line->efficiency.
'"></td>';
130 print
'<td class="nobottom nowrap linecolcostprice right">';
133 $coldisplay += $colspan;
134 print
'<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.
'">';
135 $coldisplay += $colspan;
136 print
'<input type="submit" class="button buttongen margintoponly marginbottomonly button-save" id="savelinebutton" name="save" value="'.$langs->trans(
"Save").
'">';
137 print
'<input type="submit" class="button buttongen margintoponly marginbottomonly button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
141 if (is_object($objectline)) {
142 print $objectline->showOptionals($extrafields,
'edit', array(
'style'=>$bcnd[$var],
'colspan'=>$coldisplay),
'',
'', 1,
'line');
145 print
"<!-- END PHP TEMPLATE objectline_edit.tpl.php -->\n";