diff --git a/src/app/attachment/controllers/AttachmentController.php b/src/app/attachment/controllers/AttachmentController.php index 3a514b1cea4b82b34c1d086bda0278f68a311e40..5c0b571625768e038cc74e2e7a1af7027f5f52fd 100755 --- a/src/app/attachment/controllers/AttachmentController.php +++ b/src/app/attachment/controllers/AttachmentController.php @@ -57,11 +57,6 @@ class AttachmentController 'collId' => 'attachments_coll' ]); - $attachmentsTypes = AttachmentModel::getAttachmentsTypesByXML(); - if ($attachmentsTypes[$body['type']]['sign']) { - AttachmentModel::setInSignatureBook(['id' => $id, 'inSignatureBook' => true]); - } - $customId = CoreConfigModel::getCustomId(); $customId = empty($customId) ? 'null' : $customId; exec("php src/app/convert/scripts/FullTextScript.php --customId {$customId} --resId {$id} --collId attachments_coll --userId {$GLOBALS['id']} > /dev/null &"); diff --git a/src/app/resource/controllers/StoreController.php b/src/app/resource/controllers/StoreController.php index 2583e1249c081dba677a96328d29c81a181e4a0b..669fbc7546866a9038ecc5720f8a91de3ef02074 100755 --- a/src/app/resource/controllers/StoreController.php +++ b/src/app/resource/controllers/StoreController.php @@ -309,7 +309,7 @@ class StoreController 'recipient_type' => $args['recipientType'] ?? null, 'validation_date' => $args['validationDate'] ?? null, 'effective_date' => $args['effectiveDate'] ?? null, - 'in_signature_book' => empty($args['inSignatureBook']) ? 'false' : 'true', + 'in_signature_book' => $attachmentsTypes[$args['type']]['sign'] == true || !empty($args['inSignatureBook']) ? 'true' : 'false', 'external_id' => $externalId, 'creation_date' => 'CURRENT_TIMESTAMP' ];