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
@ -1601,6 +1601,8 @@ class Propal extends CommonObject
|
||||
function delete($user, $notrigger=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$error=0;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -1657,10 +1659,18 @@ class Propal extends CommonObject
|
||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
// 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