diff --git a/modules/visa/batch/batch_tools.php b/modules/visa/batch/batch_tools.php
index 59a310875b1c4e1568454ec04ca0d53d5e594cc8..892758866f2f6752f03581fe5a0744039fb05257 100755
--- a/modules/visa/batch/batch_tools.php
+++ b/modules/visa/batch/batch_tools.php
@@ -104,7 +104,7 @@ function Bt_history($aArgs = [])
 {
     $query = "INSERT INTO history (table_name, record_id, event_type, "
            . "user_id, event_date, info, id_module, remote_ip, event_id) values(?, ?, ?, ?, CURRENT_TIMESTAMP, ?, ?, ?, ?)";
-    $arrayPDO = array($aArgs['table_name'], $aArgs['record_id'], 'UP', 'superadmin', $aArgs['info'], 'visa', 'localhost', 'attachup');
+    $arrayPDO = array($aArgs['table_name'], $aArgs['record_id'], $aArgs['event_type'], 'superadmin', $aArgs['info'], 'visa', 'localhost', $aArgs['event_id']);
     $GLOBALS['db']->query($query, $arrayPDO);
 }
 
@@ -213,16 +213,21 @@ function Bt_refusedSignedMail($aArgs = [])
     
     $GLOBALS['db']->query("UPDATE res_letterbox SET status = '" . $aArgs['refusedStatus'] . "' WHERE res_id = ?", [$aArgs['resIdMaster']]);
 
+    $historyInfo = 'La signature de la pièce jointe '.$aArgs['resIdAttachment'].' ('.$aArgs['tableAttachment'].') a été refusée dans le parapheur externe';
     Bt_history([
         'table_name' => $aArgs['tableAttachment'],
         'record_id'  => $aArgs['resIdAttachment'],
-        'info'       => 'Signature refusée dans le parapheur externe'
+        'info'       => $historyInfo,
+        'event_type' => 'UP',
+        'event_id'   => 'attachup'
     ]);
 
     Bt_history([
         'table_name' => 'res_letterbox',
         'record_id'  => $aArgs['resIdMaster'],
-        'info'       => 'La signature de la pièce jointe '.$aArgs['resIdAttachment'].' ('.$aArgs['tableAttachment'].') a été refusée dans le parapheur externe'
+        'info'       => $historyInfo,
+        'event_type' => 'ACTION#1',
+        'event_id'   => '1'
     ]);
 }
 
diff --git a/modules/visa/batch/process_mailsFromSignatoryBook.php b/modules/visa/batch/process_mailsFromSignatoryBook.php
index 1ccc046dbadfaf0802ddfae3c58c330f2f906b9e..300187bd9be55fd3820bacc6cd06f5c1bb4697b1 100755
--- a/modules/visa/batch/process_mailsFromSignatoryBook.php
+++ b/modules/visa/batch/process_mailsFromSignatoryBook.php
@@ -262,15 +262,21 @@ foreach ($retrievedMails['isVersion'] as $resId => $value) {
 
         $GLOBALS['db']->query("UPDATE res_version_attachments set status = 'TRA' WHERE res_id = ?", [$resId]);
         Bt_processVisaWorkflow(['res_id_master' => $value->res_id_master]);
+
+        $historyInfo = 'La signature de la pièce jointe '.$resId.' (res_version_attachments) a été validée dans le parapheur externe';
         Bt_history([
             'table_name' => 'res_version_attachments',
             'record_id'  => $resId,
-            'info'       => 'Signature validée dans le parapheur externe'
+            'info'       => $historyInfo,
+            'event_type' => 'UP',
+            'event_id'   => 'attachup'
         ]);
         Bt_history([
             'table_name' => 'res_letterbox',
             'record_id'  => $value->res_id_master,
-            'info'       => 'La signature de la pièce jointe '.$resId.' (res_version_attachments) a été validée dans le parapheur externe'
+            'info'       => $historyInfo,
+            'event_type' => 'ACTION#1',
+            'event_id'   => '1'
         ]);
     } elseif ($value->status == 'refused') {
         Bt_refusedSignedMail([
@@ -302,15 +308,21 @@ foreach ($retrievedMails['noVersion'] as $resId => $value) {
 
         $GLOBALS['db']->query("UPDATE res_attachments SET status = 'TRA' WHERE res_id = ?", [$resId]);
         Bt_processVisaWorkflow(['res_id_master' => $value->res_id_master]);
+
+        $historyInfo = 'La signature de la pièce jointe '.$resId.' (res_attachments) a été validée dans le parapheur externe';
         Bt_history([
             'table_name' => 'res_attachments',
             'record_id'  => $resId,
-            'info'       => 'Signature validée dans le parapheur externe'
+            'info'       => $historyInfo,
+            'event_type' => 'UP',
+            'event_id'   => 'attachup'
         ]);
         Bt_history([
             'table_name' => 'res_letterbox',
             'record_id'  => $value->res_id_master,
-            'info'       => 'La signature de la pièce jointe '.$resId.' (res_attachments) a été validée dans le parapheur externe'
+            'info'       => $historyInfo,
+            'event_type' => 'ACTION#1',
+            'event_id'   => '1'
         ]);
     } elseif ($value->status == 'refused') {
         Bt_refusedSignedMail([