diff --git a/htdocs/core/ajax/onlineSign.php b/htdocs/core/ajax/onlineSign.php
index 67c3c989a3a..3ec4cfa0f20 100644
--- a/htdocs/core/ajax/onlineSign.php
+++ b/htdocs/core/ajax/onlineSign.php
@@ -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++;
diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php
index a3ad1eaf645..1d90339a0ac 100644
--- a/htdocs/public/onlinesign/newonlinesign.php
+++ b/htdocs/public/onlinesign/newonlinesign.php
@@ -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();
}
@@ -459,6 +468,7 @@ if ($action == "dosign" && empty($cancel)) {
print '
';
if ($message == 'refused') {
print ''.$langs->trans("PropalRefused").'';
+
} else {
print ''.$langs->trans("PropalAlreadyRefused").'';
}