From dfe3950866459df7ed62e3617715c728b67f3465 Mon Sep 17 00:00:00 2001 From: Jepp9350 <2jepp9350@gmail.com> Date: Tue, 15 Apr 2025 11:32:18 +0200 Subject: [PATCH] Fix default values for country and currency in customer data Previously, the country and currency fields could return null if not explicitly set. This update ensures that 'Ukendt' is returned as the default country and 'DKK' as the default currency when no value is provided, enhancing data consistency. --- .../nginx/app/modules/economic/helpers/economic_customer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/nginx/app/modules/economic/helpers/economic_customer.php b/services/nginx/app/modules/economic/helpers/economic_customer.php index 2e8bf96e..1911f433 100644 --- a/services/nginx/app/modules/economic/helpers/economic_customer.php +++ b/services/nginx/app/modules/economic/helpers/economic_customer.php @@ -191,7 +191,7 @@ class economic_customer public function getCountry(): string { self::requireSelected(); - return $this->customer_data_object->country; + return $this->customer_data_object->country ?? 'Ukendt'; } /** @@ -213,7 +213,7 @@ class economic_customer public function getCurrency(): string { self::requireSelected(); - return $this->customer_data_object->currency; + return $this->customer_data_object->currency ?? 'DKK'; } /**