Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit 11fa14de erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: consider non address object and address api

Übergeordneter 3f3aad45
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!30Next,!29Dev
......@@ -52,7 +52,7 @@ public function getDisplay($options = []): string
}
$contactPerson = '';
$isCompany = false;
$isCompany = false;
if ($this->User && $this->User->isCompany()) {
$isCompany = $this->User->isCompany();
......@@ -77,14 +77,14 @@ public function getDisplay($options = []): string
}
$salutation = $this->emptyStringCheck($this->getAttribute('salutation'));
$street_no = $this->emptyStringCheck($this->getAttribute('street_no'));
$zip = $this->emptyStringCheck($this->getAttribute('zip'));
$city = $this->emptyStringCheck($this->getAttribute('city'));
$country = $this->emptyStringCheck($this->getAttribute('country'));
$suffix = $this->emptyStringCheck($this->getAttribute('suffix'));
$street_no = $this->emptyStringCheck($this->getAttribute('street_no'));
$zip = $this->emptyStringCheck($this->getAttribute('zip'));
$city = $this->emptyStringCheck($this->getAttribute('city'));
$country = $this->emptyStringCheck($this->getAttribute('country'));
$suffix = $this->emptyStringCheck($this->getAttribute('suffix'));
$firstname = $this->getAttribute('firstname');
$lastname = $this->getAttribute('lastname');
$lastname = $this->getAttribute('lastname');
if (empty($firstname) && $this->User) {
$firstname = $this->User->getAttribute('firstname');
......@@ -96,26 +96,30 @@ public function getDisplay($options = []): string
$Engine->assign([
'User' => $this->User,
'Address' => $this,
'User' => $this->User,
'Address' => $this,
'Countries' => new QUI\Countries\Manager(),
'options' => $options,
'isCompany' => $isCompany,
'salutation' => $salutation,
'firstname' => $this->emptyStringCheck($firstname),
'lastname' => $this->emptyStringCheck($lastname),
'street_no' => $street_no,
'zip' => $zip,
'city' => $city,
'country' => $country,
'options' => $options,
'isCompany' => $isCompany,
'salutation' => $salutation,
'firstname' => $this->emptyStringCheck($firstname),
'lastname' => $this->emptyStringCheck($lastname),
'street_no' => $street_no,
'zip' => $zip,
'city' => $city,
'country' => $country,
'contactPerson' => $this->emptyStringCheck($contactPerson),
'suffix' => $suffix
'suffix' => $suffix
]);
return $Engine->fetch(dirname(__FILE__) . '/Address.html');
}
public function save($PermissionUser = null)
{
}
/**
* @param $value
* @return string
......
......@@ -194,7 +194,10 @@ public static function convertUserToErpUser(QUI\Interfaces\Users\User $User)
if (!QUI::getUsers()->isNobodyUser($User) && !QUI::getUsers()->isSystemUser($User)) {
/* @var $Address QUI\Users\Address */
$Address = $User->getStandardAddress();
$address = $Address->getAttributes();
if ($Address) {
$address = $Address->getAttributes();
}
}
$data = $User->getAttributes();
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren