Skip to content

Commit

Permalink
corrections PR
Browse files Browse the repository at this point in the history
  • Loading branch information
c82jdur committed Oct 14, 2024
1 parent 13172f5 commit 76e595f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions openfisca_paris/paris_logement.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def formula(famille, period, legislation):
plafond_pl_couple_sans_enf = legislation(period).paris.paris_logement.plafond_pl_couple_sans_enf
plafond_pl_couple_avec_enf = legislation(period).paris.paris_logement.plafond_pl_couple_avec_enf
aide_pers_isol = legislation(period).paris.paris_logement.aide_pers_isol
aide_couple_ss_enf = legislation(period).paris.paris_logement.aide_couple_ss_enf
aide_couple_sans_enf = legislation(period).paris.paris_logement.aide_couple_ss_enf
aide_couple_avec_enf = legislation(period).paris.paris_logement.aide_couple_avec_enf

base_ressources = famille('paris_base_ressources_foyer', last_month)
Expand All @@ -52,7 +52,7 @@ def formula(famille, period, legislation):
condition_ressource = base_ressources <= plafond

montant_aide = select([couple_avec_enfant, couple_sans_enfant, personne_isolee],
[aide_couple_avec_enf, aide_couple_ss_enf, aide_pers_isol])
[aide_couple_avec_enf, aide_couple_sans_enf, aide_pers_isol])

result_montant = where((montant_aide > loyer_net), (montant_aide - (montant_aide - loyer_net)), montant_aide)

Expand Down
2 changes: 1 addition & 1 deletion openfisca_paris/personnes_agees/paris_logement.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def formula(famille, period, parameters):
nb_enfants = famille('paris_nb_enfants', period)
param_montant = parameters(period).paris.personnes_agees.paris_logement.montant

couple_avec_enfant = en_couple * (nb_enfants == 1)
couple_avec_enfant = en_couple * (nb_enfants >= 1)
couple_sans_enfant = en_couple * (nb_enfants == 0)
personne_isolee = not_(en_couple) * (nb_enfants == 0)
montant = select(
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/paris_logement_famille.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
- enfant1
- enfant2
output:
paris_logement_familles: 128 #63.25
paris_logement_familles: 128

- name: Famille éligible pour l'aide Paris logement car parent monoparental avec trois enfant et ressources < 5000
description: Paris Logement Famille
Expand Down

0 comments on commit 76e595f

Please sign in to comment.