mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
change trigger position
This commit is contained in:
@@ -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)
|
||||
{
|
||||
$this->statut=self::STATUS_DRAFT;
|
||||
@@ -484,9 +478,20 @@ class Commande extends CommonOrder
|
||||
}
|
||||
}
|
||||
|
||||
$this->statut=self::STATUS_DRAFT;
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
if (!$error) {
|
||||
// Call trigger
|
||||
$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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user