diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php index 2d0f5efd0..0b5b66f77 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php @@ -90,7 +90,7 @@ class ClosingMotive } $this->children->add($child); - $child->setParent($this); + $child->setParent($this)->setIsCanceledAccompanyingPeriod($this->getIsCanceledAccompanyingPeriod()); return $this; } @@ -239,6 +239,10 @@ class ClosingMotive { $this->isCanceledAccompanyingPeriod = $isCanceledAP; + foreach ($this->getChildren() as $child) { + $child->setIsCanceledAccompanyingPeriod($isCanceledAP); + } + return $this; } }