change trigger position
This commit is contained in:
parent
4e707af0fd
commit
37d366478f
@ -464,12 +464,6 @@ class Commande extends CommonOrder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
|
||||||
// Call trigger
|
|
||||||
$result=$this->call_trigger('ORDER_SETDRAFT',$user);
|
|
||||||
if ($result < 0) $error++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
$this->statut=self::STATUS_DRAFT;
|
$this->statut=self::STATUS_DRAFT;
|
||||||
@ -484,9 +478,20 @@ class Commande extends CommonOrder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->statut=self::STATUS_DRAFT;
|
if (!$error) {
|
||||||
$this->db->commit();
|
// Call trigger
|
||||||
return 1;
|
$result=$this->call_trigger('ORDER_SETDRAFT',$user);
|
||||||
|
if ($result < 0) $error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
$this->statut=self::STATUS_DRAFT;
|
||||||
|
$this->db->commit();
|
||||||
|
return 1;
|
||||||
|
}else {
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user