Fix: [ bug #1449 ] Trigger ORDER_CREATE ignores interception on error
This commit is contained in:
parent
ae0116aab0
commit
0c1ba58a00
@ -9,6 +9,7 @@ Fix: [ bug #1416 ] Supplier order does not list document models in the select bo
|
|||||||
supplier order card
|
supplier order card
|
||||||
Fix: [ bug #1443 ] Payment conditions is erased after editing supplier invoice label or
|
Fix: [ bug #1443 ] Payment conditions is erased after editing supplier invoice label or
|
||||||
limit date for payment
|
limit date for payment
|
||||||
|
Fix: [ bug #1449 ] Trigger ORDER_CREATE ignores interception on error
|
||||||
|
|
||||||
***** ChangeLog for 3.5.3 compared to 3.5.2 *****
|
***** ChangeLog for 3.5.3 compared to 3.5.2 *****
|
||||||
Fix: Error on field accountancy code for export profile of invoices.
|
Fix: Error on field accountancy code for export profile of invoices.
|
||||||
|
|||||||
@ -795,8 +795,19 @@ class Commande extends CommonOrder
|
|||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
if (!$error) {
|
||||||
return $this->id;
|
$this->db->commit();
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($this->errors as $errmsg)
|
||||||
|
{
|
||||||
|
dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR);
|
||||||
|
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||||
|
}
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1*$error;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user