Commit ae16933d authored by ludovic's avatar ludovic
Browse files

Fix 19208 L'attribut 'Date de signature' est vide à l'exportation

parent ce5a146a
......@@ -636,20 +636,19 @@ class ExportController
foreach ($args['chunkedResIds'] as $resIds) {
$attachments = AttachmentModel::get([
'select' => ['creation_date', 'res_id'],
'where' => ['res_id in (?)', 'attachment_type = ?', 'status = ?'],
'select' => ['creation_date', 'res_id_master'],
'where' => ['res_id_master in (?)', 'attachment_type = ?', 'status = ?'],
'data' => [$resIds, 'signed_response', 'TRA'],
'order_by' => ['res_id']
]);
foreach ($attachments as $attachment) {
$date = new \DateTime($attachment['creation_date']);
if (!empty($aSignatureDates[$attachment['res_id']])) {
$aSignatureDates[$attachment['res_id']] .= "\n";
$aSignatureDates[$attachment['res_id_master']] .= "\n";
} else {
$aSignatureDates[$attachment['res_id']] = '';
$aSignatureDates[$attachment['res_id_master']] = '';
}
$aSignatureDates[$attachment['res_id']] .= $date->format('d-m-Y H:i');
$aSignatureDates[$attachment['res_id_master']] .= TextFormatModel::formatDate($attachment['creation_date']);
}
}
......
......@@ -618,6 +618,7 @@ class SignatureBookController
$data = [
'title' => $attachment['title'],
'encodedFile' => base64_encode($signedDocument),
'status' => 'TRA',
'format' => 'pdf',
'typist' => $attachment['typist'],
'resIdMaster' => $attachment['res_id_master'],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment