Skip to content

Commit

Permalink
Merge pull request #599 from evarisk-kilyan/fix_fatal_on_certificate_…
Browse files Browse the repository at this point in the history
…doc_creation

#598 fix: fatal on certificat doc creation
  • Loading branch information
nicolas-eoxia authored Sep 11, 2024
2 parents 4dbdbae + 70ccc1c commit a352035
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ public function write_file(SaturneDocuments $objectDocument, Translate $outputLa
$tmpArray['object_date_end'] = dol_print_date($object->date_end, 'day', 'tzuser');
$tmpArray['object_public_url'] = $object->public_url;

$signatory = $signatory->fetchSignatory('Signatory', $object->id, $object->element);
if (is_array($signatory) && !empty($signatory)) {
$signatory = array_shift($signatory);
$signatories = $signatory->fetchSignatory('Signatory', $object->id, $object->element);
if (is_array($signatories) && !empty($signatories)) {
$signatory = array_shift($signatories);
$tmpArray['attendant_fullname'] = strtoupper($signatory->lastname) . ' ' . ucfirst($signatory->firstname);
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)) {
Expand All @@ -115,9 +115,9 @@ public function write_file(SaturneDocuments $objectDocument, Translate $outputLa
$tmpArray['attendant_signature'] = '';
}

$signatory = $signatory->fetchSignatory('Responsible', $object->id, $object->element);
if (is_array($signatory) && !empty($signatory)) {
$signatory = array_shift($signatory);
$signatories = $signatory->fetchSignatory('Responsible', $object->id, $object->element);
if (is_array($signatories) && !empty($signatories)) {
$signatory = array_shift($signatories);
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 Down

0 comments on commit a352035

Please sign in to comment.