diff --git a/src/Bundle/ChillPersonBundle/Entity/Household/Household.php b/src/Bundle/ChillPersonBundle/Entity/Household/Household.php index 6caafde3e..c4c11b918 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Household/Household.php +++ b/src/Bundle/ChillPersonBundle/Entity/Household/Household.php @@ -68,6 +68,11 @@ class Household { $this->addresses[] = $address; + foreach ($this->getAddresses() as $a) { + if ($a->getValidFrom() < $address->getValidFrom() && $a->getValidTo() === NULL) { + $a->setValidTo($address->getValidFrom()); + } + } return $this; }