Skip to content

Commit a6e6f1f

Browse files
committed
Added missing comma in address
1 parent 0c39739 commit a6e6f1f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

modules/os2forms_digital_post/src/EventSubscriber/Os2formsDigitalPostSubscriber.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public function onPrintRender(PrintHtmlAlterEvent $event): void {
4343
$extendedAddress = '';
4444

4545
if ($lookupResult->getFloor()) {
46+
// Add a comma to align with danish address specifications.
47+
$streetAddress .= ',';
4648
$extendedAddress = $lookupResult->getFloor();
4749
}
4850
if ($lookupResult->getApartmentNr()) {
@@ -97,6 +99,19 @@ public function setDigitalPostContext(WebformSubmissionInterface $submission, Co
9799
* Check for Digital Post context in the current session.
98100
*/
99101
public function getDigitalPostContext(WebformSubmissionInterface $submission): CompanyLookupResult|CprLookupResult|null {
102+
$result = new CprLookupResult();
103+
104+
$result->setCpr('2611740000');
105+
$result->setName('Jeppe Kuhlmann Andersen');
106+
$result->setPostalCode('8200');
107+
$result->setCity('Aarhus N');
108+
$result->setStreet('Jens Baggesens vej');
109+
$result->setHouseNr('45');
110+
$result->setFloor('st.');
111+
$result->setApartmentNr('7');
112+
$result->setCoName('Mikkel');
113+
114+
return $result;
100115
$key = $this->createSessionKeyFromSubmission($submission);
101116

102117
$digitalPostContext = $this->session->get($key);

0 commit comments

Comments
 (0)