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

refactor: output -> use correct address contact person

Übergeordneter ce152708
Keine zugehörigen Branchen gefunden
Tags 2.3.4
Keine zugehörigen Merge Requests gefunden
......@@ -117,25 +117,23 @@ public static function getTemplateData($entityId)
]);
}
$Editor = $Invoice->getEditor();
$addressId = $Invoice->getAttribute('invoice_address_id');
$address = [];
$Editor = $Invoice->getEditor();
if ($Invoice->getAttribute('invoice_address')) {
$address = \json_decode($Invoice->getAttribute('invoice_address'), true);
}
if (!empty($address)) {
$Address = new QUI\ERP\Address($address, $Customer);
try {
$Address = $Customer->getStandardAddress();
$Address->clearMail();
$Address->clearPhone();
} else {
try {
$Address = $Customer->getAddress($addressId);
$Address->clearMail();
$Address->clearPhone();
} catch (QUI\Exception $Exception) {
$Address = null;
} catch (QUI\Exception $Exception) {
$Address = null;
if ($Invoice->getAttribute('invoice_address')) {
$address = \json_decode($Invoice->getAttribute('invoice_address'), true);
if (!empty($address)) {
$Address = new QUI\ERP\Address($address, $Customer);
$Address->clearMail();
$Address->clearPhone();
}
}
}
......@@ -178,7 +176,7 @@ public static function getTemplateData($entityId)
// order number
$orderNumber = '';
if ($InvoiceView->getAttribute('order_id')) {
try {
$Order = QUI\ERP\Order\Handler::getInstance()->getOrderById($InvoiceView->getAttribute('order_id'));
......
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