Skip to content

Commit

Permalink
ITKDev: Update src/Plugin/os2web/DataLookup/DatafordelerPNumber.php
Browse files Browse the repository at this point in the history
Co-authored-by: Mikkel Ricky <[email protected]>
  • Loading branch information
cableman and rimi-itk authored May 8, 2024
1 parent 2ffdfac commit baf72a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Plugin/os2web/DataLookup/DatafordelerPNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ public function lookup(string $param): CompanyLookupResult {
$cvrResult->setFloor($address->CVRAdresse_etagebetegnelse ?? '');
$cvrResult->setApartmentNr($address->CVRAdresse_doerbetegnelse ?? '');
$cvrResult->setPostalCode($address->CVRAdresse_postnummer ?? '');
$city = ($address->CVRAdresse_postdistrikt ?? '') . $cvrResult->getPostalCode() ?? '';
$city = implode(' ', array_filter([
$address->CVRAdresse_postdistrikt ?? NULL,
$cvrResult->getPostalCode() ?? NULL,
]);
$cvrResult->setCity($city);
$cvrResult->setMunicipalityCode($address->CVRAdresse_kommunekode ?? '');
$address = $cvrResult->getStreet() . ' ' . $cvrResult->getHouseNr() . ' ' . $cvrResult->getFloor() . $cvrResult->getApartmentNr();
Expand Down

0 comments on commit baf72a3

Please sign in to comment.