Skip to content

Commit

Permalink
Evarisk#576 [ODT] add: more data for responsible and title on certifi…
Browse files Browse the repository at this point in the history
…cate document
  • Loading branch information
nicolas-eoxia committed Apr 25, 2024
1 parent 13afc87 commit 3d2de0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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/';
Expand All @@ -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'] = '';
}

Expand Down
Binary file not shown.

0 comments on commit 3d2de0a

Please sign in to comment.