diff --git a/htdocs/includes/modules/societe/mod_codeclient_elephant.php b/htdocs/includes/modules/societe/mod_codeclient_elephant.php index a000c4f4cb8..c478a1c415a 100644 --- a/htdocs/includes/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/includes/modules/societe/mod_codeclient_elephant.php @@ -255,7 +255,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode { $sql = "SELECT code_client FROM ".MAIN_DB_PREFIX."societe"; $sql.= " WHERE code_client = '".$code."'"; - $sql.= " AND rowid != '".$soc->id."'"; + if ($soc->id > 0) $sql.= " AND rowid != ".$soc->id; $resql=$db->query($sql); if ($resql) diff --git a/htdocs/includes/modules/societe/mod_codeclient_monkey.php b/htdocs/includes/modules/societe/mod_codeclient_monkey.php index c5735dd63e0..a59ecc100ac 100644 --- a/htdocs/includes/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/includes/modules/societe/mod_codeclient_monkey.php @@ -203,7 +203,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode { $sql = "SELECT code_client FROM ".MAIN_DB_PREFIX."societe"; $sql.= " WHERE code_client = '".$code."'"; - $sql.= " AND rowid != '".$soc->id."'"; + if ($soc->id > 0) $sql.= " AND rowid != ".$soc->id; $resql=$db->query($sql); if ($resql)