From 219e4f8744d3980e8bb4f2f030dfd246e23a2461 Mon Sep 17 00:00:00 2001 From: Thomas Guillet Date: Mon, 2 Dec 2024 12:25:16 +0100 Subject: [PATCH] =?UTF-8?q?=C3=89vite=20de=20l'AL=20en=20cas=20de=20loyer?= =?UTF-8?q?=20important=20en=20maison=20de=20retraite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openfisca_nouvelle_caledonie/variables/aide_logement.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openfisca_nouvelle_caledonie/variables/aide_logement.py b/openfisca_nouvelle_caledonie/variables/aide_logement.py index e07629b..dfa78be 100644 --- a/openfisca_nouvelle_caledonie/variables/aide_logement.py +++ b/openfisca_nouvelle_caledonie/variables/aide_logement.py @@ -541,4 +541,10 @@ def formula(household, period): loyer = household("loyer", period) loyer_mensuel_plafond = household("loyer_mensuel_plafond", period) - return where(loyer <= loyer_mensuel_plafond, montant, 0) + typologie_logement = household("typologie_logement", period) + + return where( + typologie_logement == TypologieLogement.maisonderetraite, + montant, + where(loyer <= loyer_mensuel_plafond, montant, 0) + )