From 9158618c983debc474cbfeb32b3804bbcdc80534 Mon Sep 17 00:00:00 2001 From: Tiavina Date: Mon, 20 Jan 2025 19:19:37 +0300 Subject: [PATCH] fix bon de commande on devis and facture, location of devis on care certificate, Mr mme on care certifcate --- gestion/lib/Service/Certificate/CertificateService.php | 8 ++++++++ .../PdfHandler/CareCertificatePdfHandler.php | 6 +++--- gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php | 2 +- gestion/lib/Service/InvoicePdfHandler.php | 10 +++++++++- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/gestion/lib/Service/Certificate/CertificateService.php b/gestion/lib/Service/Certificate/CertificateService.php index 38c1590..3119bc1 100644 --- a/gestion/lib/Service/Certificate/CertificateService.php +++ b/gestion/lib/Service/Certificate/CertificateService.php @@ -97,6 +97,14 @@ class CertificateService { $devisOfDefunt["configuration"] = $currentConfig; $devisOfDefunt["thanato_date_habilitation"] = new DateTimeImmutable($devisOfDefunt["thanato_date_habilitation"]); $devisOfDefunt["devis_date"] = new DateTimeImmutable($devisOfDefunt["devis_date"]); + $locationOfDevis = ""; + if($devisOfDefunt['lieu_nom'] != null){ + $locationOfDevis .= $devisOfDefunt['lieu_nom']; + } + if($devisOfDefunt['lieu_adresse'] != null){ + $locationOfDevis .= " ". $devisOfDefunt['lieu_adresse']; + } + $devisOfDefunt['location_of_devis'] = $locationOfDevis; $clean_folder = html_entity_decode(string: $currentConfig->path).'/'; $careCertificateFolder = $this->getCareCertificateFolder($devisOfDefunt); $folderDestination = $clean_folder.$careCertificateFolder; diff --git a/gestion/lib/Service/Certificate/PdfHandler/CareCertificatePdfHandler.php b/gestion/lib/Service/Certificate/PdfHandler/CareCertificatePdfHandler.php index 61bd26f..79208bf 100644 --- a/gestion/lib/Service/Certificate/PdfHandler/CareCertificatePdfHandler.php +++ b/gestion/lib/Service/Certificate/PdfHandler/CareCertificatePdfHandler.php @@ -83,15 +83,15 @@ class CareCertificatePdfHandler extends FPDF { $this->SetFont('Arial', '', 14); $this->MultiCell(0,7,FileExportHelpers::FormatTextForExport('La Société '. $this->devisOfDefunt['configuration']->entreprise. ' habilitée sous le numéro ' . $this->devisOfDefunt['thanato_reference'] . ' certifie par la présente que: ')); $this->SetFont('Arial', 'B', 14); - $this->Cell(0,12, 'Mr/Mlle ' . FileExportHelpers::FormatTextForExport($this->devisOfDefunt['thanato_nom'] . ' ' . $this->devisOfDefunt['thanato_prenom']),0,1); + $this->Cell(0,12, 'Mr/Mme ' . FileExportHelpers::FormatTextForExport($this->devisOfDefunt['thanato_nom'] . ' ' . $this->devisOfDefunt['thanato_prenom']),0,1); $this->SetFont('Arial', '', 14); $this->MultiCell(0,7, FileExportHelpers::FormatTextForExport('Employé au sein de notre société et titulaire du diplôme national de Thanatopracteur a effectué des soins de conservation sur le corps du défunt:')); $this->SetFont('Arial', 'B', 14); - $this->Cell(0,12, 'M./Mme '.$this->devisOfDefunt['defunt_nom'],0,1); + $this->Cell(0,12, 'Mr/Mme '.$this->devisOfDefunt['defunt_nom'],0,1); $this->SetFont('Arial', '', 14); $this->Cell(0,12, FileExportHelpers::FormatTextForExport("Qui reposait à l'adresse suivante") . ': ',0,1); $this->SetFont('Arial', 'B', 14); - $this->Cell(0,12, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['configuration']->adresse),0,1); + $this->Cell(0,12, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['location_of_devis']),0,1); $this->SetFont('Arial', '', 14); $this->Cell(0,12, FileExportHelpers::FormatTextForExport("La présente attestion est établie pour faire valoir ce que de droit."),0,5); $this->Ln(5); diff --git a/gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php b/gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php index 6f4f43d..1dbd5d2 100644 --- a/gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php +++ b/gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php @@ -190,7 +190,7 @@ class DevisPdfHandler extends FPDF { $this->SetFont('Arial', '', 11); $ibanWidth = 90; $ibanCursorY = $this->GetY(); - $this->Cell($ibanWidth, 7, 'IBAN : FR76 1360 6000 1436 5418 1800 038', 1, 1, 'C'); + $this->Cell($ibanWidth, 7, 'IBAN : FR76 3000 3030 7700 0200 2057 074', 1, 1, 'C'); $ibanCursorX = $this->GetX(); $this->Cell($ibanWidth, 7, 'Code SWIFT : AGRI FR PP 836', 1, 1, 'C'); diff --git a/gestion/lib/Service/InvoicePdfHandler.php b/gestion/lib/Service/InvoicePdfHandler.php index 018cb92..d4ed384 100644 --- a/gestion/lib/Service/InvoicePdfHandler.php +++ b/gestion/lib/Service/InvoicePdfHandler.php @@ -213,6 +213,14 @@ class InvoicePdfHandler extends FPDF { private function DrawBankAndTotalPriceInfo($totalPriceArray){ $this->SetY(210); $this->SetFont('Arial', '', 9); + + $devisComment = ($this->factureData['devis_comment'] == "Commentaire" || $this->factureData['devis_comment'] == "" ? "" : $this->factureData['devis_comment']); + if($devisComment != ""){ + $this->SetFont('Arial', 'B', 9); + $this->Cell(0,5,"Bon de commande: ". $devisComment,0,1); + $this->Ln(3); + } + $this->SetFont('Arial', '', 9); $this->MultiCell(0,5,utf8_decode(html_entity_decode("Paiement à votre convenance par chèque à l'ordre de ". $this->factureData['configuration']->entreprise))); $this->MultiCell(0,5,utf8_decode(html_entity_decode("en indiquant le numéro de facture, ou par virement :"))); @@ -222,7 +230,7 @@ class InvoicePdfHandler extends FPDF { $this->SetFont('Arial', '', 11); $ibanWidth = 90; $ibanCursorY = $this->GetY(); - $this->Cell($ibanWidth, 7, 'IBAN : FR76 1360 6000 1436 5418 1800 038', 1, 1, 'C'); + $this->Cell($ibanWidth, 7, 'IBAN : FR76 3000 3030 7700 0200 2057 074', 1, 1, 'C'); $ibanCursorX = $this->GetX(); $this->Cell($ibanWidth, 7, 'Code SWIFT : AGRI FR PP 836', 1, 1, 'C');