Fix dom and showOptionals call

This commit is contained in:
John Botella 2019-11-19 16:35:31 +01:00
parent 3c09bbf739
commit 8f5c8c63df

View File

@ -2443,10 +2443,10 @@ elseif ($id || $ref)
// Display lines extrafields // Display lines extrafields
if (is_array($extralabelslines) && count($extralabelslines)>0) { if (is_array($extralabelslines) && count($extralabelslines)>0) {
$colspan= empty($conf->productbatch->enabled) ? 5 : 6; $colspan= empty($conf->productbatch->enabled) ? 5 : 6;
$line = new ExpeditionLigne($db); $line = $lines[$i];
$line->fetch_optionals($lines[$i]->id); $line->fetch_optionals($line->id);
print '<tr class="oddeven">';
if ($action == 'editline' && $lines[$i]->id == $line_id) if ($action == 'editline' && $line->id == $line_id)
{ {
print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>$colspan), $indiceAsked); print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>$colspan), $indiceAsked);
} }
@ -2454,7 +2454,6 @@ elseif ($id || $ref)
{ {
print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bc[$var], 'colspan'=>$colspan), $indiceAsked); print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bc[$var], 'colspan'=>$colspan), $indiceAsked);
} }
print '</tr>';
} }
} }
} }