From 95a58ebef8a248102d9870942b25d632fb6d9aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 10 Jun 2014 12:23:31 +0200 Subject: [PATCH] Fixed LINEORDER_UPDATE interception --- htdocs/commande/class/commande.class.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 40937fc77e5..7281a013552 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3402,8 +3402,18 @@ class OrderLine extends CommonOrderLine // Fin appel triggers } - $this->db->commit(); - return 1; + if (!$error) { + $this->db->commit(); + return 1; + } + + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; } else {