Merge branch 'ConstructionConsent/fix-addr-search' into 'master'
fixed when creating owner See merge request fronk/thetool!1239
This commit is contained in:
@@ -1064,7 +1064,10 @@ class ConstructionConsentController extends mfBaseController {
|
|||||||
if ($birthdate) { $ownerFilter["birthdate"] = $birthdate; }
|
if ($birthdate) { $ownerFilter["birthdate"] = $birthdate; }
|
||||||
|
|
||||||
$isNew = !($ownerRecord = ConstructionConsentOwner::getFirst(array_filter($ownerFilter)));
|
$isNew = !($ownerRecord = ConstructionConsentOwner::getFirst(array_filter($ownerFilter)));
|
||||||
if ($isNew) $ownerRecord = new ConstructionConsentOwner(["constructionconsent_id" => $consentRecord->id]);
|
if ($isNew) {
|
||||||
|
$ownerRecord = new ConstructionConsentOwner();
|
||||||
|
$ownerRecord->constructionconsent_id = $consentRecord->id;
|
||||||
|
}
|
||||||
|
|
||||||
$addressKey = null; foreach(array_keys($ownerData) as $k) { if(strpos($k,"ADR") === 0) {$addressKey=$k; break;} }
|
$addressKey = null; foreach(array_keys($ownerData) as $k) { if(strpos($k,"ADR") === 0) {$addressKey=$k; break;} }
|
||||||
$street = $city = $postcode = $country = null;
|
$street = $city = $postcode = $country = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user