diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index 718dea6f6d6..919e47771a6 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -160,7 +160,7 @@ if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPr if ($agentid > 0) $sql.= " GROUP BY s.rowid"; else - $sql.= " GROUP BY u.rowid, s.nom, s.rowid, s.code_client, s.client, u.login, u.lastname, u.firstname, f.type "; + $sql.= " GROUP BY u.rowid"; $sql.= " ORDER BY $sortfield $sortorder "; // TODO: calculate total to display then restore pagination //$sql.= $db->plimit($conf->liste_limit +1, $offset); diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index e92192c0d71..f44a6887453 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -178,7 +178,7 @@ if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPr if ($client) $sql.= " GROUP BY f.rowid"; else - $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.rowid "; + $sql.= " GROUP BY s.rowid"; $sql.= " ORDER BY $sortfield $sortorder "; // TODO: calculate total to display then restore pagination //$sql.= $db->plimit($conf->liste_limit +1, $offset); @@ -293,7 +293,7 @@ $db->close();