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);
|
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
|
// Contracts
|
||||||
elseif ($action == 'CONTRACT_CREATE')
|
elseif ($action == 'CONTRACT_CREATE')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -823,13 +823,21 @@ class Propal
|
|||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
|
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
|
||||||
$interface=new Interfaces($this->db);
|
$interface=new Interfaces($this->db);
|
||||||
$result=$interface->run_triggers('PROP_CLOSE',$this,$user,$langs,$conf);
|
$result=$interface->run_triggers('PROPAL_CLOSE_SIGNED',$this,$user,$langs,$conf);
|
||||||
// Fin appel triggers
|
// 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
|
||||||
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user