Skip to content

Commit

Permalink
Evarisk#3436 [Documents] fix: set Absent instead of N/A in document
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-micka committed Oct 17, 2023
1 parent 43e0de7 commit cac76a0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function setAttendantsSegment(Odf $odfHandler, Translate $outputLangs, ar

if ($foundTagForLines) {
if ( ! empty($extsocietyintervenants) && $extsocietyintervenants > 0) {
$k = 3;
$k = 3;
foreach ($extsocietyintervenants as $line) {
if ($line->status == 5) {
if (($moreParam['specimen'] == 0 && $object->status >= $object::STATUS_LOCKED)) {
Expand All @@ -226,10 +226,10 @@ public function setAttendantsSegment(Odf $odfHandler, Translate $outputLangs, ar
file_put_contents($tempdir . "signature" . $k . ".png", $decoded_image);
$tmpArray['intervenants_signature'] = $tempdir . "signature" . $k . ".png";
} else {
$tmpArray['intervenants_signature'] = '';
$tmpArray['intervenants_signature'] = $langs->transnoentities('Absent');
}
} else {
$tmpArray['intervenants_signature'] = '';
$tmpArray['intervenants_signature'] = $langs->transnoentities('Absent');
}
$tmpArray['name'] = $line->firstname;
$tmpArray['lastname'] = $line->lastname;
Expand All @@ -241,7 +241,6 @@ public function setAttendantsSegment(Odf $odfHandler, Translate $outputLangs, ar

$this->setTmpArrayVars($tmpArray, $listLines, $outputLangs);


if (($moreParam['specimen'] == 0 && $object->status >= $object::STATUS_LOCKED)) {
dol_delete_file($tempdir . "signature" . $k . ".png");
}
Expand Down Expand Up @@ -439,10 +438,10 @@ public function write_file(SaturneDocuments $objectDocument, Translate $outputLa
file_put_contents($tempDir . 'signature.png', $decodedImage);
$tmpArray['maitre_oeuvre_signature'] = $tempDir . 'signature.png';
} else {
$tmpArray['maitre_oeuvre_signature'] = '';
$tmpArray['maitre_oeuvre_signature'] = $langs->transnoentities('Absent');
}
} else {
$tmpArray['maitre_oeuvre_signature'] = '';
$tmpArray['maitre_oeuvre_signature'] = $langs->transnoentities('Absent');
}

// External society responsible
Expand All @@ -468,10 +467,10 @@ public function write_file(SaturneDocuments $objectDocument, Translate $outputLa
file_put_contents($tempDir . 'signature2.png', $decodedImage);
$tmpArray['intervenant_exterieur_signature'] = $tempDir . 'signature2.png';
} else {
$tmpArray['intervenant_exterieur_signature'] = '';
$tmpArray['intervenant_exterieur_signature'] = $langs->transnoentities('Absent');
}
} else {
$tmpArray['intervenant_exterieur_signature'] = '';
$tmpArray['intervenant_exterieur_signature'] = $langs->transnoentities('Absent');
}

$moreParam['tmparray'] = $tmpArray;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function setAttendantsSegment(Odf $odfHandler, Translate $outputLangs, ar

if ($foundTagForLines) {
if ( ! empty($extsocietyintervenants) && $extsocietyintervenants > 0) {
$k = 3;
$k = 3;
foreach ($extsocietyintervenants as $line) {
if ($line->status == 5) {
if (($moreParam['specimen'] == 0 && $object->status >= $object::STATUS_LOCKED)) {
Expand All @@ -200,10 +200,10 @@ public function setAttendantsSegment(Odf $odfHandler, Translate $outputLangs, ar
file_put_contents($tempdir . "signature" . $k . ".png", $decoded_image);
$tmpArray['intervenants_signature'] = $tempdir . "signature" . $k . ".png";
} else {
$tmpArray['intervenants_signature'] = '';
$tmpArray['intervenants_signature'] = $langs->transnoentities('Absent');
}
} else {
$tmpArray['intervenants_signature'] = '';
$tmpArray['intervenants_signature'] = $langs->transnoentities('Absent');
}
$tmpArray['name'] = $line->firstname;
$tmpArray['lastname'] = $line->lastname;
Expand All @@ -215,7 +215,6 @@ public function setAttendantsSegment(Odf $odfHandler, Translate $outputLangs, ar

$this->setTmpArrayVars($tmpArray, $listLines, $outputLangs);


if (($moreParam['specimen'] == 0 && $object->status >= $object::STATUS_LOCKED)) {
dol_delete_file($tempdir . "signature" . $k . ".png");
}
Expand Down Expand Up @@ -373,10 +372,10 @@ public function write_file(SaturneDocuments $objectDocument, Translate $outputLa
file_put_contents($tempDir . 'signature.png', $decodedImage);
$tmpArray['maitre_oeuvre_signature'] = $tempDir . 'signature.png';
} else {
$tmpArray['maitre_oeuvre_signature'] = '';
$tmpArray['maitre_oeuvre_signature'] = $langs->transnoentities('Absent');
}
} else {
$tmpArray['maitre_oeuvre_signature'] = '';
$tmpArray['maitre_oeuvre_signature'] = $langs->transnoentities('Absent');
}

// External society responsible
Expand All @@ -402,10 +401,10 @@ public function write_file(SaturneDocuments $objectDocument, Translate $outputLa
file_put_contents($tempDir . 'signature2.png', $decodedImage);
$tmpArray['intervenant_exterieur_signature'] = $tempDir . 'signature2.png';
} else {
$tmpArray['intervenant_exterieur_signature'] = '';
$tmpArray['intervenant_exterieur_signature'] = $langs->transnoentities('Absent');
}
} else {
$tmpArray['intervenant_exterieur_signature'] = '';
$tmpArray['intervenant_exterieur_signature'] = $langs->transnoentities('Absent');
}

$moreParam['tmparray'] = $tmpArray;
Expand Down
Binary file not shown.

0 comments on commit cac76a0

Please sign in to comment.