diff --git a/core/modules/dolisirh/dolisirhdocuments/certificatedocument/doc_certificatedocument_odt.modules.php b/core/modules/dolisirh/dolisirhdocuments/certificatedocument/doc_certificatedocument_odt.modules.php index 9a9cd0f..1dea4bc 100644 --- a/core/modules/dolisirh/dolisirhdocuments/certificatedocument/doc_certificatedocument_odt.modules.php +++ b/core/modules/dolisirh/dolisirhdocuments/certificatedocument/doc_certificatedocument_odt.modules.php @@ -88,6 +88,7 @@ public function write_file(SaturneDocuments $objectDocument, Translate $outputLa $signatory = new SaturneSignature($this->db); $tmpArray['object_ref'] = $object->ref; + $tmpArray['object_label'] = $object->label; $tmpArray['object_description'] = $object->description; $tmpArray['object_date_start'] = dol_print_date($object->date_start, 'day', 'tzuser'); $tmpArray['object_date_end'] = dol_print_date($object->date_end, 'day', 'tzuser'); @@ -118,6 +119,8 @@ public function write_file(SaturneDocuments $objectDocument, Translate $outputLa $signatory = $signatory->fetchSignatory('Responsible', $object->id, $object->element); if (is_array($signatory) && !empty($signatory)) { $signatory = array_shift($signatory); + $tmpArray['responsible_fullname'] = strtoupper($signatory->lastname) . ' ' . ucfirst($signatory->firstname); + $tmpArray['responsible_job'] = $signatory->job; if (dol_strlen($signatory->signature) > 0 && $signatory->signature != $langs->transnoentities('FileGenerated')) { if ($moreParam['specimen'] == 0 || ($moreParam['specimen'] == 1 && $conf->global->DOLISIRH_SHOW_SIGNATURE_SPECIMEN == 1)) { $tempDir = $conf->dolisirh->multidir_output[$object->entity ?? 1] . '/temp/'; @@ -132,6 +135,8 @@ public function write_file(SaturneDocuments $objectDocument, Translate $outputLa $tmpArray['responsible_signature'] = ''; } } else { + $tmpArray['responsible_fullname'] = ''; + $tmpArray['responsible_job'] = ''; $tmpArray['responsible_signature'] = ''; } diff --git a/documents/doctemplates/certificatedocument/template_certificatedocument.odt b/documents/doctemplates/certificatedocument/template_certificatedocument.odt index 6dc918d..79e5900 100644 Binary files a/documents/doctemplates/certificatedocument/template_certificatedocument.odt and b/documents/doctemplates/certificatedocument/template_certificatedocument.odt differ