diff --git a/visa/trunk/class/class_modules_tools_Abstract.php b/visa/trunk/class/class_modules_tools_Abstract.php
index 338a7d07c16d102d7c48b06a69bb5de4e6e2d7bf..adb8e1864eadde0fe5b3f83e960f81e92b1f08e9 100644
--- a/visa/trunk/class/class_modules_tools_Abstract.php
+++ b/visa/trunk/class/class_modules_tools_Abstract.php
@@ -145,8 +145,8 @@ abstract class visa_Abstract extends Database
 		
 		$stmt = $db->query("select filename, format, path, title, res_id, res_id_version, attachment_type "
 			. "from res_view_attachments where res_id_master = ? AND status <> 'OBS' AND status <> 'SIGN' "
-			. "AND status <> 'DEL' and attachment_type IN "
-			. "('response_project','signed_response','outgoing_mail','waybill','transfer', 'simple_attachment', 'envelope', 'transmission', 'aihp', 'record_traffic', 'sva', 'svr') order by creation_date desc",
+			. "AND status <> 'DEL' and attachment_type NOT IN "
+			. "('converted_pdf','print_folder') order by creation_date desc",
 			array($res_id));
 
 		$array_reponses = array();
@@ -199,7 +199,7 @@ abstract class visa_Abstract extends Database
 		$this->errorMessageVisa = null;
 
 		$db = new Database();
-		$stmt = $db->query("SELECT * FROM res_attachments WHERE res_id_master = ? AND coll_id = ? AND status NOT IN ('DEL','OBS') AND attachment_type IN ('response_project', 'print_folder', 'signed_response','outgoing_mail','waybill','transfer', 'simple_attachment', 'envelope', 'transmission', 'aihp', 'sva', 'svr') ", array($res_id, $coll_id));
+		$stmt = $db->query("SELECT * FROM res_attachments WHERE res_id_master = ? AND coll_id = ? AND status NOT IN ('DEL','OBS') AND attachment_type NOT IN ('converted_pdf','print_folder') ", array($res_id, $coll_id));
 		if ($stmt->rowCount() <= 0) {
 			$this->errorMessageVisa = _NO_RESPONSE_PROJECT_VISA;
 			return false;
diff --git a/visa/trunk/lang/fr.php b/visa/trunk/lang/fr.php
index a5946788086439c17a1de4659b70fe6199116eb2..58ee914a5a09580e756fa329ff0ff88019277f0d 100644
--- a/visa/trunk/lang/fr.php
+++ b/visa/trunk/lang/fr.php
@@ -122,3 +122,9 @@ if (!defined("_NO_NEXT_STEP_VISA"))
 
 if (!defined("_VISA_USERS"))
     define("_VISA_USERS", "Personne(s) pour visa / signature");
+
+if (!defined("_TMP_SIGNED_FILE_FAILED"))
+    define("_TMP_SIGNED_FILE_FAILED", "Echec de la génération document avec signature");
+
+if (!defined("_ENCRYPTED"))
+    define("_ENCRYPTED", "crypté");
\ No newline at end of file
diff --git a/visa/trunk/save_attach_res_from_cm.php b/visa/trunk/save_attach_res_from_cm.php
index 39ca809fc55a22b5c64c4ad6c101bda53751b26c..6de210aab18dc7931c065a4101e59d09f2edd260 100644
--- a/visa/trunk/save_attach_res_from_cm.php
+++ b/visa/trunk/save_attach_res_from_cm.php
@@ -21,13 +21,16 @@ $docserver = $docserverControler->getDocserverToInsert(
 );
 
 
-
-
 if (empty($docserver)) {
     $_SESSION['error'] = _DOCSERVER_ERROR . ' : '
-        . _NO_AVAILABLE_DOCSERVER . '. ' . _MORE_INFOS;
+        . _IMG_SIGN_MISSING . '. ' . _MORE_INFOS;
 } else {
     // some checking on docserver size limit
+    if(!is_file($_SESSION['config']['tmppath'] . $tmpFileName)){
+        echo "{status:1, error : '". _TMP_SIGNED_FILE_FAILED . ': ' ._FILE . ' ' . _ENCRYPTED .' ' . _OR .' ' . _MISSING ."'}";
+        exit;
+    }
+    
     $newSize = $docserverControler->checkSize(
         $docserver, filesize($_SESSION['config']['tmppath'] . $tmpFileName)
     );
diff --git a/visa/trunk/sign_file.php b/visa/trunk/sign_file.php
index 5129085a58f00a0b930ab3f8f608af79ce4ba72c..5612c84d96f7194a0adf21be7532ac16fa21b1a8 100644
--- a/visa/trunk/sign_file.php
+++ b/visa/trunk/sign_file.php
@@ -35,14 +35,15 @@ if (!empty($_REQUEST['id']) && !empty($_REQUEST['collId'])){
 
         $stmt = $db->query("select res_id_version, format, res_id_master, title, identifier, type_id, attachment_type from "
             . $tableName 
-            . " where (attachment_type = ? or attachment_type = ? or attachment_type = ? or attachment_type = ? or attachment_type = 'transfer') and res_id_version = ?", array('response_project', 'outgoing_mail', 'sva', 'waybill', $objectId));
+            . " where attachment_type NOT IN ('converted_pdf','print_folder') and res_id_version = ?", array($objectId));
+
     } elseif (isset($_REQUEST['isOutgoing'])) {
 
         $stmt = $db->query("select res_id, format, res_id_master, title, identifier, type_id, attachment_type from " 
             . $tableName 
             . " where attachment_type = ? and res_id = ?", array('outgoing_mail', $objectId));
     } else {
-        $stmt = $db->query("select res_id, format, res_id_master, title, identifier, type_id, attachment_type from ".$tableName." where (attachment_type = ? or attachment_type = ? or attachment_type = ? or attachment_type = ? or attachment_type = 'transfer') and res_id = ?", array('svr','sva', 'response_project','waybill', $objectId));
+        $stmt = $db->query("select res_id, format, res_id_master, title, identifier, type_id, attachment_type from ".$tableName." where (attachment_type NOT IN ('converted_pdf','print_folder')) and res_id = ?", array($objectId));
     }
 	
     if ($stmt->rowCount() < 1) {