Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrige le calcul d'éligibilité ars & aeeh pour le pass'Sport #2345

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

### 168.1.2 [2345](https://github.com/openfisca/openfisca-france/pull/2345)

* Changement mineur.
* Périodes concernées : toutes.
* Zones impactées : `openfisca_france/model/prestations/jeunes/pass_sport`.
* Détails :
- Corrige les éligibilités ars et aeeh dans le calcul du montant de l'aide Pass Sport

## 168.1.1 [2351](https://github.com/openfisca/openfisca-france/pull/2351)

* Correction d'un crash
Expand Down
12 changes: 6 additions & 6 deletions openfisca_france/model/prestations/jeunes/pass_sport.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ def formula_2022_06_30(individu, period, parameters):
eligibilite_age_profil_boursier = age <= age_maximum_profil_boursier
eligibilite_profil_boursier = boursier * eligibilite_age_profil_boursier

ars = individu.famille('ars', period.this_year)
eligibilite_ars = individu.famille('ars', period.this_year) > 0
age_maximum_profil_ars = parametres.critere_age.age_maximum_profil_ars
age_minimum_profil_ars = parametres.critere_age.age_minimum_profil_ars
eligibilite_age_profil_ars = (age >= age_minimum_profil_ars) * (age <= age_maximum_profil_ars)
eligibilite_profil_ars = ars * eligibilite_age_profil_ars
eligibilite_profil_ars = eligibilite_ars * eligibilite_age_profil_ars

aeeh = individu.famille('aeeh', period)
eligibilite_aeeh = individu.famille('aeeh', period) > 0
age_maximum_profil_aeeh = parametres.critere_age.age_maximum_profil_aeeh
age_minimum_profil_aeeh = parametres.critere_age.age_minimum_profil_aeeh
eligibilite_age_profil_aeeh = (age >= age_minimum_profil_aeeh) * (age <= age_maximum_profil_aeeh)
eligibilite_profil_aeeh = aeeh * eligibilite_age_profil_aeeh
eligibilite_profil_aeeh = eligibilite_aeeh * eligibilite_age_profil_aeeh

aah_eligibilite = individu('aah', period) > 0
eligibilite_aah = individu('aah', period) > 0
age_maximum_profil_aah = parametres.critere_age.age_maximum_profil_aah
age_minimum_profil_aah = parametres.critere_age.age_minimum_profil_aah
eligibilite_age_profil_aah = (age >= age_minimum_profil_aah) * (age <= age_maximum_profil_aah)
eligibilite_profil_aah = (aah_eligibilite * eligibilite_age_profil_aah)
eligibilite_profil_aah = (eligibilite_aah * eligibilite_age_profil_aah)

montant = parametres.montant

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name = 'OpenFisca-France',
version = '168.1.1',
version = '168.1.2',
author = 'OpenFisca Team',
author_email = '[email protected]',
classifiers = [
Expand Down
4 changes: 2 additions & 2 deletions tests/formulas/pass_sport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
input:
age: [6, 5, 18]
ars:
2023: [true, true, true]
2023: [418.48, 418.48, 418.48]
output:
pass_sport: [50, 0, 0]

- name: Eligibilité Pour les bénéficiaire de l'AEEH
period: 2023-12
input:
age: [6, 5, 20]
aeeh: [1, 1, 1]
aeeh: [135.13, 135.13, 135.13]
output:
pass_sport: [50, 0, 0]

Expand Down
Loading