File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
src/Plugin/os2web/DataLookup Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
+ * Ensure postal code is only added to city if ` CVRAdresse_postdistrikt ` is not set.
10
11
* Added missing use statement to fix issue on datafordeler settings pages
11
12
` pnumber_lookup ` , ` cvr_lookup ` and ` cpr_lookup ` .
12
13
Original file line number Diff line number Diff line change @@ -94,10 +94,7 @@ public function lookup(string $param): CompanyLookupResult {
94
94
$ cvrResult ->setFloor ($ address ->CVRAdresse_etagebetegnelse ?? '' );
95
95
$ cvrResult ->setApartmentNr ($ address ->CVRAdresse_doerbetegnelse ?? '' );
96
96
$ cvrResult ->setPostalCode ($ address ->CVRAdresse_postnummer ?? '' );
97
- $ city = implode (' ' , array_filter ([
98
- $ address ->CVRAdresse_postdistrikt ?? NULL ,
99
- $ cvrResult ->getPostalCode () ?? NULL ,
100
- ]));
97
+ $ city = $ address ->CVRAdresse_postdistrikt ?? $ cvrResult ->getPostalCode ();
101
98
$ cvrResult ->setCity ($ city );
102
99
$ cvrResult ->setMunicipalityCode ($ address ->CVRAdresse_kommunekode ?? '' );
103
100
You can’t perform that action at this time.
0 commit comments