2
0
forked from Wavyzz/dolibarr

Debug v22

This commit is contained in:
ldestailleur
2025-04-12 16:18:40 +02:00
parent ec7ecd9f08
commit 4d80dc9d69

View File

@@ -1256,7 +1256,7 @@ abstract class CommonObject
return -2;
}
if ($this->restrictiononfksoc && property_exists('socid', $this) && !empty($this->socid) && !$user->hasRight('societe', 'client', 'voir')) {
if ($this->restrictiononfksoc && property_exists($this, 'socid') && !empty($this->socid) && !$user->hasRight('societe', 'client', 'voir')) {
$sql_allowed_contacts = 'SELECT COUNT(*) as cnt FROM '.$this->db->prefix().'societe_commerciaux as sc';
$sql_allowed_contacts.= ' WHERE sc.fk_soc = '.(int) $this->socid;
$sql_allowed_contacts.= ' AND sc.fk_user = '.(int) $user->id;