Fix extrafields of line for receptions

This commit is contained in:
Laurent Destailleur 2019-11-22 14:22:35 +01:00
parent f86e397d93
commit e2009ceff0
2 changed files with 3 additions and 5 deletions

View File

@ -6571,7 +6571,8 @@ abstract class CommonObject
/**
* Function to show lines of extrafields with output datas
* Function to show lines of extrafields with output datas.
* This function is responsible to output the <tr> and <td> according to correct number of columns received into $params['colspan']
*
* @param Extrafields $extrafields Extrafield Object
* @param string $mode Show output (view) or input (edit) for extrafield

View File

@ -1180,9 +1180,7 @@ if ($action == 'create')
$line->array_options = array_merge($line->array_options, $srcLine->array_options);
print '<tr class="oddeven">';
print $line->showOptionals($extrafields, 'edit', array('style'=>'class="oddeven"', 'colspan'=>$colspan), $indiceAsked);
print '</tr>';
}
$indiceAsked++;
@ -1989,7 +1987,7 @@ elseif ($id || $ref)
$colspan = empty($conf->productbatch->enabled) ? 8 : 9;
$line = new CommandeFournisseurDispatch($db);
$line->fetch_optionals($lines[$i]->id);
print '<tr class="oddeven">';
if ($action == 'editline' && $lines[$i]->id == $line_id)
{
print $line->showOptionals($extrafields, 'edit', array('colspan'=>$colspan), $indiceAsked);
@ -1998,7 +1996,6 @@ elseif ($id || $ref)
{
print $line->showOptionals($extrafields, 'view', array('colspan'=>$colspan), $indiceAsked);
}
print '</tr>';
}
}