mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
[Household] when two adresses on same date, close the existing one
This commit is contained in:
@@ -92,7 +92,7 @@ class Household
|
||||
public function addAddress(Address $address)
|
||||
{
|
||||
foreach ($this->getAddresses() as $a) {
|
||||
if ($a->getValidFrom() < $address->getValidFrom() && $a->getValidTo() === null) {
|
||||
if ($a->getValidFrom() <= $address->getValidFrom() && $a->getValidTo() === null) {
|
||||
$a->setValidTo($address->getValidFrom());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user