Skip to content
Snippets Groups Projects
Commit dd1c5ce3 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Missing commit

parent ef8b5557
No related branches found
No related tags found
No related merge requests found
......@@ -780,7 +780,6 @@ class CommandeFournisseur extends CommonOrder
$error=0;
dol_syslog(get_class($this)."::refuse");
$result = 0;
if ($user->rights->fournisseur->commande->approuver)
{
......@@ -789,12 +788,15 @@ class CommandeFournisseur extends CommonOrder
$sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur SET fk_statut = 9";
$sql.= " WHERE rowid = ".$this->id;
if ($this->db->query($sql))
dol_syslog(get_class($this)."::refuse sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
$result = 0;
$this->log($user, 9, time());
if ($error == 0)
if (! $error)
{
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
......@@ -804,10 +806,18 @@ class CommandeFournisseur extends CommonOrder
{
$error++;
$this->errors=$interface->errors;
$this->db->rollback();
}
// Fin appel triggers
}
if (! $error)
{
$this->db->commit();
}
else
{
$this->db->rollback();
}
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment