Merge pull request #6042 from IonAgorria/receive-trigger
FIX: Supplier order statut is not reverted if RECEIVE trigger fails
This commit is contained in:
commit
bf2b75f990
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue