add trigger CREATE_BUYPRICE

This commit is contained in:
Christophe Battarel 2014-04-01 10:23:57 +02:00
parent d452624ebc
commit ea74c4738e

View File

@ -285,11 +285,28 @@ class ProductFournisseur extends Product
*/ */
if (! $error) if (! $error)
{
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('CREATE_BUYPRICE',$this,$user,$langs,$conf);
if ($result < 0)
{
$error++; $this->errors=$interface->errors;
}
if (empty($error))
{ {
$this->db->commit(); $this->db->commit();
return 0; return 0;
} }
else else
{
$this->db->rollback();
return 1;
}
}
else
{ {
$this->error=$this->db->error()." sql=".$sql; $this->error=$this->db->error()." sql=".$sql;
$this->db->rollback(); $this->db->rollback();