Add missing trigger LINERECEPTION_DELETE

This commit is contained in:
Francis Appels 2021-05-27 16:02:12 +02:00
parent 2caaa52e85
commit 8ed24d6796

View File

@ -333,7 +333,6 @@ class CommandeFournisseurDispatch extends CommonObject
*/
public function update($user, $notrigger = 0)
{
global $conf, $langs;
$error = 0;
// Clean parameters
@ -411,12 +410,12 @@ class CommandeFournisseurDispatch extends CommonObject
}
if (!$notrigger) {
// Uncomment this and change MYOBJECT to your own tag if you
// Call triggers
$result = $this->call_trigger('LINERECEPTION_UPDATE', $user);
if ($result < 0) {
$error++;
}
//// End call triggers
// End call triggers
}
}
@ -444,24 +443,22 @@ class CommandeFournisseurDispatch extends CommonObject
*/
public function delete($user, $notrigger = 0)
{
global $conf, $langs;
$error = 0;
$this->db->begin();
if (!$error) {
if (!$notrigger) {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
//// Call triggers
//$result=$this->call_trigger('MYOBJECT_DELETE',$user);
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
//// End call triggers
// Call triggers
$result = $this->call_trigger('LINERECEPTION_DELETE', $user);
if ($result < 0) {
$error++;
}
// End call triggers
}
}
// Remove extrafields
// Remove extrafields
if (!$error) {
$result = $this->deleteExtraFields();
if ($result < 0) {
@ -496,7 +493,6 @@ class CommandeFournisseurDispatch extends CommonObject
}
/**
* Load an object from its id and create a new one in database
*