FIX: product customer prices: missing triggers in CRUD class

This commit is contained in:
Marc de Lima Lucio 2020-10-26 16:11:21 +01:00
parent 377c44eeab
commit 3f839c2a96

View File

@ -219,15 +219,11 @@ class Productcustomerprice extends CommonObject
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . "product_customer_price");
if (! $notrigger) {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
$result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_CREATE', $user);
// // Call triggers
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
// $interface=new Interfaces($this->db);
// $result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf);
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
// // End call triggers
if ($result < 0) {
$error++;
}
}
}
@ -714,12 +710,11 @@ class Productcustomerprice extends CommonObject
if (! $error) {
if (! $notrigger) {
// Call triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('PRODUCT_CUSTOMER_PRICE_UPDATE', $this, $user, $langs, $conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// End call triggers
$result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_UPDATE', $user);
if ($result < 0) {
$error++;
}
}
}
@ -854,15 +849,11 @@ class Productcustomerprice extends CommonObject
if (! $error) {
if (! $notrigger) {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
$result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_DELETE', $user);
// // Call triggers
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
// $interface=new Interfaces($this->db);
// $result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
// // End call triggers
if ($result < 0) {
$error++;
}
}
}