From b56afa97fe6158bc5b4d348c2e9c866e7f401d23 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 16 Oct 2023 16:59:35 +0200 Subject: [PATCH] wip #6374 @0.25 --- src/app/Models/User.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/app/Models/User.php b/src/app/Models/User.php index e9ea5b4..02e022a 100644 --- a/src/app/Models/User.php +++ b/src/app/Models/User.php @@ -189,6 +189,17 @@ class User extends CubistMagicAuthenticatable implements HasLocalePreference } public function getAllTreeInfosAttribute() + { + $res = $this->getBasicTreeInfosAttribute(); + + $invoicable = Permissions::getInvoicableCompany($this->company); + if ($invoicable != $this->company) { + $res .= '
(€ : ' . Permissions::getCompanyName($invoicable) . ')'; + } + return $res; + } + + public function getBasicTreeInfosAttribute() { $name = $this->name; $res = ''; @@ -196,12 +207,6 @@ class User extends CubistMagicAuthenticatable implements HasLocalePreference $res .= $name . '
'; } $res .= ' ' . $this->companyName . ''; - - $invoicable = Permissions::getInvoicableCompany($this->company); - if ($invoicable != $this->company) { - $res .= '
(€ : ' . Permissions::getCompanyName($invoicable) . ')'; - } - //$res .= '
' . $this->getAdministratorFirstname(); return $res; } -- 2.39.5