Fix: prendre en compte les erreurs des triggers dans la fonction, ne pas faire de retour d'erreurs a partir du trigger pour ne pas les prendre en compte.
This commit is contained in:
parent
ad92ef19c4
commit
ff37e4286a
@ -1602,6 +1602,8 @@ class Propal extends CommonObject
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$error=0;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE fk_propal = ".$this->id;
|
||||
@ -1658,9 +1660,17 @@ class Propal extends CommonObject
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
dol_syslog("Suppression de la proposition $this->id par $user->id", LOG_DEBUG);
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
if (!$error)
|
||||
{
|
||||
dol_syslog("Suppression de la proposition $this->id par $user->id", LOG_DEBUG);
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->rollback();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user