diff --git a/htdocs/includes/modules/societe/mod_codeclient_elephant.php b/htdocs/includes/modules/societe/mod_codeclient_elephant.php index 0a89878b64d..f89e743fc15 100644 --- a/htdocs/includes/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/includes/modules/societe/mod_codeclient_elephant.php @@ -272,7 +272,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 c4238280536..4dff34fb761 100644 --- a/htdocs/includes/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/includes/modules/societe/mod_codeclient_monkey.php @@ -212,7 +212,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)