Skip to content
Snippets Groups Projects
Verified Commit 1212bea0 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #15450 TIME 0:05 Improve retrieve document from ixbus + fix send export...

FEAT #15450 TIME 0:05 Improve retrieve document from ixbus + fix send export seda without attachment
parent 8eb249a0
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,7 @@ trait ExportSEDATrait
$initData = SedaController::initArchivalData([
'resource' => $resource,
'attachments' => $attachmentsData[$args['resId']],
'attachments' => $attachmentsData[$args['resId']] ?? [],
'senderOrgRegNumber' => $config['exportSeda']['senderOrgRegNumber'],
'entity' => $entity,
'doctype' => $doctype,
......
......@@ -190,7 +190,7 @@ trait PreProcessActionSEDATrait
$archivalData = SedaController::initArchivalData([
'resource' => $resources[$resId],
'attachments' => $resAttachments[$resId],
'attachments' => $resAttachments[$resId] ?? [],
'senderOrgRegNumber' => $config['exportSeda']['senderOrgRegNumber'],
'entity' => $destinationsData[$destinationId],
'doctype' => $doctypesData[$typeId],
......
......@@ -349,16 +349,11 @@ class IxbusController
foreach ($aArgs['idsToRetrieve'][$version] as $resId => $value) {
$folderData = IxbusController::getDossier(['config' => $aArgs['config'], 'folderId' => $value['external_id']]);
if ($folderData['data']['etat'] == 'Refusé') {
$aArgs['idsToRetrieve'][$version][$resId]['status'] = 'refused';
// $notes = IxbusController::getDossier(['config' => $aArgs['config'], 'folderId' => $value['external_id']]);
// $aArgs['idsToRetrieve'][$version][$resId]['notes'][] = ['content' => (string)$notes->MotifRefus];
} elseif ($folderData['data']['etat'] == 'Terminé') {
$aArgs['idsToRetrieve'][$version][$resId]['status'] = 'validated';
if (in_array($folderData['data']['etat'], ['Refusé', 'Terminé'])) {
$aArgs['idsToRetrieve'][$version][$resId]['status'] = $folderData['data']['etat'] == 'Refusé' ? 'refused' : 'validated';
$signedDocument = IxbusController::getDocument(['config' => $aArgs['config'], 'documentId' => $folderData['data']['documents']['principal']['identifiant']]);
$aArgs['idsToRetrieve'][$version][$resId]['format'] = 'pdf';
$aArgs['idsToRetrieve'][$version][$resId]['encodedFile'] = $signedDocument['encodedDocument'];
// $notes = IxbusController::getAnnotations(['config' => $aArgs['config'], 'folderId' => $value['external_id']]);
// $aArgs['idsToRetrieve'][$version][$resId]['notes'][] = ['content' => (string)$notes->Annotation->Texte];
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment