Merge branch 'hotfixes/hotfix-accent-and-bon-de-commande' into releases/release-h2f

This commit is contained in:
Tiavina 2025-01-22 11:34:15 +03:00
commit 96ca3c3ff8
4 changed files with 15 additions and 16 deletions

View File

@ -955,7 +955,7 @@ class Bdd {
$this->update_lieu_date_devis_rang_ligneTrajet($ligne_trajet, $column, htmlentities(rtrim($data)), $idNextcloud);
} else {
$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;
}
@ -2510,7 +2510,7 @@ class Bdd {
$factureId = $this->getFactureIdByDevisId($devisId);
//update devis status
$this->gestion_update('devis','mentions','facturé',$devisId,$idNextcloud);
$this->gestion_update('devis','mentions','facturé',$devisId,$idNextcloud);
return $factureId;
}

View File

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

View File

@ -75,7 +75,7 @@ class InvoicePdfHandler extends FPDF {
public function GetMultipleInvoiceFilename($month,$year){
$filename = "";
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 .= "_".$year;
break;
@ -87,7 +87,7 @@ class InvoicePdfHandler extends FPDF {
$factureNum = $this->factureData['num'];
$factureNum = str_replace('/','-',$factureNum);
$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(){
@ -125,7 +125,13 @@ class InvoicePdfHandler extends FPDF {
$this->Cell(40, 7, $this->factureData['num'], 1, 0, 'C');
$this->Cell(40, 7, $factureDateEcheance, 1, 1, 'C');
$this->Ln(8);
$this->Ln(4);
$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,'C');
}
}
private function DrawArticlesTable(){
@ -212,13 +218,6 @@ class InvoicePdfHandler extends FPDF {
$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 :")));

View File

@ -132,7 +132,7 @@ class InvoicePdfService {
$pdf->MutlipleInvoicePdfFactory($invoiceData,$logo);
$pdf->SetMultipleFactureContent();
$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);
$filenamePath = $clientRacineFolder.$filename.'.pdf';
$pdfContent = $pdf->Output('','S');