[FIX] ORDER BY before custom filters for where

When filtering data "and cac.libelle" would be appended after ORDER BY
This commit is contained in:
Cristian Torres 2019-02-20 11:45:07 -06:00 committed by Laurent Destailleur
parent 47f5ff3303
commit c781eeb17d

View File

@ -418,6 +418,6 @@ class modAgenda extends DolibarrModules
$this->export_sql_end[$r] .=' WHERE ac.entity IN ('.getEntity('agenda').')';
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' AND (sc.fk_user = '.(empty($user)?0:$user->id).' OR ac.fk_soc IS NULL)';
if (empty($user->rights->agenda->allactions->read)) $this->export_sql_end[$r] .=' AND acr.fk_element = '.(empty($user)?0:$user->id);
$this->export_sql_end[$r] .=' ORDER BY ac.datep';
$this->export_sql_order[$r] .=' ORDER BY ac.datep';
}
}