Skip to content
Snippets Groups Projects
Commit 208bf254 authored by fmarcet's avatar fmarcet
Browse files

Fix: Bug when idprof is mandatory on thrid creation and we use

multicompany
parent 041fa8d3
No related branches found
No related tags found
No related merge requests found
...@@ -2348,7 +2348,7 @@ class Societe extends CommonObject ...@@ -2348,7 +2348,7 @@ class Societe extends CommonObject
} }
//Verify duplicate entries //Verify duplicate entries
$sql = "SELECT COUNT(*) as idprof FROM ".MAIN_DB_PREFIX."societe WHERE ".$field." = '".$value."'"; $sql = "SELECT COUNT(*) as idprof FROM ".MAIN_DB_PREFIX."societe WHERE ".$field." = '".$value."' AND entity IN (".getEntity('societe',1).")";
if($socid) $sql .= " AND rowid <> ".$socid; if($socid) $sql .= " AND rowid <> ".$socid;
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) if ($resql)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment