From 486357834b37c4a1179937c423c867a45516d7bf Mon Sep 17 00:00:00 2001 From: narindraezway Date: Thu, 28 Aug 2025 16:12:45 +0300 Subject: [PATCH] DV : add defunt date certificat PM , change police text to Arial , remove directily Johan --- gestion/lib/Db/Bdd.php | 1 + gestion/lib/Helpers/FileExportHelpers.php | 4 ++-- .../Certificate/CertificateService.php | 4 ++-- .../PdfHandler/CareCertificatePdfHandler.php | 2 ++ .../PacemakerCertificatePdfHandler.php | 2 ++ .../lib/Service/Devis/Pdf/DevisPdfHandler.php | 19 ++++++++-------- gestion/lib/Service/InvoicePdfHandler.php | 22 +++++++++---------- gestion/lib/Service/InvoicePdfService.php | 12 +++++----- gestion/lib/Service/MailerService.php | 2 +- 9 files changed, 36 insertions(+), 32 deletions(-) diff --git a/gestion/lib/Db/Bdd.php b/gestion/lib/Db/Bdd.php index 8eaa7a1..d458a73 100644 --- a/gestion/lib/Db/Bdd.php +++ b/gestion/lib/Db/Bdd.php @@ -3806,6 +3806,7 @@ class Bdd { defunt.ref_pacemaker as defunt_reference_pacemaker, defunt.product_brand as defunt_product_brand, defunt.product_reference as defunt_product_reference, + defunt.date as defunt_date, client.nom as client_nom, client.prenom as client_prenom, client.mail as client_mail, diff --git a/gestion/lib/Helpers/FileExportHelpers.php b/gestion/lib/Helpers/FileExportHelpers.php index 55b0412..011e46f 100644 --- a/gestion/lib/Helpers/FileExportHelpers.php +++ b/gestion/lib/Helpers/FileExportHelpers.php @@ -16,8 +16,8 @@ class FileExportHelpers } public static function GetAddressAndCityFromAddress(string $adresse){ - $adresseResult = "Aucun adresse"; - $cityResult = "Aucune ville"; + $adresseResult = ""; + $cityResult = ""; $adresses = explode("-",$adresse); if(isset($adresses[0])){ $adresseResult = self::RemoveSpaceFromString($adresses[0]); diff --git a/gestion/lib/Service/Certificate/CertificateService.php b/gestion/lib/Service/Certificate/CertificateService.php index bd2d541..309e04a 100644 --- a/gestion/lib/Service/Certificate/CertificateService.php +++ b/gestion/lib/Service/Certificate/CertificateService.php @@ -215,8 +215,8 @@ class CertificateService { $pdfFilename = $this->getPacemakerCertificateFilename($devisOfDefunt); $filenamePath = $clean_folder.$pacemakerCertificateFolder.$pdfFilename.'.pdf'; $pdf = new PacemakerCertificatePdfHandler(); - $pdf->AddFont('ComicSans','','Comic Sans MS.php'); - $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); + // $pdf->AddFont('ComicSans','','Comic Sans MS.php'); + // $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); $signatureImageExist = $this->signatureImageExists(); $tamponImageExist = $this->tamponImageExist(); $pdf->SetPacemakerCertificateData($devisOfDefunt,$logo,$signatureImageExist ,$tamponImageExist); diff --git a/gestion/lib/Service/Certificate/PdfHandler/CareCertificatePdfHandler.php b/gestion/lib/Service/Certificate/PdfHandler/CareCertificatePdfHandler.php index dacd3d7..306f6d3 100644 --- a/gestion/lib/Service/Certificate/PdfHandler/CareCertificatePdfHandler.php +++ b/gestion/lib/Service/Certificate/PdfHandler/CareCertificatePdfHandler.php @@ -94,6 +94,8 @@ class CareCertificatePdfHandler extends FPDF { $this->MultiCell(0,7, FileExportHelpers::FormatTextForExport('Employé(e) 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, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['defunt_nom']),0,1); + $this->SetFont('Arial', '', 14); + $this->Cell(0, 12, FileExportHelpers::FormatTextForExport("Date du décès") . ' : ' . $this->devisOfDefunt['defunt_date'] , 0, 1); $this->SetFont('Arial', '', 14); // $this->Cell(0,12, FileExportHelpers::FormatTextForExport("Qui reposait à l'adresse suivante") . ' : ',0,1); // $this->SetFont('Arial', 'B', 14); diff --git a/gestion/lib/Service/Certificate/PdfHandler/PacemakerCertificatePdfHandler.php b/gestion/lib/Service/Certificate/PdfHandler/PacemakerCertificatePdfHandler.php index dbab590..3be2d3a 100644 --- a/gestion/lib/Service/Certificate/PdfHandler/PacemakerCertificatePdfHandler.php +++ b/gestion/lib/Service/Certificate/PdfHandler/PacemakerCertificatePdfHandler.php @@ -98,6 +98,8 @@ class PacemakerCertificatePdfHandler extends FPDF $this->MultiCell(0, 7, FileExportHelpers::FormatTextForExport('Employé(e) au sein de notre société et titulaire du diplôme national de Thanatopracteur, a retiré ce jour, une prothèse fonctionnant au moyen d\'une pile implantée dans le corps du défunt :')); $this->SetFont('Arial', 'B', 14); $this->Cell(0, 12, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['defunt_nom']), 0, 1); + $this->SetFont('Arial', '', 14); + $this->Cell(0, 12, FileExportHelpers::FormatTextForExport("Date du décès") . ' : ' . $this->devisOfDefunt['defunt_date'] , 0, 1); //$this->SetFont('Arial', '', 14); //$this->Cell(0, 12, FileExportHelpers::FormatTextForExport("Qui reposait à l'adresse suivante") . ' : ', 0, 1); //$this->SetFont('Arial', 'B', 14); diff --git a/gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php b/gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php index de7970b..a6dcafb 100644 --- a/gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php +++ b/gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php @@ -49,14 +49,14 @@ class DevisPdfHandler extends FPDF function Footer() { $this->SetY(-40); - $this->SetFont('ComicSans', '', 7); + $this->SetFont('Arial', '', 7); $this->MultiCell(0, 5, utf8_decode(html_entity_decode('Tout retard de paiement entraînera de plein droit une pénalité de retard de 3 fois le taux légal ( Loi 2008-776 du 4 août 2008) et une indemnité forfaitaire de 40 EUR pour frais de recouvrement sera appliquée.'))); $this->Ln(1); $this->MultiCell(0, 5, utf8_decode(html_entity_decode('Si les frais de recouvrement sont supérieurs à ce montant forfaitaire, une indemnisation complémentaire sera due sur présentation de justificatifs ( articles L.441-3 et L.441-6 du code de commerce ). '))); $this->SetY(-15); - $this->SetFont('ComicSans', 'B', 8); + $this->SetFont('Arial', 'B', 8); $this->Cell(0, 10, utf8_decode(html_entity_decode($this->devisData['configuration']->legal_one)), 0, 0, 'C'); } @@ -75,13 +75,12 @@ class DevisPdfHandler extends FPDF private function DrawDevisCompanyAndClientInfo() { $this->SetY(40); - $this->SetFont('ComicSans', '', 12); + $this->SetFont('Arial', '', 12); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['configuration']->entreprise), 0, 0); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['client_nom']), 0, 1, 'R'); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['configuration_adresse']), 0, 0); $this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->devisData['client_real_adress'])), 0, 1, 'R'); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['configuration_adresse_city']), 0, 0); - border: $this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->devisData['client_adress_city'])), 0, 1, 'R'); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport('Tél : ') . FileExportHelpers::FormatTextForExport($this->devisData['configuration']->telephone), 0, 0); $this->Cell(0, 7, 'Siret: ' . $this->devisData['siret'], 0, 1, 'R'); @@ -91,12 +90,12 @@ class DevisPdfHandler extends FPDF private function DrawDevisInfoTable() { - $this->SetFont('ComicSans', 'B', 11); + $this->SetFont('Arial', 'B', 11); $this->Cell(30, 7, 'DATE', 1, 0, 'C'); $this->Cell(80, 7, 'CLIENT', 1, 0, 'C'); $this->Cell(40, 7, 'DEVIS', 1, 1, 'C'); - $this->SetFont('ComicSans', '', 10); + $this->SetFont('Arial', '', 10); $this->Cell(30, 7, $this->devisData['devis_date'], 1, 0, 'C'); $this->Cell(80, 7, utf8_decode(html_entity_decode($this->devisData['client_nom'])), 1, 0, 'C'); $this->Cell(40, 7, $this->devisData['devis_full_number'], 1, 1, 'C'); @@ -120,7 +119,7 @@ class DevisPdfHandler extends FPDF private function DrawArticlesTableHeader() { $tvaValue = $this->devisData["configuration"]->tva_default; - $this->SetFont('ComicSans', '', 10); + $this->SetFont('Arial', '', 10); $this->SetXY(10, 106); $this->Cell(20, 8, "Date", 0, 0, 'C'); @@ -140,7 +139,7 @@ class DevisPdfHandler extends FPDF public function DrawArticlesTableValueAndReturnTotalPrice() { - $this->SetFont('ComicSans', '', 10); + $this->SetFont('Arial', '', 10); $tvaValue = $this->devisData["configuration"]->tva_default; $totalHt = 0; $totalTtc = 0; @@ -187,14 +186,14 @@ class DevisPdfHandler extends FPDF private function DrawBankAndTotalPriceInfo($totalPriceArray) { $this->SetY(210); - $this->SetFont('ComicSans', '', 9); + $this->SetFont('Arial', '', 9); $this->MultiCell(0, 5, utf8_decode(html_entity_decode("Paiement à votre convenance par chèque à l'ordre de " . $this->devisData['configuration']->entreprise))); $this->MultiCell(0, 5, utf8_decode(html_entity_decode("en indiquant le numéro de facture, ou par virement :"))); $this->Ln(1); //Table IBAN - $this->SetFont('ComicSans', '', 11); + $this->SetFont('Arial', '', 11); $ibanWidth = 90; $ibanCursorY = $this->GetY(); $this->Cell($ibanWidth, 7, 'IBAN : FR76 1670 6052 4453 9757 9734 871', 1, 1, 'C'); diff --git a/gestion/lib/Service/InvoicePdfHandler.php b/gestion/lib/Service/InvoicePdfHandler.php index 40baf90..c7a0278 100644 --- a/gestion/lib/Service/InvoicePdfHandler.php +++ b/gestion/lib/Service/InvoicePdfHandler.php @@ -101,7 +101,7 @@ class InvoicePdfHandler extends FPDF function Footer() { $this->SetY(-34); - $this->SetFont('ComicSans', '', 7); + $this->SetFont('Arial', '', 7); $this->MultiCell(0, 4, utf8_decode(html_entity_decode('Tout retard de paiement entraînera de plein droit une pénalité de retard de 3 fois le taux légal '))); $this->MultiCell(0, 4, utf8_decode(html_entity_decode('(Loi 2008-776 du 4 août 2008) et une indemnité forfaitaire de 40 EUR pour frais de recouvrement sera appliquée.'))); @@ -110,7 +110,7 @@ class InvoicePdfHandler extends FPDF $this->MultiCell(0, 4, utf8_decode(html_entity_decode('sera due sur présentation de justificatifs (articles L.441-3 et L.441-6 du code de commerce).'))); $this->SetY(-10); - $this->SetFont('ComicSans', '', 7); + $this->SetFont('Arial', '', 7); $this->Cell(0, 10, utf8_decode(html_entity_decode($this->factureData['configuration']->legal_one)), 0, 0, 'C'); } @@ -154,7 +154,7 @@ class InvoicePdfHandler extends FPDF private function DrawInvoiceCompanyInfo() { $this->SetY(40); - $this->SetFont('ComicSans', '', 10); + $this->SetFont('Arial', '', 10); $this->Cell(0, $this->interLigneHeader, FileExportHelpers::FormatTextForExport($this->factureData['configuration']->entreprise), 0, 1); $this->Cell(0, $this->interLigneHeader, FileExportHelpers::FormatTextForExport($this->factureData['configuration_adresse']), 0, 1); $this->Cell(0, $this->interLigneHeader, FileExportHelpers::FormatTextForExport($this->factureData['configuration_adresse_city']), 0, 1); @@ -163,7 +163,7 @@ class InvoicePdfHandler extends FPDF } private function DrawInvoiceClientInfo() { - $this->SetFont('ComicSans', '', 10); + $this->SetFont('Arial', '', 10); $clientName = $this->factureData['client_nom']; if ($this->factureData["group_name"] != null && $this->factureData["group_name"] != "") { $clientName = $this->factureData['group_name']; @@ -233,14 +233,14 @@ class InvoicePdfHandler extends FPDF $factureDateEcheance->modify('last day of next month'); $factureDateEcheance = $factureDateEcheance->format('d-m-Y'); - $this->SetFont('ComicSans', '', 10); + $this->SetFont('Arial', '', 10); $this->Cell(25, 7, 'DATE', 1, 0, 'C'); $this->Cell(104, 7, 'CLIENT', 1, 0, 'C'); $this->Cell(39, 7, 'FACTURE', 1, 0, 'C'); $this->Cell(36, 7, 'ECHEANCE', 1, 1, 'C'); - $this->SetFont('ComicSans', '', 10); + $this->SetFont('Arial', '', 10); $this->Cell(25, 7, $factureDatePaiement, 1, 0, 'C'); $this->Cell(104, 7, utf8_decode(html_entity_decode($this->factureData['client_nom'])), 1, 0, 'C'); $this->Cell(39, 7, $this->factureData['num'], 1, 0, 'C'); @@ -290,7 +290,7 @@ class InvoicePdfHandler extends FPDF $additionalMargRight = 1; $tvaValue = $this->factureData["configuration"]->tva_default; $columnNameY = $this->startingYOfArticlesTable - 1; - $this->SetFont('ComicSans', '', 10); + $this->SetFont('Arial', '', 10); $this->SetXY(12 + $additionalMargRight, $columnNameY); $this->Cell(7, 10, "Date", 0, 0, 'C'); @@ -309,7 +309,7 @@ class InvoicePdfHandler extends FPDF public function DrawArticlesTableValueAndReturnTotalPrice() { - $this->SetFont('ComicSans', '', 10); + $this->SetFont('Arial', '', 10); $devisDate = $this->factureData['devis_date']; $devisDate = DateTime::createFromFormat('Y-m-d', $devisDate); $devisDate = $devisDate->format('d-m-Y'); @@ -367,7 +367,7 @@ class InvoicePdfHandler extends FPDF { $startOfYAfterMainTable = 236; $this->SetY($startOfYAfterMainTable); - $this->SetFont('ComicSans', '', 8); + $this->SetFont('Arial', '', 8); $this->MultiCell(0, 4, utf8_decode(html_entity_decode("Paiement à votre convenance par chèque à l'ordre de " . $this->factureData['configuration']->entreprise))); $this->MultiCell(0, 4, utf8_decode(html_entity_decode("en indiquant le numéro de facture, ou par virement :"))); @@ -375,7 +375,7 @@ class InvoicePdfHandler extends FPDF $startOftable = 3; $this->SetX($startOftable); // Table IBAN - $this->SetFont('ComicSans', '', 8); + $this->SetFont('Arial', '', 8); $ibanWidth = 62; $this->Cell($ibanWidth, 6.5, 'IBAN : FR76 1670 6052 4453 9757 9734 871', 1, 1, 'C'); $this->SetX($startOftable); @@ -390,7 +390,7 @@ class InvoicePdfHandler extends FPDF $startOfArrayX = $pageWidth - $tableWidth - $marginRight; $startOfArrayY = $startOfYAfterMainTable + 0.5; - $this->SetFont('ComicSans', '', 10); + $this->SetFont('Arial', '', 10); foreach ($totalPriceArray as $label => $price) { $this->SetXY($startOfArrayX, $startOfArrayY); diff --git a/gestion/lib/Service/InvoicePdfService.php b/gestion/lib/Service/InvoicePdfService.php index 640117f..72f30cc 100644 --- a/gestion/lib/Service/InvoicePdfService.php +++ b/gestion/lib/Service/InvoicePdfService.php @@ -93,8 +93,8 @@ class InvoicePdfService { $clean_folder = html_entity_decode(string: $currentConfig->path).'/'; $factureFolders = $this->getFacturesFolder($invoicePdfData,$clean_folder); $pdf = new InvoicePdfHandler(); - $pdf->AddFont('ComicSans','','Comic Sans MS.php'); - $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); + // $pdf->AddFont('ComicSans','','Comic Sans MS.php'); + // $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); $pdf->InvoicePdfFactory($invoicePdfData,$logo); $pdf->SetFactureContent(); $pdfContent = $pdf->Output('','S'); @@ -188,8 +188,8 @@ class InvoicePdfService { $pdf = new InvoiceGroupPdfHandler(); break; } - $pdf->AddFont('ComicSans','','Comic Sans MS.php'); - $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); + // $pdf->AddFont('ComicSans','','Comic Sans MS.php'); + // $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); $pdf->InvoicePdfFactory($invoicePdfData,$logo); $pdf->SetFactureContent(); $pdfContent = $pdf->Output('','S'); @@ -230,8 +230,8 @@ class InvoicePdfService { return null; } $pdf = new InvoicePdfHandler(); - $pdf->AddFont('ComicSans','','Comic Sans MS.php'); - $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); + // $pdf->AddFont('ComicSans','','Comic Sans MS.php'); + // $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); $pdf->MutlipleInvoicePdfFactory($invoiceData,$logo); $pdf->SetMultipleFactureContent(); $racinePath = html_entity_decode(string: $currentConfig->path).'/'; diff --git a/gestion/lib/Service/MailerService.php b/gestion/lib/Service/MailerService.php index bffa126..e0e6d8b 100644 --- a/gestion/lib/Service/MailerService.php +++ b/gestion/lib/Service/MailerService.php @@ -38,7 +38,7 @@ class MailerService { ){ $this->adminStorage = $rootFolder->getUserFolder(BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD); } - public function getFooterContent ($userName = "Johann"){ + public function getFooterContent ($userName = "DEKINDT Vanessa"){ $wish = "

Vous en souhaitant bonne réception.

"; $cordialement = "

Cordialement,

"; $userName = "

{$userName}

" ;