Skip to content

Commit

Permalink
Applique le forfait d'hébergement pour les maisons de retraite
Browse files Browse the repository at this point in the history
  • Loading branch information
guillett committed Nov 22, 2024
1 parent fd2e7d2 commit 59030ef
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions openfisca_nouvelle_caledonie/variables/aide_logement.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,15 @@ def formula(household, period):
loyer_mensuel_reference = household("loyer_mensuel_reference", period)
loyer = household("loyer", period)

typologie_logement = household("typologie_logement", period)

# Clarification nécessaire
# Prise en compte ou non de l'excédent de loyer pour charges importantes ?
return min_(loyer, loyer_mensuel_reference)
return where(
typologie_logement == TypologieLogement.maisonderetraite,
loyer_mensuel_reference,
min_(loyer, loyer_mensuel_reference),
)


class loyer_mensuel_reference(Variable):
Expand Down Expand Up @@ -404,7 +410,7 @@ def formula(household, period):
nb_enfs = household("aide_logement_nb_enfants", period)

c1 = (nb_adultes == 1) * (nb_enfs == 0) * (base_ressources <= 90000)
c2 = base_ressources <= 110000
c2 = (nb_adultes > 1) * (base_ressources <= 110000)
c3 = (nb_enfs > 0) * (base_ressources <= 110000)

return ret * (c1 + c2 + c3)
Expand Down

0 comments on commit 59030ef

Please sign in to comment.