From a8b1c2cb8d8988167a03c06add1cc86d6a4b4d00 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 1 Nov 2023 10:39:02 +1100 Subject: [PATCH] Fixes for e-invoices without a valid shipping address --- app/Services/Invoice/EInvoice/ZugferdEInvoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Invoice/EInvoice/ZugferdEInvoice.php b/app/Services/Invoice/EInvoice/ZugferdEInvoice.php index 56e0e7161107..5d7b938d9629 100644 --- a/app/Services/Invoice/EInvoice/ZugferdEInvoice.php +++ b/app/Services/Invoice/EInvoice/ZugferdEInvoice.php @@ -73,7 +73,7 @@ class ZugferdEInvoice extends AbstractService } else { $this->xrechnung->setDocumentBuyerReference($client->routing_id); } - if (!empty($client->shipping_address1) && $client->shipping_country->exists()) { + if (!empty($client->shipping_address1) && $client->shipping_country) { $this->xrechnung->setDocumentShipToAddress($client->shipping_address1, $client->shipping_address2, "", $client->shipping_postal_code, $client->shipping_city, $client->shipping_country->iso_3166_2, $client->shipping_state); }