From b0c32c98155eed6646c389c2bc3cbf91523c178f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrick=20M=C3=BCller?= <p.mueller@pcsg.de>
Date: Wed, 16 Mar 2022 13:21:46 +0100
Subject: [PATCH] refactor: put contact person in address

---
 src/QUI/ERP/Accounting/Invoice/InvoiceTemporary.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/QUI/ERP/Accounting/Invoice/InvoiceTemporary.php b/src/QUI/ERP/Accounting/Invoice/InvoiceTemporary.php
index ca6d60d..a15e07e 100644
--- a/src/QUI/ERP/Accounting/Invoice/InvoiceTemporary.php
+++ b/src/QUI/ERP/Accounting/Invoice/InvoiceTemporary.php
@@ -375,6 +375,10 @@ public function getCustomer()
         }
 
         if (!empty($invoiceAddress)) {
+            if (!empty($this->getAttribute('contact_person'))) {
+                $invoiceAddress['contactPerson'] = $this->getAttribute('contact_person');
+            }
+
             $userData['address'] = $invoiceAddress;
 
             if (empty($userData['firstname']) && !empty($invoiceAddress['firstname'])) {
-- 
GitLab