Skip to content

Commit

Permalink
FIX #6507: Statistics counter show wrong total Contract numbers when …
Browse files Browse the repository at this point in the history
…the user does not have full access

Close #6507
  • Loading branch information
marcosgdf committed Mar 11, 2017
1 parent 277fa7d commit e9c7b02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion htdocs/contrat/class/contrat.class.php
Expand Up @@ -2045,7 +2045,7 @@ function load_state_board()
$sql = "SELECT count(c.rowid) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."contrat as c";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid";
if (!$user->rights->contrat->lire && !$user->societe_id)
if (!$user->rights->societe->client->voir && !$user->societe_id)
{
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
$sql.= " WHERE sc.fk_user = " .$user->id;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/contrat/list.php
Expand Up @@ -201,7 +201,7 @@
}

$sql.= $db->plimit($limit + 1, $offset);

echo $sql;
$resql=$db->query($sql);
if ($resql)
{
Expand Down

0 comments on commit e9c7b02

Please sign in to comment.