mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
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();
|
||||
$response = "success";
|
||||
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 {
|
||||
$db->rollback();
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -168,6 +168,15 @@ if ($action == 'confirm_refusepropal' && $confirm == 'yes') {
|
|||
|
||||
$message = 'refused';
|
||||
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 {
|
||||
$db->rollback();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user