diff --git a/gestion/lib/Db/Bdd.php b/gestion/lib/Db/Bdd.php index f8e55d2..c3a2c42 100644 --- a/gestion/lib/Db/Bdd.php +++ b/gestion/lib/Db/Bdd.php @@ -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; } diff --git a/gestion/lib/Service/Certificate/CertificateService.php b/gestion/lib/Service/Certificate/CertificateService.php index 3119bc1..1894e08 100644 --- a/gestion/lib/Service/Certificate/CertificateService.php +++ b/gestion/lib/Service/Certificate/CertificateService.php @@ -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; } diff --git a/gestion/lib/Service/InvoicePdfHandler.php b/gestion/lib/Service/InvoicePdfHandler.php index 6018f5a..b5a220e 100644 --- a/gestion/lib/Service/InvoicePdfHandler.php +++ b/gestion/lib/Service/InvoicePdfHandler.php @@ -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 :"))); diff --git a/gestion/lib/Service/InvoicePdfService.php b/gestion/lib/Service/InvoicePdfService.php index ad03db8..792358a 100644 --- a/gestion/lib/Service/InvoicePdfService.php +++ b/gestion/lib/Service/InvoicePdfService.php @@ -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');