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.
This commit is contained in:
Jepp9350
2025-04-15 11:32:18 +02:00
parent 627e4d87c2
commit dfe3950866
@@ -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';
}
/**