36require_once DOL_DOCUMENT_ROOT.
"/product/class/html.formproduct.class.php";
41 print
"Error, template page can't be called as URL";
46@phan-var-force CommonObject $this
47@phan-var-force CommonObject $object
49@phan-var-force bool $var
50@phan-var-force BOMLine $line
51@phan-var-force Societe $buyer
52@phan-var-force Societe $seller
55global $forceall, $filtertype;
57if (empty($forceall)) {
61if (empty($filtertype)) {
72$objectline =
new BOMLine($this->db);
74print
"<!-- BEGIN PHP TEMPLATE bom/tpl/objectline_edit.tpl.php -->\n";
77print
'<tr class="oddeven tredited">';
80 print
'<td class="linecolnum center">'.($i + 1).
'</td>';
87 <div
id=
"line_<?php echo $line->id; ?>"></div>
89 <input
type=
"hidden" name=
"lineid" value=
"<?php echo $line->id; ?>">
90 <input
type=
"hidden" id=
"product_type" name=
"type" value=
"<?php echo $line->product_type; ?>">
91 <input
type=
"hidden" id=
"product_id" name=
"productid" value=
"<?php echo(!empty($line->fk_product) ? $line->fk_product : 0); ?>" />
92 <input
type=
"hidden" id=
"special_code" name=
"special_code" value=
"<?php echo $line->special_code; ?>">
93 <input
type=
"hidden" id=
"fk_parent_line" name=
"fk_parent_line" value=
"<?php echo $line->fk_parent_line; ?>">
97if ($line->fk_product > 0) {
99 $tmpproduct->fetch($line->fk_product);
100 print $tmpproduct->getNomUrl(1);
103if (is_object($hookmanager)) {
104 $fk_parent_line = (
GETPOST(
'fk_parent_line') ?
GETPOST(
'fk_parent_line') : $line->fk_parent_line);
105 $parameters = array(
'line' => $line,
'fk_parent_line' => $fk_parent_line,
'var' => $var,
'dateSelector' => $dateSelector,
'seller' => $seller,
'buyer' => $buyer);
106 $reshook = $hookmanager->executeHooks(
'formEditProductOptions', $parameters, $this, $action);
110if (is_object($objectline) && !empty($extrafields)) {
111 $temps = $line->showOptionals($extrafields,
'edit', array(
'class' =>
'tredited'),
'',
'', 1,
'line');
112 if (!empty($temps)) {
113 print
'<div style="padding-top: 10px" id="extrafield_lines_area_edit" name="extrafield_lines_area_edit">';
131print
'<td class="nobottom linecolqty right">';
132if (($line->info_bits & 2) != 2) {
137 print
'<input size="3" type="text" class="flat right" name="qty" id="qty" value="'.$line->qty.
'">';
141if ($filtertype != 1) {
144 print
'<td class="nobottom nowrap linecolunit">';
145 print $formproduct->selectMeasuringUnits(
"fk_unit",
'', (($line->fk_unit) ? $line->fk_unit :
''), 0, 0);
150 print
'<td class="nobottom nowrap linecolunit">';
151 print $formproduct->selectMeasuringUnits(
"fk_unit",
"time", ($line->fk_unit) ? $line->fk_unit :
'', 0, 0);
157 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"' :
'')) .
'>';
162 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"' :
'')) .
'">';
167 print
'<td class="nobottom nowrap linecollost right">';
168 print
'<input type="text" size="2" name="efficiency" id="efficiency" class="flat right" value="' . $line->efficiency .
'"></td>';
172if ($filtertype == 1 && isModEnabled(
'workstation')) {
174 print
'<td class="nobottom nowrap linecolworkstation">';
175 print $formproduct->selectWorkstations($line->fk_default_workstation,
'idworkstations', 1);
180print
'<td class="nobottom nowrap linecolcostprice right">';
183$coldisplay += $colspan;
184print
'<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.
'">';
185$coldisplay += $colspan;
186print
'<input type="submit" class="reposition button buttongen margintoponly marginbottomonly button-save" id="savelinebutton" name="save" value="'.$langs->trans(
"Save").
'">';
187print
'<input type="submit" class="reposition button buttongen margintoponly marginbottomonly button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
191print
"<!-- 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.