Skip to content
Snippets Groups Projects
Commit b0977e3e authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #5122 from fmarcet/3.8

FIX: Not filtering correctly when come from dashboard
parents 59a30cd2 d599261d
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,7 @@ $year = GETPOST("year","int");
$day_lim = GETPOST('day_lim','int');
$month_lim = GETPOST('month_lim','int');
$year_lim = GETPOST('year_lim','int');
$filter = GETPOST("filtre");
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test must be present to be compatible with all browsers
{
......@@ -210,6 +211,15 @@ if ($search_status != '')
{
$sql.= " AND fac.fk_statut = ".$search_status;
}
if ($filter && $filter != -1)
{
$aFilter = explode(',', $filter);
foreach ($aFilter as $fil)
{
$filt = explode(':', $fil);
$sql .= ' AND ' . trim($filt[0]) . ' = ' . trim($filt[1]);
}
}
$nbtotalofrecords = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment