From 563fae3ba954a655244ad5a888b7a51eaf6e9774 Mon Sep 17 00:00:00 2001 From: Robert Zondervan Date: Mon, 11 Mar 2024 11:31:12 +0100 Subject: [PATCH] Add code for toestemming hoofdbewoner --- Service/RelocationService.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Service/RelocationService.php b/Service/RelocationService.php index 41bdfb7..d242e10 100644 --- a/Service/RelocationService.php +++ b/Service/RelocationService.php @@ -125,7 +125,7 @@ public function getRelocationProperties(ObjectEntity $object, array $objectArray $objectArray['newAddress']['addressFunction'] = 'LIVING_ADDRESS'; // @TODO cant make a difference yet between LIVING or MAILING ADDRESS $objectArray['newAddress']['numberOfResidents'] = $caseProperties['AANTAL_PERS_NIEUW_ADRES']; $objectArray['newAddress']['destinationCurrentResidents'] = 'Unknown'; - $objectArray['newAddress']['liveIn'] = ['liveInApplicable' => false]; // @TODO for other than Maastricht this could be something else + $objectArray['newAddress']['liveIn'] = ['liveInApplicable' => false]; $objectArray['declarant'] = $objectArray['newAddress']['mainOccupant'] = [ 'bsn' => $caseProperties['BSN'], 'contactInformation' => [ @@ -134,6 +134,13 @@ public function getRelocationProperties(ObjectEntity $object, array $objectArray ], ]; + if(isset($caseProperties['BSN_HOOFDBEWONER']) === true) { + $objectArray['newAddress']['mainOccupant'] = [ + 'bsn' => $caseProperties['BSN_HOOFDBEWONER'], + ]; + $objectArray['newAddress']['liveIn'] = ['liveInApplicable' => true]; + } + $relocators = $this->getRelocators($caseProperties); $objectArray['relocators'] = $relocators;