Skip to content

Commit

Permalink
Add GROUP BY to be SQL standart compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Jun 7, 2016
1 parent 616ede1 commit 2f89159
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions htdocs/core/boxes/box_factures_imp.php
Expand Up @@ -87,6 +87,8 @@ function loadBox($max=5)
$sql.= " AND fk_statut = 1";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
$sql.= " GROUP BY s.nom, s.rowid, s.code_client, s.logo, f.facnumber, f.date_lim_reglement,";
$sql.= " f.type, f.amount, f.datef, f.total, f.tva, f.total_ttc, f.paye, f.fk_statut, f.rowid";
//$sql.= " ORDER BY f.datef DESC, f.facnumber DESC ";
$sql.= " ORDER BY datelimite ASC, f.facnumber ASC ";
$sql.= $db->plimit($max, 0);
Expand Down

0 comments on commit 2f89159

Please sign in to comment.