Skip to content

Commit

Permalink
Fix missing column
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 26, 2020
1 parent 39d6c31 commit 2515764
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions htdocs/product/stock/list.php
Expand Up @@ -443,10 +443,6 @@
{
print_liste_field_titre($arrayfields['sellvalue']['label'], $_SERVER["PHP_SELF"], "sellvalue", '', $param, '', $sortfield, $sortorder, 'right ');
}
if (!empty($arrayfields['e.statut']['checked']))
{
print_liste_field_titre($arrayfields['e.statut']['label'], $_SERVER["PHP_SELF"], "e.statut", '', $param, '', $sortfield, $sortorder, 'right ');
}

// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
Expand All @@ -456,6 +452,11 @@
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

if (!empty($arrayfields['e.statut']['checked']))
{
print_liste_field_titre($arrayfields['e.statut']['label'], $_SERVER["PHP_SELF"], "e.statut", '', $param, '', $sortfield, $sortorder, 'right ');
}

// Action column
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
print '</tr>'."\n";
Expand Down Expand Up @@ -651,6 +652,20 @@
print '</td>';
}

if (empty($extrafieldsobjectkey) && is_object($object)) $extrafieldsobjectkey = $object->table_element;
if (is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label']))
{
if (empty($extrafieldsobjectprefix)) $extrafieldsobjectprefix = 'ef.';

foreach ($extrafields->attributes[$extrafieldsobjectkey]['label'] as $key => $val)
{
if (!empty($arrayfields[$extrafieldsobjectprefix.$key]['checked']))
{
print '<td></td>';
}
}
}

if (!empty($arrayfields['e.statut']['checked']))
{
print '<td></td>';
Expand Down

0 comments on commit 2515764

Please sign in to comment.