Merge pull request #5232 from atm-florian/develop

Add trigger into expedition class
This commit is contained in:
Laurent Destailleur
2016-05-29 13:15:35 +02:00
3 changed files with 77 additions and 3 deletions

View File

@@ -478,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
{