Fix hidden option EXPENSEREPORT_LINES_SORTED_BY_ROWID to restore
compatibility.
This commit is contained in:
parent
9ffcd9e922
commit
e647b5562b
@ -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>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user