34 require_once DOL_DOCUMENT_ROOT.
"/product/class/html.formproduct.class.php";
38 if (empty($object) || !is_object($object)) {
39 print
"Error, template page can't be called as URL";
44 global $forceall, $filtertype;
46 if (empty($forceall)) {
50 if (empty($filtertype)) $filtertype = 0;
59 $objectline =
new BOMLine($this->db);
61 print
"<!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php -->\n";
64 print
'<tr class="oddeven tredited">';
66 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
67 print
'<td class="linecolnum center">'.($i + 1).
'</td>';
74 <div
id=
"line_<?php echo $line->id; ?>"></div>
76 <input
type=
"hidden" name=
"lineid" value=
"<?php echo $line->id; ?>">
77 <input
type=
"hidden" id=
"product_type" name=
"type" value=
"<?php echo $line->product_type; ?>">
78 <input
type=
"hidden" id=
"product_id" name=
"productid" value=
"<?php echo (!empty($line->fk_product) ? $line->fk_product : 0); ?>" />
79 <input
type=
"hidden" id=
"special_code" name=
"special_code" value=
"<?php echo $line->special_code; ?>">
80 <input
type=
"hidden" id=
"fk_parent_line" name=
"fk_parent_line" value=
"<?php echo $line->fk_parent_line; ?>">
84 if ($line->fk_product > 0) {
85 $tmpproduct =
new Product($object->db);
86 $tmpproduct->fetch($line->fk_product);
87 print $tmpproduct->getNomUrl(1);
90 if (is_object($hookmanager)) {
91 $fk_parent_line = (
GETPOST(
'fk_parent_line') ?
GETPOST(
'fk_parent_line') : $line->fk_parent_line);
92 $parameters = array(
'line'=>$line,
'fk_parent_line'=>$fk_parent_line,
'var'=>$var,
'dateSelector'=>$dateSelector,
'seller'=>$seller,
'buyer'=>$buyer);
93 $reshook = $hookmanager->executeHooks(
'formEditProductOptions', $parameters, $this, $action);
97 if (is_object($objectline) && !empty($extrafields)) {
98 $temps = $line->showOptionals($extrafields,
'edit', array(
'class'=>
'tredited'),
'',
'', 1,
'line');
100 print
'<div style="padding-top: 10px" id="extrafield_lines_area_edit" name="extrafield_lines_area_edit">';
118 print
'<td class="nobottom linecolqty right">';
119 if (($line->info_bits & 2) != 2) {
124 print
'<input size="3" type="text" class="flat right" name="qty" id="qty" value="'.$line->qty.
'">';
128 if ($filtertype != 1) {
131 print
'<td class="nobottom linecoluseunit left">';
136 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"' :
'')) .
'>';
140 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"' :
'')) .
'">';
144 print
'<td class="nobottom nowrap linecollost right">';
145 print
'<input type="text" size="2" name="efficiency" id="efficiency" class="flat right" value="' . $line->efficiency .
'"></td>';
148 print
'<td class="nobottom nowrap linecolcostprice right">';
152 print
'<td class="nobottom nowrap linecolunit right">';
153 print $formproduct->selectMeasuringUnits(
"fk_unit",
"time", ($line->fk_unit) ? $line->fk_unit :
'', 0, 0);
157 print
'<td class="nobottom nowrap linecolworkstation right">';
161 print
'<td class="nobottom nowrap linecolcostprice right">';
165 $coldisplay += $colspan;
166 print
'<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.
'">';
167 $coldisplay += $colspan;
168 print
'<input type="submit" class="reposition button buttongen margintoponly marginbottomonly button-save" id="savelinebutton" name="save" value="'.$langs->trans(
"Save").
'">';
169 print
'<input type="submit" class="reposition button buttongen margintoponly marginbottomonly button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
173 print
"<!-- END PHP TEMPLATE objectline_edit.tpl.php -->\n";