Ajout des trigers de fermeture de propal
This commit is contained in:
parent
22565a5cad
commit
8485b591a4
@ -127,6 +127,27 @@ class InterfaceDemo
|
||||
{
|
||||
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id);
|
||||
}
|
||||
// Proposals
|
||||
elseif ($action == 'PROPAL_CREATE')
|
||||
{
|
||||
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched");
|
||||
}
|
||||
elseif ($action == 'PROPAL_MODIFY')
|
||||
{
|
||||
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched");
|
||||
}
|
||||
elseif ($action == 'PROPAL_VALIDATE')
|
||||
{
|
||||
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched");
|
||||
}
|
||||
elseif ($action == 'PROPAL_CLOSE_SIGNED')
|
||||
{
|
||||
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched");
|
||||
}
|
||||
elseif ($action == 'PROPAL_CLOSE_REFUSED')
|
||||
{
|
||||
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched");
|
||||
}
|
||||
// Contracts
|
||||
elseif ($action == 'CONTRACT_CREATE')
|
||||
{
|
||||
|
||||
@ -823,14 +823,22 @@ class Propal
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
|
||||
// Appel des triggers
|
||||
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('PROPAL_CLOSE_SIGNED',$this,$user,$langs,$conf);
|
||||
// Fin appel triggers
|
||||
}
|
||||
else
|
||||
{
|
||||
// Appel des triggers
|
||||
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('PROPAL_CLOSE_REFUSED',$this,$user,$langs,$conf);
|
||||
// Fin appel triggers
|
||||
}
|
||||
|
||||
// Appel des triggers
|
||||
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('PROP_CLOSE',$this,$user,$langs,$conf);
|
||||
// Fin appel triggers
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user