Merge pull request #21943 from rycks/15.0_fix_public_propal_sign_call_trigger
fix #21941 call_trigger
This commit is contained in:
commit
7600aec8f9
@ -212,6 +212,15 @@ if ($action == "importSignature") {
|
|||||||
$db->commit();
|
$db->commit();
|
||||||
$response = "success";
|
$response = "success";
|
||||||
setEventMessages("PropalSigned", null, 'warnings');
|
setEventMessages("PropalSigned", null, 'warnings');
|
||||||
|
if (method_exists($object, 'call_trigger')) {
|
||||||
|
//customer is not a user !?! so could we use same user as validation ?
|
||||||
|
$user = new User($db);
|
||||||
|
$user->fetch($object->user_valid_id);
|
||||||
|
$result = $object->call_trigger('PROPAL_CLOSE_SIGNED', $user);
|
||||||
|
if ($result < 0) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
@ -168,6 +168,15 @@ if ($action == 'confirm_refusepropal' && $confirm == 'yes') {
|
|||||||
|
|
||||||
$message = 'refused';
|
$message = 'refused';
|
||||||
setEventMessages("PropalRefused", null, 'warnings');
|
setEventMessages("PropalRefused", null, 'warnings');
|
||||||
|
if (method_exists($object, 'call_trigger')) {
|
||||||
|
//customer is not a user !?! so could we use same user as validation ?
|
||||||
|
$user = new User($db);
|
||||||
|
$user->fetch($object->user_valid_id);
|
||||||
|
$result = $object->call_trigger('PROPAL_CLOSE_REFUSED', $user);
|
||||||
|
if ($result < 0) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user