36require_once DOL_DOCUMENT_ROOT.
"/product/class/html.formproduct.class.php";
54 print
"Error, template page can't be called as URL";
59@phan-var-force CommonObject $this
60@phan-var-force CommonObject $object
62@phan-var-force bool $var
63@phan-var-force BOMLine $line
64@phan-var-force Societe $buyer
65@phan-var-force Societe $seller
68global $forceall, $filtertype;
70if (empty($forceall)) {
74if (empty($filtertype)) {
85$objectline =
new BOMLine($this->db);
87print
"<!-- BEGIN PHP TEMPLATE bom/tpl/objectline_edit.tpl.php -->\n";
90print
'<tr class="oddeven tredited">';
93 print
'<td class="linecolnum center">'.($i + 1).
'</td>';
100 <div
id=
"line_<?php echo $line->id; ?>"></div>
102 <input
type=
"hidden" name=
"lineid" value=
"<?php echo $line->id; ?>">
103 <input
type=
"hidden" id=
"product_type" name=
"type" value=
"<?php echo $line->product_type; ?>">
104 <input
type=
"hidden" id=
"product_id" name=
"productid" value=
"<?php echo(!empty($line->fk_product) ? $line->fk_product : 0); ?>" />
105 <input
type=
"hidden" id=
"special_code" name=
"special_code" value=
"<?php echo $line->special_code; ?>">
109if ($line->fk_product > 0) {
111 $tmpproduct->fetch($line->fk_product);
112 print $tmpproduct->getNomUrl(1);
115if (is_object($hookmanager)) {
116 $parameters = array(
'line' => $line,
'var' => $var,
'seller' => $seller,
'buyer' => $buyer);
117 $reshook = $hookmanager->executeHooks(
'formEditProductOptions', $parameters, $this, $action);
121if (is_object($objectline) && !empty($extrafields)) {
122 $temps = $line->showOptionals($extrafields,
'edit', array(
'class' =>
'tredited'),
'',
'',
'1',
'line');
123 if (!empty($temps)) {
124 print
'<div style="padding-top: 10px" id="extrafield_lines_area_edit" name="extrafield_lines_area_edit">';
142print
'<td class="nobottom linecolqty right">';
143if (((
int) $line->info_bits & 2) != 2) {
148 print
'<input size="3" type="text" class="flat right" name="qty" id="qty" value="'.$line->qty.
'">';
152if ($filtertype != 1) {
155 print
'<td class="nobottom nowrap linecolunit">';
156 print $formproduct->selectMeasuringUnits(
"fk_unit",
'', (($line->fk_unit) ? $line->fk_unit :
''), 0, 0);
161 print
'<td class="nobottom nowrap linecolunit">';
162 print $formproduct->selectMeasuringUnits(
"fk_unit",
"time", ($line->fk_unit) ? $line->fk_unit :
'', 0, 0);
168 print
'<td class="nobottom linecolqtyfrozen right"><input type="checkbox" name="qty_frozen" id="qty_frozen" class="flat right" value="1"' . (GETPOSTISSET(
"qty_frozen") ? (
GETPOSTINT(
'qty_frozen') ?
' checked="checked"' :
'') : ($line->qty_frozen ?
' checked="checked"' :
'')) .
'>';
173 print
'<td class="nobottom linecoldisablestockchange right"><input type="checkbox" name="disable_stock_change" id="disable_stock_change" class="flat right" value="1"' . (GETPOSTISSET(
'disablestockchange') ? (
GETPOSTINT(
"disable_stock_change") ?
' checked="checked"' :
'') : ($line->disable_stock_change ?
' checked="checked"' :
'')) .
'">';
178 print
'<td class="nobottom nowrap linecollost right">';
179 print
'<input type="text" size="2" name="efficiency" id="efficiency" class="flat right" value="' . $line->efficiency .
'"></td>';
185 print
'<td class="nobottom nowrap linecolworkstation">';
186 print $formproduct->selectWorkstations($line->fk_default_workstation,
'idworkstations', 1);
191print
'<td class="nobottom nowrap linecolcostprice right">';
194$coldisplay += $colspan;
195print
'<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.
'">';
196$coldisplay += $colspan;
197print
'<input type="submit" class="reposition button buttongen margintoponly marginbottomonly button-save" id="savelinebutton" name="save" value="'.$langs->trans(
"Save").
'">';
198print
'<input type="submit" class="reposition button buttongen margintoponly marginbottomonly button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
202print
"<!-- END PHP TEMPLATE objectline_edit.tpl.php -->\n";
if(! $sortfield) if(! $sortorder) $object
Class to manage products or services.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
if(preg_match('/(crypted|dolcrypt):/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',...
$conf db name
Only used if Module[ID]Name translation string is not found.