diff --git a/.env b/.env index d30623d..ae45596 100644 --- a/.env +++ b/.env @@ -83,9 +83,9 @@ STRIPE_PK=pk_test_51SUA22173W4aeFB1nO6oFfDZ12HOTffDKtCshhZ8rkUg6kUO2ZaQC0tK72rhE STRIPE_SK=sk_test_51SUA22173W4aeFB16EB2LxGI0hNvNJzFshDI98zRImWBIhSfzqOGAz5TlPxSpUWbj3x4COm6kmSsaal9FpQR1A7M0022DvjbbR STRIPE_WEBHOOKS_SECRET= -SIGN_URL=https://81dd-82-67-166-187.ngrok-free.app -STRIPE_BASEURL=https://81dd-82-67-166-187.ngrok-free.app -CONTRAT_BASEURL=https://81dd-82-67-166-187.ngrok-free.app +SIGN_URL=https://012d-212-114-31-239.ngrok-free.app +STRIPE_BASEURL=https://012d-212-114-31-239.ngrok-free.app +CONTRAT_BASEURL=https://012d-212-114-31-239.ngrok-free.app MINIO_S3_URL= MINIO_S3_CLIENT_ID= diff --git a/src/Entity/Devis.php b/src/Entity/Devis.php index 17a237c..a33def6 100644 --- a/src/Entity/Devis.php +++ b/src/Entity/Devis.php @@ -121,6 +121,11 @@ class Devis return $this->orderSession; } + public function getFormule(): ?Formules + { + return $this->orderSession?->getFormule(); + } + public function setOrderSession(?OrderSession $orderSession): static { $this->orderSession = $orderSession; diff --git a/src/Service/Pdf/DevisPdfService.php b/src/Service/Pdf/DevisPdfService.php index 1ead686..2e171a8 100644 --- a/src/Service/Pdf/DevisPdfService.php +++ b/src/Service/Pdf/DevisPdfService.php @@ -133,6 +133,14 @@ class DevisPdfService extends Fpdf $this->SetY($this->GetY() + 8); // --- TABLEAU DES PRODUITS --- + $formule = $this->devis->getFormule(); + if ($formule) { + $this->SetFont('Arial', 'B', 10); + $this->SetTextColor(37, 99, 235); + $this->Cell(0, 6, $this->clean("Formule appliquée : " . $formule->getName()), 0, 1, 'L'); + $this->Ln(2); + } + $this->SetFont('Arial', 'B', 8); $this->SetFillColor(245, 247, 250); $this->Cell(70, 10, $this->clean('Désignation'), 1, 0, 'L', true);