Merge branch 'fixes/fix-adresses-on-bijou-and-soin-pdf' into releases/release-hytha

This commit is contained in:
Tiavina 2025-02-13 09:58:45 +03:00
commit a90327384d
2 changed files with 26 additions and 23 deletions

View File

@ -1993,8 +1993,8 @@ class PageController extends Controller {
$nomDefunt = $defunt->nom_defunt; $nomDefunt = $defunt->nom_defunt;
$age = $this->calculAge($defunt->date_naissance); $age = $this->calculAge($defunt->date_naissance);
$date_devis_temp = date("t-m-Y", strtotime($defunt->date)); $date_devis_temp = date("d-m-Y", strtotime($defunt->date));
$date_temp = date("t-m-Y", strtotime(date('Y-m-d'))); $date_temp = date("d-m-Y", strtotime(date('Y-m-d')));
$formatter = new IntlDateFormatter('fr_FR', IntlDateFormatter::LONG, IntlDateFormatter::NONE); $formatter = new IntlDateFormatter('fr_FR', IntlDateFormatter::LONG, IntlDateFormatter::NONE);
$date_devis = $formatter->format(DateTime::createFromFormat('d-m-Y', $date_devis_temp)); $date_devis = $formatter->format(DateTime::createFromFormat('d-m-Y', $date_devis_temp));
@ -2028,8 +2028,9 @@ class PageController extends Controller {
$pdf->setXY(15, 55); $pdf->SetFont('ComicSans', 'B', 15); $pdf->Cell(80, 10, 'RAPPORT DE SOIN', 1, 1, 'C'); $pdf->setXY(15, 55); $pdf->SetFont('ComicSans', 'B', 15); $pdf->Cell(80, 10, 'RAPPORT DE SOIN', 1, 1, 'C');
$pdf->SetY(60); $pdf->SetY(68);
$pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Bourges France le, ".$today)), '', 'R'); $pdf->SetFont('ComicSans', '', 10);
$pdf->MultiCell(0, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->adresse.", le ".$today), '', 'R');
$pdf->SetY($pdf->GetY()+15); $pdf->SetY($pdf->GetY()+15);
$pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode($nomDefunt."\n".$age."ans\n".(strcmp($defunt->sexe, 'm')==0 ? 'Masculin' : 'Féminin'))), '', 'L'); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode($nomDefunt."\n".$age."ans\n".(strcmp($defunt->sexe, 'm')==0 ? 'Masculin' : 'Féminin'))), '', 'L');
@ -2090,9 +2091,9 @@ class PageController extends Controller {
$pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->drainage_etat)), 'LR', 'C'); $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->drainage_etat)), 'LR', 'C');
$pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY()); $pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY());
$pdf->SetY(-30); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $defaultConfig[0]->legal_one))), '', 'C'); $pdf->SetY(-30); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_one), '', 'C');
$pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $defaultConfig[0]->legal_two))), '', 'C'); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_two), '', 'C');
$pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $defaultConfig[0]->telephone))), '', 'C'); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->telephone), '', 'C');
$pdf->AddPage(); $pdf->AddPage();
@ -2157,9 +2158,9 @@ class PageController extends Controller {
$col_width = round(($pdf->GetPageWidth()-30)/2); $col_width = round(($pdf->GetPageWidth()-30)/2);
foreach ($observations as $key => $obs) { foreach ($observations as $key => $obs) {
if($pdf->getY()>=($pdf->GetPageHeight()-45)) { if($pdf->getY()>=($pdf->GetPageHeight()-45)) {
$pdf->SetY(-30); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $defaultConfig[0]->legal_one))), '', 'C'); $pdf->SetY(-30); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_one), '', 'C');
$pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $defaultConfig[0]->legal_two))), '', 'C'); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_two), '', 'C');
$pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $defaultConfig[0]->telephone))), '', 'C'); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->telephone), '', 'C');
$pdf->AddPage(); $pdf->AddPage();
} }
$pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($obs->designation)), 'LTRB', 'L'); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($obs->designation)), 'LTRB', 'L');
@ -2169,9 +2170,9 @@ class PageController extends Controller {
$pdf->setY($pdf->GetY()+10); $pdf->setY($pdf->GetY()+10);
if($pdf->getY()>=($pdf->GetPageHeight()-45)) { if($pdf->getY()>=($pdf->GetPageHeight()-45)) {
$pdf->SetY(-30); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $defaultConfig[0]->legal_one))), '', 'C'); $pdf->SetY(-30); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_one), '', 'C');
$pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $defaultConfig[0]->legal_two))), '', 'C'); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_two), '', 'C');
$pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $defaultConfig[0]->telephone))), '', 'C'); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->telephone), '', 'C');
$pdf->AddPage(); $pdf->AddPage();
} }
@ -2189,9 +2190,9 @@ class PageController extends Controller {
$pdf->setY($pdf->GetY()-5); $pdf->setY($pdf->GetY()-5);
$pdf->SetFont('ComicSans','',11); $pdf->Cell( $pdf->GetPageWidth()-80, 0, "Pour :", 0, 0, 'R'); $pdf->SetFont('ComicSans','',11); $pdf->Cell( $pdf->GetPageWidth()-80, 0, "Pour :", 0, 0, 'R');
$pdf->SetY(-30); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $defaultConfig[0]->legal_one))), '', 'C'); $pdf->SetY(-30); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_one), '', 'C');
$pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $defaultConfig[0]->legal_two))), '', 'C'); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_two), '', 'C');
$pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, utf8_decode(html_entity_decode(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $defaultConfig[0]->telephone))), '', 'C'); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->telephone), '', 'C');
$pdf->AddPage(); $pdf->AddPage();
$pdf->Image($this->src_path.(($defunt->sexe=='m'?'facehomme.jpg':'facefemme.jpg')), 0, 0, $pdf->GetPageWidth(), $pdf->GetPageHeight()); $pdf->Image($this->src_path.(($defunt->sexe=='m'?'facehomme.jpg':'facefemme.jpg')), 0, 0, $pdf->GetPageWidth(), $pdf->GetPageHeight());
@ -2256,7 +2257,8 @@ class PageController extends Controller {
$bijoux = json_decode($this->myDb->getListBijoux($numdefunt, $this->idNextcloud)); $bijoux = json_decode($this->myDb->getListBijoux($numdefunt, $this->idNextcloud));
try { try {
$nomDefunt = $defunt->nom_defunt; $nomDefunt = $defunt->nom_defunt;
$date_temp = date("t-m-Y", strtotime(date('Y-m-d'))); $date_temp = new Datetime($defunt->date);
$date_temp = $date_temp->format('d-m-Y');
$formatter = new IntlDateFormatter('fr_FR', IntlDateFormatter::LONG, IntlDateFormatter::NONE); $formatter = new IntlDateFormatter('fr_FR', IntlDateFormatter::LONG, IntlDateFormatter::NONE);
$today = $formatter->format(DateTime::createFromFormat('d-m-Y', $date_temp)); $today = $formatter->format(DateTime::createFromFormat('d-m-Y', $date_temp));
@ -2290,7 +2292,7 @@ class PageController extends Controller {
$pdf->SetMargins(15,15,15); $pdf->SetMargins(15,15,15);
$pdf->SetY(65); $pdf->SetFont('ComicSans', '', 10); $pdf->SetY(65); $pdf->SetFont('ComicSans', '', 10);
$pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Je soussignée ".$defunt->prenom_thanato." ".strtoupper($defunt->nom_thanato).", Thanatopracteur, agissant pour le compte de la société ".strtoupper($current_config[0]->entreprise)." titulaire de l'habilitation n° ".$defunt->reference_habilitation." atteste par la présente que : $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Je soussignée ".$defunt->prenom_thanato." ".strtoupper($defunt->nom_thanato).", Thanatopracteur, agissant pour le compte de la société ".strtoupper($defaultConfig[0]->entreprise)." titulaire de l'habilitation n° ".$defunt->reference_habilitation." atteste par la présente que :
".(strcmp($defunt->sexe, 'm')==0 ? 'Monsieur' : 'Madame').". ".$defunt->nom_defunt." ".(strcmp($defunt->sexe, 'm')==0 ? 'Monsieur' : 'Madame').". ".$defunt->nom_defunt."
a été pris(e) en charge par nos services pour des soins mortuaires.")), '','J',0); a été pris(e) en charge par nos services pour des soins mortuaires.")), '','J',0);
@ -2340,8 +2342,9 @@ class PageController extends Controller {
$pdf->setY($pdf->GetY()+10); $pdf->setY($pdf->GetY()+10);
$pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Cette attestation est remise pour faire valoir ce que de droit. $pdf->SetFont('ComicSans', '', 10);
Fait à Bourges France ".$today)), '','J',0); $pdf->MultiCell(0, 5, FileExportHelpers::FormatTextForExport("Cette attestation est remise pour faire valoir ce que de droit.
Fait à ".$defaultConfig[0]->adresse.", le ".$today), '','J',0);
$pdf->setY($pdf->GetY()+10); $pdf->setY($pdf->GetY()+10);

View File

@ -219,7 +219,7 @@ class InvoiceRecapService {
// date facture // date facture
$clientInfoYAxis += 7; $clientInfoYAxis += 7;
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis); $pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
$pdf->Cell( 0, 7, "Saint Senoux, le ".utf8_decode($date_formated)); $pdf->Cell( 0, 7, "le ".utf8_decode($date_formated));
// observations // observations
$objetYAxis = 110; $objetYAxis = 110;
@ -626,7 +626,7 @@ class InvoiceRecapService {
$clientInfoYAxis += 7; $clientInfoYAxis += 7;
$pdf->SetXY($clientInfoXAxis,$clientInfoYAxis); $pdf->SetXY($clientInfoXAxis,$clientInfoYAxis);
// date facture // date facture
$pdf->Cell( 0, 7, "Saint Senoux, le ".utf8_decode($date_formated)); $pdf->Cell( 0, 7, "le ".utf8_decode($date_formated));
// observations // observations
$objetYAxis = 110; $objetYAxis = 110;