34require_once DOL_DOCUMENT_ROOT.
"/product/class/html.formproduct.class.php";
38if (empty($object) || !is_object($object)) {
39 print
"Error, template page can't be called as URL";
44global $forceall, $filtertype;
46if (empty($forceall)) {
50if (empty($filtertype)) {
61$objectline =
new BOMLine($this->db);
63print
"<!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php -->\n";
66print
'<tr class="oddeven tredited">';
69 print
'<td class="linecolnum center">'.($i + 1).
'</td>';
76 <div
id=
"line_<?php echo $line->id; ?>"></div>
78 <input
type=
"hidden" name=
"lineid" value=
"<?php echo $line->id; ?>">
79 <input
type=
"hidden" id=
"product_type" name=
"type" value=
"<?php echo $line->product_type; ?>">
80 <input
type=
"hidden" id=
"product_id" name=
"productid" value=
"<?php echo(!empty($line->fk_product) ? $line->fk_product : 0); ?>" />
81 <input
type=
"hidden" id=
"special_code" name=
"special_code" value=
"<?php echo $line->special_code; ?>">
82 <input
type=
"hidden" id=
"fk_parent_line" name=
"fk_parent_line" value=
"<?php echo $line->fk_parent_line; ?>">
86if ($line->fk_product > 0) {
87 $tmpproduct =
new Product($object->db);
88 $tmpproduct->fetch($line->fk_product);
89 print $tmpproduct->getNomUrl(1);
92if (is_object($hookmanager)) {
93 $fk_parent_line = (
GETPOST(
'fk_parent_line') ?
GETPOST(
'fk_parent_line') : $line->fk_parent_line);
94 $parameters = array(
'line'=>$line,
'fk_parent_line'=>$fk_parent_line,
'var'=>$var,
'dateSelector'=>$dateSelector,
'seller'=>$seller,
'buyer'=>$buyer);
95 $reshook = $hookmanager->executeHooks(
'formEditProductOptions', $parameters, $this, $action);
99if (is_object($objectline) && !empty($extrafields)) {
100 $temps = $line->showOptionals($extrafields,
'edit', array(
'class'=>
'tredited'),
'',
'', 1,
'line');
101 if (!empty($temps)) {
102 print
'<div style="padding-top: 10px" id="extrafield_lines_area_edit" name="extrafield_lines_area_edit">';
120print
'<td class="nobottom linecolqty right">';
121if (($line->info_bits & 2) != 2) {
126 print
'<input size="3" type="text" class="flat right" name="qty" id="qty" value="'.$line->qty.
'">';
130if ($filtertype != 1) {
133 print
'<td class="nobottom nowrap linecolunit right">';
134 print $formproduct->selectMeasuringUnits(
"fk_unit",
'', (($line->fk_unit) ? $line->fk_unit :
''), 0, 0);
139 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"' :
'')) .
'>';
143 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"' :
'')) .
'">';
147 print
'<td class="nobottom nowrap linecollost right">';
148 print
'<input type="text" size="2" name="efficiency" id="efficiency" class="flat right" value="' . $line->efficiency .
'"></td>';
151 print
'<td class="nobottom nowrap linecolcostprice right">';
155 print
'<td class="nobottom nowrap linecolunit right">';
156 print $formproduct->selectMeasuringUnits(
"fk_unit",
"time", ($line->fk_unit) ? $line->fk_unit :
'', 0, 0);
160 print
'<td class="nobottom nowrap linecolworkstation right">';
161 print $formproduct->selectWorkstations($line->fk_default_workstation,
'idworkstations', 1);
165 print
'<td class="nobottom nowrap linecolcostprice right">';
169$coldisplay += $colspan;
170print
'<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.
'">';
171$coldisplay += $colspan;
172print
'<input type="submit" class="reposition button buttongen margintoponly marginbottomonly button-save" id="savelinebutton" name="save" value="'.$langs->trans(
"Save").
'">';
173print
'<input type="submit" class="reposition button buttongen margintoponly marginbottomonly button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
177print
"<!-- END PHP TEMPLATE objectline_edit.tpl.php -->\n";
Class to manage products or services.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
$conf db name
Only used if Module[ID]Name translation string is not found.