fixed when creating owner

This commit is contained in:
Luca Haid
2025-04-22 18:00:50 +02:00
parent ed314e5dfa
commit 23f9f13fe2
@@ -1066,6 +1066,7 @@ class ConstructionConsentController extends mfBaseController {
if ($isNew) {
$ownerRecord = new ConstructionConsentOwner();
$ownerRecord->constructionconsent_id = $consentRecord->id;
$ownerRecord->create_by = $this->user->id;
}
$addressKey = null; foreach(array_keys($ownerData) as $k) { if(strpos($k,"ADR") === 0) {$addressKey=$k; break;} }
@@ -1084,6 +1085,7 @@ class ConstructionConsentController extends mfBaseController {
$ownerRecord->city = $city;
$ownerRecord->zip = $postcode;
$ownerRecord->country = $country;
$ownerRecord->edit_by = $this->user->id;
$ownerRecord->save();
$counts[$isNew ? "created" : "updated"]++;