FIX Error when updating thirdparty not returned

This commit is contained in:
Laurent Destailleur 2017-07-01 16:24:33 +02:00
parent b308cfef1d
commit a5cfd7c2e2

View File

@ -884,8 +884,6 @@ class Societe extends CommonObject
$sql .= ', multicurrency_code = \''.$this->db->escape($this->multicurrency_code)."'";
$sql .= " WHERE rowid = '" . $id ."'";
dol_syslog(get_class($this)."::Update", LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{
@ -980,11 +978,12 @@ class Societe extends CommonObject
{
// Doublon
$this->error = $langs->trans("ErrorDuplicateField");
$result = -1;
$result = -1;
}
else
{
$result = -2;
$this->error = $this->db->lasterror();
$result = -2;
}
$this->db->rollback();
return $result;