From 6fae232d4924adfb3baf0e43dfcbe57380389cb4 Mon Sep 17 00:00:00 2001 From: Tiavina Date: Mon, 30 Dec 2024 14:31:31 +0300 Subject: [PATCH] fix utf 8 on csv , and update logo used in facture --- .../lib/Service/ExportClientStatisticService.php | 6 +++--- .../lib/Service/ExportThanatoStatisticService.php | 14 +++++++------- gestion/lib/Service/InvoicePdfHandler.php | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gestion/lib/Service/ExportClientStatisticService.php b/gestion/lib/Service/ExportClientStatisticService.php index d1e16c1..8c2a1ca 100644 --- a/gestion/lib/Service/ExportClientStatisticService.php +++ b/gestion/lib/Service/ExportClientStatisticService.php @@ -50,15 +50,15 @@ class ExportClientStatisticService { $filename .= $client['client_nom'] . '-' . $client['client_entreprise'] . '--'; } $filename = rtrim($filename, '-'); - return $filename; + return utf8_decode(html_entity_decode($filename)); } public function getExportClientFileHeader(): string{ $fileHeader = 'Client'.';'. 'Mois'.';'. - 'Année'.';'. - 'Nb defunts'.';'. + utf8_decode(html_entity_decode('Année')).';'. + utf8_decode(html_entity_decode('Nb défunts')).';'. 'Nb articles'.';'. 'Total HT'.';'. "\n"; diff --git a/gestion/lib/Service/ExportThanatoStatisticService.php b/gestion/lib/Service/ExportThanatoStatisticService.php index 3459197..e139a98 100644 --- a/gestion/lib/Service/ExportThanatoStatisticService.php +++ b/gestion/lib/Service/ExportThanatoStatisticService.php @@ -52,22 +52,22 @@ class ExportThanatoStatisticService { $filename .= $thanato['thanato_nom'] . '-' . $thanato['thanato_prenom'] . '--'; } $filename = rtrim($filename, '-'); - return $filename; + return utf8_decode(html_entity_decode($filename)); } public function getExportThanatoFileHeader(): string{ $fileHeader = 'Thanatopracteur'.';'. 'Date'.';'. - 'Heure Debut'.';'. - 'Heure Fin'.';'. + utf8_decode(html_entity_decode('Heure de début')).';'. + 'Heure de fin'.';'. 'Soins'.';'. - utf8_decode(html_entity_decode('Jour/Ferie')).';'. + utf8_decode(html_entity_decode('Jour/Férié')).';'. utf8_decode(html_entity_decode('Nom et Prénom')).';'. 'Lieu'.';'. - 'Pompe funebre'.';'. - 'Pompe funebre adresse'.';'. - 'Distance Total (km)'.';'. + utf8_decode(html_entity_decode('Pompe funèbre')).';'. + utf8_decode(html_entity_decode('Pompe funèbre adresse')).';'. + 'Distance Totale (km)'.';'. "\n"; return $fileHeader; } diff --git a/gestion/lib/Service/InvoicePdfHandler.php b/gestion/lib/Service/InvoicePdfHandler.php index a10c6f6..43957c2 100644 --- a/gestion/lib/Service/InvoicePdfHandler.php +++ b/gestion/lib/Service/InvoicePdfHandler.php @@ -33,7 +33,7 @@ class InvoicePdfHandler extends FPDF { private $factureData = []; private $logo = null; - private $logoPath = "/var/www/html/custom_apps/gestion/img/"; + private $logoPath = "/var/www/html/data/admin/files/.gestion/"; function Header() {