Update index.php

This commit is contained in:
Laurent Destailleur 2021-07-14 13:57:17 +02:00 committed by GitHub
parent 7406f2cc85
commit 0fd980b005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -512,10 +512,10 @@ if (!empty($conf->ficheinter->enabled)) {
$sql .= " AND f.fk_soc = s.rowid";
$sql .= " AND f.fk_statut = 0";
if ($socid) {
$sql .= " AND f.fk_soc = ".$socid;
$sql .= " AND f.fk_soc = ".((int) $socid);
}
if (!$user->rights->societe->client->voir && !$socid) {
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
}
$resql = $db->query($sql);