Fix: Tri sur ref en cas d'galit sur autres criteres

This commit is contained in:
Laurent Destailleur 2005-11-12 21:10:01 +00:00
parent da000f405d
commit d5f0b976a1
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ if ($user->rights->facture->lire)
$sql.= " ORDER BY ";
$listfield=split(',',$sortfield);
foreach ($listfield as $key => $value) $sql.=$listfield[$key]." ".$sortorder.",";
$sql.= " f.fk_soc ASC";
$sql.= " f.facnumber DESC";
//$sql .= $db->plimit($limit+1,$offset);

View File

@ -340,7 +340,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
$sql.= " WHERE s.idp = f.fk_soc AND f.paye = 0 AND f.fk_statut = 1";
if ($socidp) $sql .= " AND f.fk_soc = $socidp";
$sql.= " GROUP BY f.facnumber, f.rowid, s.nom, s.idp, f.total, f.total_ttc";
$sql.= " ORDER BY f.datef ASC ";
$sql.= " ORDER BY f.datef ASC, f.facnumber ASC";
$resql = $db->query($sql);
if ($resql)