fix: On Supplier Order create, if insertExtrafield failed, Dolibarr do not return error and continue

This commit is contained in:
Florian HENRY 2025-02-13 14:59:15 +01:00
parent 9516f9bbd2
commit 7997e927a0

View File

@ -1610,8 +1610,13 @@ class CommandeFournisseur extends CommonOrder
// End call triggers
}
$this->db->commit();
return $this->id;
if (!$error) {
$this->db->commit();
return $this->id;
} else {
$this->db->rollback();
return -4;
}
} else {
$this->error = $this->db->lasterror();
$this->db->rollback();