FIX Do not update timestamp when we set the "default" to another record

This commit is contained in:
Laurent Destailleur 2020-01-02 20:29:19 +01:00
parent dbb65d864e
commit 5cb8cceb82

View File

@ -444,7 +444,7 @@ class CompanyPaymentMode extends CommonObject
$this->db->begin();
$sql2 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 0";
$sql2 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 0, tms = tms";
$sql2.= " WHERE default_rib <> 0 AND fk_soc = ".$obj->fk_soc;
if ($type) $sql2.= " AND type = '".$this->db->escape($type)."'";
dol_syslog(get_class($this).'::setAsDefault', LOG_DEBUG);