From 86c6580cc20421eab40d84c98575ea8073e8b723 Mon Sep 17 00:00:00 2001 From: narindraezway Date: Fri, 8 Aug 2025 11:39:46 +0300 Subject: [PATCH] HFC : add footer email to real admin of app --- gestion/lib/Controller/InvoiceController.php | 8 +++++++- gestion/lib/Controller/PageController.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gestion/lib/Controller/InvoiceController.php b/gestion/lib/Controller/InvoiceController.php index 2dfbe6d..b07492d 100644 --- a/gestion/lib/Controller/InvoiceController.php +++ b/gestion/lib/Controller/InvoiceController.php @@ -109,7 +109,7 @@ class InvoiceController extends Controller $message->attach($content); $message->setSubject("Facture"); - $signature = $this->mailerService->getFooterContent(); + $signature = $this->mailerService->getFooterContent($this->getUserNameForEmailSignature()); $message->setHtmlBody( "

Bonjour.

". @@ -126,4 +126,10 @@ class InvoiceController extends Controller } return new DataResponse("E-mail envoyé avec succès à ".$email.".", 200, ['Content-Type' => 'application/json']); } + + public function getUserNameForEmailSignature (){ + $configs = json_decode($this->gestionRepository->getConfiguration(BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD)); + $currentConfig = $configs[0]; + return $currentConfig->nom . " " . $currentConfig->prenom; + } } \ No newline at end of file diff --git a/gestion/lib/Controller/PageController.php b/gestion/lib/Controller/PageController.php index 957dc86..63df257 100644 --- a/gestion/lib/Controller/PageController.php +++ b/gestion/lib/Controller/PageController.php @@ -1636,7 +1636,7 @@ class PageController extends Controller { } } public function getUserNameForEmailSignature (){ - $configs = json_decode($this->myDb->getConfiguration(self::DEFAULT_NEXTCLOUD_ADMIN)); + $configs = json_decode($this->myDb->getConfiguration(BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD)); $currentConfig = $configs[0]; return $currentConfig->nom . " " . $currentConfig->prenom; }