diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 865924c7274..cd4b66a23a1 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -471,7 +471,7 @@ class Societe extends CommonObject if ($result >= 0) { - $entity = (isset($this->entity) && is_numeric($this->entity)?$this->entity:$conf->entity); + $entity = ((isset($this->entity) && is_numeric($this->entity))?$this->entity:$conf->entity); $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe (nom, name_alias, entity, datec, fk_user_creat, canvas, status, ref_int, ref_ext, fk_stcomm, fk_incoterms, location_incoterms ,import_key, fk_multicurrency, multicurrency_code)"; $sql.= " VALUES ('".$this->db->escape($this->name)."', '".$this->db->escape($this->name_alias)."', ".$entity.", '".$this->db->idate($now)."'";