From f08cde7f0e8f8ab0ea493f19ac6928c373d6b7fc Mon Sep 17 00:00:00 2001
From: Nathan Cheval <nathan.cheval@outlook.fr>
Date: Wed, 31 Oct 2018 09:48:54 +0100
Subject: [PATCH] fix for retrieve attachments to send

---
 modules/visa/class/FastParapheurController.php | 2 +-
 modules/visa/class/IParapheurController.php    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/visa/class/FastParapheurController.php b/modules/visa/class/FastParapheurController.php
index 9251259afa9..c80633b8277 100755
--- a/modules/visa/class/FastParapheurController.php
+++ b/modules/visa/class/FastParapheurController.php
@@ -165,7 +165,7 @@ class FastParapheurController
         $attachments         = \Attachment\models\AttachmentModel::getOnView([
             'select'         => ['res_id', 'res_id_version', 'title', 'attachment_type','path', 'res_id_master', 'format'],
             'where'         => ['res_id_master = ?', 'attachment_type not in (?)', "status not in ('DEL', 'OBS')", 'in_signature_book = TRUE', "format = 'pdf'"],
-            'data'          => [$aArgs['resIdMaster'], ['incoming_mail_attachment', 'print_folder']]
+            'data'          => [$aArgs['resIdMaster'], ['incoming_mail_attachment', 'print_folder', 'signed_response']]
         ]);
 
         $attachmentToFreeze = [];
diff --git a/modules/visa/class/IParapheurController.php b/modules/visa/class/IParapheurController.php
index 35330276a46..d18fc8fe188 100755
--- a/modules/visa/class/IParapheurController.php
+++ b/modules/visa/class/IParapheurController.php
@@ -87,8 +87,8 @@ class IParapheurController
 
         $attachments         = \Attachment\models\AttachmentModel::getOnView([
             'select'         => ['res_id', 'res_id_version', 'title', 'attachment_type','path'],
-            'where'         => ['res_id_master = ?', 'attachment_type not in (?)', "status not in ('DEL', 'OBS')", 'in_signature_book = TRUE', "format = 'pdf'"],
-            'data'          => [$aArgs['resIdMaster'], ['incoming_mail_attachment', 'print_folder']]
+            'where'          => ['res_id_master = ?', 'attachment_type not in (?)', "status not in ('DEL', 'OBS')", 'in_signature_book = TRUE', "format = 'pdf'"],
+            'data'           => [$aArgs['resIdMaster'], ['incoming_mail_attachment', 'print_folder', 'signed_response']]
         ]);
 
         for($i = 0; $i < count($attachments); $i++){
-- 
GitLab