diff --git a/bin/exportSeda/batch_tools.php b/bin/exportSeda/batch_tools.php
index 9d5a4f42ae85746e3f458473f7bf5e950004039d..2be12866dd5803e52746e405a8c88c24e0d04ab3 100644
--- a/bin/exportSeda/batch_tools.php
+++ b/bin/exportSeda/batch_tools.php
@@ -351,6 +351,15 @@ function Bt_purgeAll($args = [])
             'where' => ['note_id in (select id from notes where identifier in (?))'],
             'data'  => [$args['resources']]
         ]);
+
+        $linkedResources = implode("' - '", $args['resources']);
+        \SrcCore\models\DatabaseModel::update([
+            'table'     => 'res_letterbox',
+            'postSet'   => ['linked_resources' => "linked_resources - '{$linkedResources}'"],
+            'where'     => ['linked_resources != ?'],
+            'data'      => ['[]']
+        ]);
+
         \SrcCore\models\DatabaseModel::delete([
             'table' => 'adr_attachments',
             'where' => ['res_id in (select res_id from res_attachments where res_id_master in (?))'],
diff --git a/bin/exportSeda/checkAllReplies.php b/bin/exportSeda/checkAllReplies.php
index 5baff5e7f5bdb158500ccba10723343e2df71349..1b5bf7c5093f6c0a9a8d7bc356c30d7342b72a6a 100755
--- a/bin/exportSeda/checkAllReplies.php
+++ b/bin/exportSeda/checkAllReplies.php
@@ -75,7 +75,6 @@ if (empty($file)) {
 $config = $file['config'];
 $GLOBALS['MaarchDirectory'] = $config['maarchDirectory'];
 $GLOBALS['customId']        = $config['customID'];
-$GLOBALS['applicationUrl']  = $config['maarchUrl'];
 $GLOBALS['batchDirectory']  = $GLOBALS['MaarchDirectory'] . 'bin/exportSeda';
 
 $config = $file['exportSeda'];
@@ -171,6 +170,10 @@ foreach ($unitIdentifiers as $reference => $value) {
             Bt_writeLog(['level' => 'ERROR', 'message' => '[storeAttachment] ' . $id['errors']]);
             continue;
         }
+        \Convert\controllers\ConvertPdfController::convert([
+            'resId'  => $id,
+            'collId' => 'attachments_coll'
+        ]);
         $status = (strpos((string)$messages['xmlContent']->ReplyCode, 'OOO')) === false ? $GLOBALS['statusReplyRejected'] : $GLOBALS['statusReplyReceived'];
         \Resource\models\ResModel::update([
             'set'   => ['status' => $status],
diff --git a/bin/exportSeda/purge.php b/bin/exportSeda/purge.php
index cdcf6a0be30db6ea23aeff3c20ec15f6647bc9bf..fa37203710c11d4810fba22d091e2b196d27d448 100755
--- a/bin/exportSeda/purge.php
+++ b/bin/exportSeda/purge.php
@@ -75,7 +75,6 @@ if (empty($file)) {
 $config = $file['config'];
 $GLOBALS['MaarchDirectory'] = $config['maarchDirectory'];
 $GLOBALS['customId']        = $config['customID'];
-$GLOBALS['applicationUrl']  = $config['maarchUrl'];
 $GLOBALS['batchDirectory']  = $GLOBALS['MaarchDirectory'] . 'bin/exportSeda';
 
 $config = $file['exportSeda'];