34require_once DOL_DOCUMENT_ROOT.
"/product/class/html.formproduct.class.php";
39 print
"Error, template page can't be called as URL";
43'@phan-var-force CommonObject $this
44 @phan-var-force CommonObject $object';
46global $forceall, $filtertype;
48if (empty($forceall)) {
52if (empty($filtertype)) {
63$objectline =
new BOMLine($this->db);
65print
"<!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php -->\n";
68print
'<tr class="oddeven tredited">';
71 print
'<td class="linecolnum center">'.($i + 1).
'</td>';
78 <div
id=
"line_<?php echo $line->id; ?>"></div>
80 <input
type=
"hidden" name=
"lineid" value=
"<?php echo $line->id; ?>">
81 <input
type=
"hidden" id=
"product_type" name=
"type" value=
"<?php echo $line->product_type; ?>">
82 <input
type=
"hidden" id=
"product_id" name=
"productid" value=
"<?php echo(!empty($line->fk_product) ? $line->fk_product : 0); ?>" />
83 <input
type=
"hidden" id=
"special_code" name=
"special_code" value=
"<?php echo $line->special_code; ?>">
84 <input
type=
"hidden" id=
"fk_parent_line" name=
"fk_parent_line" value=
"<?php echo $line->fk_parent_line; ?>">
88if ($line->fk_product > 0) {
90 $tmpproduct->fetch($line->fk_product);
91 print $tmpproduct->getNomUrl(1);
94if (is_object($hookmanager)) {
95 $fk_parent_line = (
GETPOST(
'fk_parent_line') ?
GETPOST(
'fk_parent_line') : $line->fk_parent_line);
96 $parameters = array(
'line'=>$line,
'fk_parent_line'=>$fk_parent_line,
'var'=>$var,
'dateSelector'=>$dateSelector,
'seller'=>$seller,
'buyer'=>$buyer);
97 $reshook = $hookmanager->executeHooks(
'formEditProductOptions', $parameters, $this, $action);
101if (is_object($objectline) && !empty($extrafields)) {
102 $temps = $line->showOptionals($extrafields,
'edit', array(
'class'=>
'tredited'),
'',
'', 1,
'line');
103 if (!empty($temps)) {
104 print
'<div style="padding-top: 10px" id="extrafield_lines_area_edit" name="extrafield_lines_area_edit">';
122print
'<td class="nobottom linecolqty right">';
123if (($line->info_bits & 2) != 2) {
128 print
'<input size="3" type="text" class="flat right" name="qty" id="qty" value="'.$line->qty.
'">';
132if ($filtertype != 1) {
135 print
'<td class="nobottom nowrap linecolunit">';
136 print $formproduct->selectMeasuringUnits(
"fk_unit",
'', (($line->fk_unit) ? $line->fk_unit :
''), 0, 0);
141 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"' :
'')) .
'>';
145 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"' :
'')) .
'">';
149 print
'<td class="nobottom nowrap linecollost right">';
150 print
'<input type="text" size="2" name="efficiency" id="efficiency" class="flat right" value="' . $line->efficiency .
'"></td>';
153 print
'<td class="nobottom nowrap linecolcostprice right">';
157 print
'<td class="nobottom nowrap linecolunit">';
158 print $formproduct->selectMeasuringUnits(
"fk_unit",
"time", ($line->fk_unit) ? $line->fk_unit :
'', 0, 0);
162 print
'<td class="nobottom nowrap linecolworkstation">';
163 print $formproduct->selectWorkstations($line->fk_default_workstation,
'idworkstations', 1);
167 print
'<td class="nobottom nowrap linecolcostprice right">';
171$coldisplay += $colspan;
172print
'<td class="nobottom linecoledit center valignmiddle" colspan="'.$colspan.
'">';
173$coldisplay += $colspan;
174print
'<input type="submit" class="reposition button buttongen margintoponly marginbottomonly button-save" id="savelinebutton" name="save" value="'.$langs->trans(
"Save").
'">';
175print
'<input type="submit" class="reposition button buttongen margintoponly marginbottomonly button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
179print
"<!-- 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 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.