fixes accent and special characters, wip bon de commande

This commit is contained in:
Tiavina 2025-01-22 11:18:37 +03:00
parent ae3ec3df33
commit b9155813ba
4 changed files with 8 additions and 8 deletions

View File

@ -955,7 +955,7 @@ class Bdd {
$this->update_lieu_date_devis_rang_ligneTrajet($ligne_trajet, $column, htmlentities(rtrim($data)), $idNextcloud); $this->update_lieu_date_devis_rang_ligneTrajet($ligne_trajet, $column, htmlentities(rtrim($data)), $idNextcloud);
} else { } else {
$sql = "UPDATE ".$this->tableprefix.$table." SET $column = ? WHERE `id` = ?"; $sql = "UPDATE ".$this->tableprefix.$table." SET $column = ? WHERE `id` = ?";
$this->execSQLNoData($sql, array(htmlentities(rtrim($data)), $id)); $this->execSQLNoData($sql, array(trim($data), $id));
} }
return true; return true;
} }
@ -2510,7 +2510,7 @@ class Bdd {
$factureId = $this->getFactureIdByDevisId($devisId); $factureId = $this->getFactureIdByDevisId($devisId);
//update devis status //update devis status
$this->gestion_update('devis','mentions','facturé',$devisId,$idNextcloud); $this->gestion_update('devis','mentions','facturé',$devisId,$idNextcloud);
return $factureId; return $factureId;
} }

View File

@ -128,16 +128,16 @@ 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;
} }

View File

@ -75,7 +75,7 @@ class InvoicePdfHandler extends FPDF {
public function GetMultipleInvoiceFilename($month,$year){ public function GetMultipleInvoiceFilename($month,$year){
$filename = ""; $filename = "";
foreach($this->multipleFactureData as $factureData){ foreach($this->multipleFactureData as $factureData){
$filename = strtoupper($factureData["client_entreprise"]); $filename = mb_strtoupper($factureData["client_entreprise"],'UTF-8');
$filename .= $month != 0 ? '_'.DateHelpers::GetMonthPlainString($month) :''; $filename .= $month != 0 ? '_'.DateHelpers::GetMonthPlainString($month) :'';
$filename .= "_".$year; $filename .= "_".$year;
break; break;
@ -87,7 +87,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

@ -132,7 +132,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');