Clean code

This commit is contained in:
Laurent Destailleur
2024-01-09 14:24:21 +01:00
parent 02051ebf38
commit 9d1f991759
12 changed files with 23 additions and 17 deletions

View File

@@ -2746,7 +2746,7 @@ class Commande extends CommonOrder
}
$sql .= " WHERE c.entity IN (".getEntity('commande').")";
$sql .= " AND c.fk_soc = s.rowid";
if (!$user->hasRight('societe', 'client', 'voir')) { //restriction
if (!$user->hasRight('societe', 'client', 'voir')) {
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
}
if ($socid) {