folder names and filename to upper utf 8 fix, WIP update message talk

This commit is contained in:
Tiavina 2025-01-22 15:46:10 +03:00
parent 06c1cc9be0
commit f86bd18695
3 changed files with 12 additions and 12 deletions

View File

@ -155,31 +155,31 @@ class CertificateService {
private function getCareCertificateFolder($devisOfDefunt){ private function getCareCertificateFolder($devisOfDefunt){
$careCertificateFolder = 'CLIENTS/' $careCertificateFolder = 'CLIENTS/'
.strtoupper($devisOfDefunt["client_entreprise"]) .mb_strtoupper($devisOfDefunt["client_entreprise"],'UTF-8')
.'/DEFUNTS/' .'/DEFUNTS/'
.strtoupper($devisOfDefunt["defunt_nom"]).'/' .mb_strtoupper($devisOfDefunt["defunt_nom"],'UTF-8').'/'
.'ATTESTATION/'; .'ATTESTATION/';
return $careCertificateFolder; return $careCertificateFolder;
} }
private function GetCareCertificateFilename($devisOfDefunt){ private function GetCareCertificateFilename($devisOfDefunt){
$filename = 'ATTESTATION_SOIN_'.strtoupper($devisOfDefunt['defunt_nom']); $filename = 'ATTESTATION_SOIN_'.mb_strtoupper($devisOfDefunt['defunt_nom'],'UTF-8');
return $filename; return $filename;
} }
private function getPacemakerCertificateFolder($devisOfDefunt){ private function getPacemakerCertificateFolder($devisOfDefunt){
$folder = 'CLIENTS/' $folder = 'CLIENTS/'
.strtoupper($devisOfDefunt["client_entreprise"]) .mb_strtoupper($devisOfDefunt["client_entreprise"],'UTF-8')
.'/DEFUNTS/' .'/DEFUNTS/'
.strtoupper($devisOfDefunt["defunt_nom"]).'/' .mb_strtoupper($devisOfDefunt["defunt_nom"],'UTF-8').'/'
.'ATTESTATION/'; .'ATTESTATION/';
return $folder; return $folder;
} }
private function getPacemakerCertificateFilename($devisOfDefunt){ private function getPacemakerCertificateFilename($devisOfDefunt){
$filename = 'ATTESTATION_PACEMAKER_'.strtoupper($devisOfDefunt['defunt_nom']); $filename = 'ATTESTATION_PACEMAKER_'.mb_strtoupper($devisOfDefunt['defunt_nom'],'UTF-8');
return $filename; return $filename;
} }

View File

@ -77,10 +77,10 @@ class InvoicePdfHandler extends FPDF {
foreach($this->multipleFactureData as $factureData){ foreach($this->multipleFactureData as $factureData){
$factureType = $factureData["facture_type"]; $factureType = $factureData["facture_type"];
if($factureType == MultipleFactureTypeConstant::CLIENT_FILTER_TYPE){ if($factureType == MultipleFactureTypeConstant::CLIENT_FILTER_TYPE){
$filename = strtoupper($factureData["client_entreprise"]); $filename = mb_strtoupper($factureData["client_entreprise"],'UTF-8');
} }
else{ else{
$filename = 'GROUP_'.strtoupper($factureData["client_entreprise"]); $filename = 'GROUP_'.mb_strtoupper($factureData["client_entreprise"],'UTF-8');
} }
$filename .= $month != 0 ? '_'.DateHelpers::GetMonthPlainString($month) :''; $filename .= $month != 0 ? '_'.DateHelpers::GetMonthPlainString($month) :'';
$filename .= "_".$year; $filename .= "_".$year;
@ -93,7 +93,7 @@ class InvoicePdfHandler extends FPDF {
$factureNum = $this->factureData['num']; $factureNum = $this->factureData['num'];
$factureNum = str_replace('/','-',$factureNum); $factureNum = str_replace('/','-',$factureNum);
$defuntNom = str_replace(' ',' ',$this->factureData['defunt_nom']); $defuntNom = str_replace(' ',' ',$this->factureData['defunt_nom']);
return $this->factureData['configuration']->facture_prefixe.'_'.$factureNum.'_'.strtoupper($defuntNom); return $this->factureData['configuration']->facture_prefixe.'_'.$factureNum.'_'.mb_strtoupper($defuntNom,'UTF-8');
} }
private function DrawInvoiceCompanyAndClientInfo(){ private function DrawInvoiceCompanyAndClientInfo(){

View File

@ -101,8 +101,8 @@ class InvoicePdfService {
} }
private function getFacturesFolder(array $factureData,$racinePath){ private function getFacturesFolder(array $factureData,$racinePath){
$clientRacineFolder = $racinePath.'CLIENTS/'.strtoupper($factureData["client_entreprise"]).'/'; $clientRacineFolder = $racinePath.'CLIENTS/'.mb_strtoupper($factureData["client_entreprise"],'UTF-8').'/';
$defuntsFolder = $clientRacineFolder.'DEFUNTS/'.strtoupper($factureData['defunt_nom']).'/'.'FACTURES'.'/'; $defuntsFolder = $clientRacineFolder.'DEFUNTS/'.mb_strtoupper($factureData['defunt_nom'],'UTF-8').'/'.'FACTURES'.'/';
$devisDate = $factureData['devis_date']; $devisDate = $factureData['devis_date'];
$devisDatetime = new DateTime($devisDate); $devisDatetime = new DateTime($devisDate);
$devisDateYear = $devisDatetime->format('Y'); $devisDateYear = $devisDatetime->format('Y');
@ -135,7 +135,7 @@ class InvoicePdfService {
$pdf->MutlipleInvoicePdfFactory($invoiceData,$logo); $pdf->MutlipleInvoicePdfFactory($invoiceData,$logo);
$pdf->SetMultipleFactureContent(); $pdf->SetMultipleFactureContent();
$racinePath = html_entity_decode(string: $currentConfig->path).'/'; $racinePath = html_entity_decode(string: $currentConfig->path).'/';
$clientRacineFolder = $racinePath.'CLIENTS/'.strtoupper($invoiceData[0]["client_entreprise"]).'/'; $clientRacineFolder = $racinePath.'CLIENTS/'.mb_strtoupper($invoiceData[0]["client_entreprise"],'UTF-8').'/';
$filename = $currentConfig->facture_prefixe.'_'.$pdf->GetMultipleInvoiceFilename($month,$year); $filename = $currentConfig->facture_prefixe.'_'.$pdf->GetMultipleInvoiceFilename($month,$year);
$filenamePath = $clientRacineFolder.$filename.'.pdf'; $filenamePath = $clientRacineFolder.$filename.'.pdf';
$pdfContent = $pdf->Output('','S'); $pdfContent = $pdf->Output('','S');