From 2a30b70e2a3a94879d1a8b131e5bc64be70d3e14 Mon Sep 17 00:00:00 2001 From: Tiavina Date: Mon, 20 Jan 2025 13:32:05 +0300 Subject: [PATCH] set nom prenom of client lieu in facture and devis instead of client_entreprise --- gestion/lib/Db/Bdd.php | 2 ++ gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php | 4 +++- gestion/lib/Service/InvoicePdfHandler.php | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gestion/lib/Db/Bdd.php b/gestion/lib/Db/Bdd.php index 727cbd5..f8e55d2 100644 --- a/gestion/lib/Db/Bdd.php +++ b/gestion/lib/Db/Bdd.php @@ -2186,6 +2186,7 @@ class Bdd { devis.num as calendar_uuid, devis.comment as devis_comment, client.nom as client_nom, + client.prenom as client_prenom, client.entreprise as client_entreprise, client.adresse as client_adresse, defunt.nom as defunt_nom, @@ -2340,6 +2341,7 @@ class Bdd { devis.devis_full_number as devis_full_number, devis.comment as devis_comment, client.nom as client_nom, + client.prenom as client_prenom, client.entreprise as client_entreprise, client.adresse as client_adresse, defunt.nom as defunt_nom, diff --git a/gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php b/gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php index 9791dd1..a2243a1 100644 --- a/gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php +++ b/gestion/lib/Service/Devis/Pdf/DevisPdfHandler.php @@ -74,7 +74,9 @@ class DevisPdfHandler extends FPDF { $this->SetY(40); $this->SetFont('Arial', '', 12); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['configuration']->entreprise), 0, 0); - $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['client_entreprise']), 0, 1,'R'); + $this->Cell(0, 7, FileExportHelpers::FormatTextForExport( + $this->devisData['client_nom']. ' '. $this->devisData['client_prenom']), +0, 1,'R'); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['configuration_adresse']), 0, 0); $this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->devisData['client_real_adress'])), 0, 1,'R'); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->devisData['configuration_adresse_city']), 0, 0);border: diff --git a/gestion/lib/Service/InvoicePdfHandler.php b/gestion/lib/Service/InvoicePdfHandler.php index 5d0e5b5..c933fb9 100644 --- a/gestion/lib/Service/InvoicePdfHandler.php +++ b/gestion/lib/Service/InvoicePdfHandler.php @@ -94,7 +94,9 @@ class InvoicePdfHandler extends FPDF { $this->SetY(40); $this->SetFont('Arial', '', 12); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['configuration']->entreprise), 0, 0); - $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['client_entreprise']), 0, 1,'R'); + $this->Cell(0, 7, FileExportHelpers::FormatTextForExport( + $this->factureData['client_nom']. ' '.$this->factureData['client_prenom']), +0, 1,'R'); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['configuration_adresse']), 0, 0); $this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->factureData['client_real_adress'])), 0, 1,'R'); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['configuration_adresse_city']), 0, 0);border: