Skip to content
Code-Schnipsel Gruppen Projekte
Commit 7f4faa87 erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

refactor: address display -> use default user contact person name if none set explicitly

Übergeordneter 7530fd29
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"quiqqer\/watcher": ">=0.12|dev-master|dev-dev", "quiqqer\/watcher": ">=0.12|dev-master|dev-dev",
"quiqqer\/translator": "1.*|dev-master|dev-dev", "quiqqer\/translator": "1.*|dev-master|dev-dev",
"quiqqer\/employee": "1.*|dev-master|dev-dev", "quiqqer\/employee": "1.*|dev-master|dev-dev",
"quiqqer\/customer": "1.*|dev-master|dev-dev", "quiqqer\/customer": "^1.1|dev-master|dev-dev",
"quiqqer\/qui-php": "1.*|>=0.11|dev-master|dev-dev", "quiqqer\/qui-php": "1.*|>=0.11|dev-master|dev-dev",
"quiqqer\/smarty3": ">=1.7|dev-master|dev-dev", "quiqqer\/smarty3": ">=1.7|dev-master|dev-dev",
"quiqqer\/countries": ">=1.3|dev-master|dev-dev", "quiqqer\/countries": ">=1.3|dev-master|dev-dev",
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
namespace QUI\ERP; namespace QUI\ERP;
use QUI; use QUI;
use QUI\ERP\Customer\Utils as CustomerUtils;
/** /**
* Class Address * Class Address
...@@ -56,6 +57,12 @@ public function getDisplay($options = []): string ...@@ -56,6 +57,12 @@ public function getDisplay($options = []): string
if (!empty($this->getAttribute('contactPerson'))) { if (!empty($this->getAttribute('contactPerson'))) {
$contactPerson = $this->getAttribute('contactPerson'); $contactPerson = $this->getAttribute('contactPerson');
} elseif ($this->User) {
$ContactPersonAddress = CustomerUtils::getInstance()->getContactPersonAddress($this->User);
if ($ContactPersonAddress) {
$contactPerson = $ContactPersonAddress->getName();
}
} }
if ((bool)Defaults::conf('general', 'contactPersonOnAddress') === false) { if ((bool)Defaults::conf('general', 'contactPersonOnAddress') === false) {
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren