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

Fix hidden option EXPENSEREPORT_LINES_SORTED_BY_ROWID to restore

compatibility.
parent 9ffcd9e9
No related branches found
No related tags found
No related merge requests found
......@@ -1871,7 +1871,7 @@ else
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'bank_account as ba ON b.fk_account = ba.rowid';
$sql.= " WHERE e.rowid = '".$id."'";
$sql.= " AND p.fk_expensereport = e.rowid";
$sql.= " AND e.entity = ".$conf->entity;
$sql.= ' AND e.entity IN ('.getEntity('expensereport').')';
$sql.= " AND p.fk_typepayment = c.id";
$sql.= " ORDER BY dp";
......@@ -1955,7 +1955,14 @@ else
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON fde.fk_c_type_fees=ctf.id';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pjt ON fde.fk_projet=pjt.rowid';
$sql.= ' WHERE fde.fk_expensereport = '.$object->id;
$sql.= ' ORDER BY fde.date ASC';
if (! empty($conf->global->EXPENSEREPORT_LINES_SORTED_BY_ROWID))
{
$sql.= ' ORDER BY fde.rang ASC, fde.rowid ASC';
}
else
{
$sql.= ' ORDER BY fde.rang ASC, fde.date ASC';
}
print '<div style="clear: both;"></div>';
......
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