From: Vincent Vanwaelscappel Date: Mon, 16 Oct 2023 14:59:35 +0000 (+0200) Subject: wip #6374 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b56afa97fe6158bc5b4d348c2e9c866e7f401d23;p=cubedesigners_userdatabase.git wip #6374 @0.25 --- 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; }