36require_once DOL_DOCUMENT_ROOT.
"/product/class/html.formproduct.class.php";
53 print
"Error, template page can't be called as URL";
58@phan-var-force CommonObject $this
59@phan-var-force CommonObject $object
61@phan-var-force bool $var
62@phan-var-force BOMLine $line
63@phan-var-force Societe $buyer
64@phan-var-force Societe $seller
67global $forceall, $filtertype;
69if (empty($forceall)) {
73if (empty($filtertype)) {
84$objectline =
new BOMLine($this->db);
86print
"<!-- BEGIN PHP TEMPLATE bom/tpl/objectline_edit.tpl.php -->\n";
89print
'<tr class="oddeven tredited">';
92 print
'<td class="linecolnum center">'.($i + 1).
'</td>';
99 <div
id=
"line_<?php echo $line->id; ?>"></div>
101 <input
type=
"hidden" name=
"lineid" value=
"<?php echo $line->id; ?>">
102 <input
type=
"hidden" id=
"product_type" name=
"type" value=
"<?php echo $line->product_type; ?>">
103 <input
type=
"hidden" id=
"product_id" name=
"productid" value=
"<?php echo(!empty($line->fk_product) ? $line->fk_product : 0); ?>" />
104 <input
type=
"hidden" id=
"special_code" name=
"special_code" value=
"<?php echo $line->special_code; ?>">
105 <input
type=
"hidden" id=
"fk_parent_line" name=
"fk_parent_line" value=
"<?php echo $line->fk_parent_line; ?>">
109if ($line->fk_product > 0) {
111 $tmpproduct->fetch($line->fk_product);
112 print $tmpproduct->getNomUrl(1);
115if (is_object($hookmanager)) {
116 $fk_parent_line = (
GETPOST(
'fk_parent_line') ?
GETPOST(
'fk_parent_line') : $line->fk_parent_line);
117 $parameters = array(
'line' => $line,
'fk_parent_line' => $fk_parent_line,
'var' => $var,
'dateSelector' => $dateSelector,
'seller' => $seller,
'buyer' => $buyer);
118 $reshook = $hookmanager->executeHooks(
'formEditProductOptions', $parameters, $this, $action);
122if (is_object($objectline) && !empty($extrafields)) {
123 $temps = $line->showOptionals($extrafields,
'edit', array(
'class' =>
'tredited'),
'',
'', 1,
'line');
124 if (!empty($temps)) {
125 print
'<div style="padding-top: 10px" id="extrafield_lines_area_edit" name="extrafield_lines_area_edit">';
143print
'<td class="nobottom linecolqty right">';
144if (($line->info_bits & 2) != 2) {
149 print
'<input size="3" type="text" class="flat right" name="qty" id="qty" value="'.$line->qty.
'">';
153if ($filtertype != 1) {
156 print
'<td class="nobottom nowrap linecolunit">';
157 print $formproduct->selectMeasuringUnits(
"fk_unit",
'', (($line->fk_unit) ? $line->fk_unit :
''), 0, 0);
162 print
'<td class="nobottom nowrap linecolunit">';
163 print $formproduct->selectMeasuringUnits(
"fk_unit",
"time", ($line->fk_unit) ? $line->fk_unit :
'', 0, 0);
169 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"' :
'')) .
'>';
174 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"' :
'')) .
'">';
179 print
'<td class="nobottom nowrap linecollost right">';
180 print
'<input type="text" size="2" name="efficiency" id="efficiency" class="flat right" value="' . $line->efficiency .
'"></td>';
184if ($filtertype == 1 && isModEnabled(
'workstation')) {
186 print
'<td class="nobottom nowrap linecolworkstation">';
187 print $formproduct->selectWorkstations($line->fk_default_workstation,
'idworkstations', 1);
192print
'<td class="nobottom nowrap linecolcostprice right">';
195$coldisplay += $colspan;
196print
'<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.
'">';
197$coldisplay += $colspan;
198print
'<input type="submit" class="reposition button buttongen margintoponly marginbottomonly button-save" id="savelinebutton" name="save" value="'.$langs->trans(
"Save").
'">';
199print
'<input type="submit" class="reposition button buttongen margintoponly marginbottomonly button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
203print
"<!-- END PHP TEMPLATE objectline_edit.tpl.php -->\n";
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $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.
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 a 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.