From f7a07f2491eab282480b744efe3333e5b73ee51a Mon Sep 17 00:00:00 2001 From: Ion Agorria Date: Sat, 26 Nov 2016 22:13:31 +0100 Subject: [PATCH] Supplier order statut is not reverted on RECEIVE trigger fail --- htdocs/fourn/class/fournisseur.commande.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index e298ab43467..80445f6d55e 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -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;