Skip to content
Snippets Groups Projects
Commit bf2b75f9 authored by Laurent Destailleur's avatar Laurent Destailleur Committed by GitHub
Browse files

Merge pull request #6042 from IonAgorria/receive-trigger

FIX: Supplier order statut is not reverted if RECEIVE trigger fails
parents 18a1f903 f7a07f24
No related branches found
No related tags found
No related merge requests found
......@@ -1961,6 +1961,7 @@ class CommandeFournisseur extends CommonOrder
if ($resql)
{
$result = 0;
$old_statut = $this->statut;
$this->statut = $statut;
// Call trigger
......@@ -1974,6 +1975,7 @@ class CommandeFournisseur extends CommonOrder
}
else
{
$this->statut = $old_statut;
$this->db->rollback();
$this->error=$this->db->lasterror();
$result = -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment