Merge pull request #33072 from FHenry/18_fix_supplierorder_catcherroroncreate

fix: On Supplier Order create, if insertExtrafield failed, Dolibarr do not return error and continue
This commit is contained in:
Laurent Destailleur 2025-02-13 17:29:22 +01:00 committed by GitHub
commit 6aa4d6a940
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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();