Skip to content

Commit

Permalink
Temporary workaround at the request of SIM for Aanslag->BezwaarMogelijk
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Sep 7, 2023
1 parent 811d8d3 commit 6d2d624
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/Service/SimTaxService.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,21 @@ public function getAanslagen(array $vraagBericht): Response

// Then fetch synced aanslagen through cacheService.
$aanslagen = $this->cacheService->searchObjects(null, $filter, [$this::SCHEMA_REFS['Aanslagbiljet']]);


// TODO: this is a temporary workaround at the request of SIM

Check warning on line 230 in src/Service/SimTaxService.php

View workflow job for this annotation

GitHub Actions / build

Comment refers to a TODO task "this is a temporary workaround at the request of SIM"

Check warning on line 230 in src/Service/SimTaxService.php

View workflow job for this annotation

GitHub Actions / build

Comment refers to a TODO task "this is a temporary workaround at the request of SIM"
// This will set the Aanslag "bezwaarMogelijk" to false if one of it's "aanslagregels" has "bezwaarMogelijk" set to false.

Check warning on line 231 in src/Service/SimTaxService.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 130 characters

Check warning on line 231 in src/Service/SimTaxService.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 130 characters
foreach ($aanslagen['results'] as $aanslag) {
if (isset($aanslag['embedded']['aanslagregels']) === false) {
continue;
}
foreach ($aanslag['embedded']['aanslagregels'] as $aanslagregel) {
if ($aanslagregel['bezwaarMogelijk'] == false) {
$aanslag['bezwaarMogelijk'] = false;
break;
}
}
}

$aanslagen['vraagbericht'] = $vraagBericht;

$responseContext = $this->mappingService->mapping($mapping, $aanslagen);
Expand Down

0 comments on commit 6d2d624

Please sign in to comment.