Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

* [PR-22](https://github.com/OS2web/os2web_datalookup/pull/22)
Set actual identifier from lookup on lookup result

## [3.0.0] - 2025-06-18

* [PR-13](https://github.com/OS2web/os2web_datalookup/pull/13)
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/os2web/DataLookup/DatafordelerCVR.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function lookup(string $param): CompanyLookupResult {
$cvrResult = new CompanyLookupResult();
if ($result && isset($result->virksomhed) && !empty((array) $result->virksomhed)) {
$cvrResult->setSuccessful();
$cvrResult->setCvr($param);
$cvrResult->setCvr($result->virksomhed->CVRNummer);

if ($result->virksomhedsnavn) {
$cvrResult->setName($result->virksomhedsnavn->vaerdi);
Expand Down
1 change: 1 addition & 0 deletions src/Plugin/os2web/DataLookup/ServiceplatformenCPR.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public function lookup(string $cpr): CprLookupResult {
// If all goes well, we return an address array.
if ($result['status']) {
$cprResult->setSuccessful();
// @todo Use a value from from $result to set CPR. But which key?
$cprResult->setCpr($cpr);
$cprResult->setName($result['adresseringsnavn'] ?? '');
$cprResult->setStreet($result['vejadresseringsnavn'] ?? '');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ public function lookup(string $cpr, $fetchChildren = TRUE, $allowCprTestModeRepl
// If all goes well, we return an address array.
if ($result['status']) {
$cprResult->setSuccessful();
$cprResult->setCpr($cpr);

$persondata = $result['persondata'];
$cprResult->setCpr($persondata->personnummer);

if ($persondata->status) {
if ($persondata->status->status == self::CPR_STATUS_DEAD) {
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/os2web/DataLookup/ServiceplatformenCVR.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function lookup(string $param): CompanyLookupResult {
$cvrResult = new CompanyLookupResult();
if ($result['status']) {
$cvrResult->setSuccessful();
$cvrResult->setCvr($param);
$cvrResult->setCvr($result['cvr']);

$cvrResult->setName($result['company_name']);
$cvrResult->setStreet($result['company_street']);
Expand Down
Loading