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

Separe revenu ame_social #192

Merged
merged 4 commits into from
Feb 4, 2025
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

## 0.47 - [#191](https://github.com/openfisca/openfisca-tunisia/pull/191)

* Évolution du système socio-fiscal. .
* Périodes concernées : toutes.
* Zones impactées : `variables/prestations/non_contributives/amen_social.py`.
* Détails :
- Introduit `amen_social_revenu`

## 0.46 - [#191](https://github.com/openfisca/openfisca-tunisia/pull/191)

* Évolution du système socio-fiscal. .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def formula_2020(menage, period, parameters):
# Citère du revenu selon présence ou non de handicap lourd
presence_handicap_lourd = menage('amen_social_presence_handicap_lourd', period)
taille_menage = menage.nb_persons()
revenu_menage = menage.sum(menage.members('salaire_net_a_payer', period)) # Corriger les revenus
revenu_menage = menage('amen_social_revenu', period)
seuil_de_revenu = parameters(period).prestations.non_contributives.amen_social.eligibilite
smig_mensuel = parameters(period.start).marche_travail.smig_40h_mensuel
conditions_sans_handicap = [
Expand Down Expand Up @@ -84,6 +84,20 @@ def formula_2020(menage, period, parameters):
return pas_d_achat_onereux * pas_de_residence_secondaire * critere_revenu


class amen_social_revenu(Variable):
value_type = float
entity = Menage
label = 'Revenu du ménage au sens du programme Amen social'
definition_period = MONTH

def formula_2020(menage, period, parameters):
revenu_menage = (
menage.sum(menage.members('salaire_net_a_payer', period))
+ menage.sum(menage.members('pension_de_retraite', period))
)
return revenu_menage


class transfert_monetaire_permanent_eligible(Variable):
value_type = bool
entity = Menage
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "OpenFisca-Tunisia"
version = "0.46"
version = "0.47"
description = "OpenFisca Rules as Code model for Tunisia."
readme = "README.md"
keywords = ["microsimulation", "tax", "benefit", "rac", "rules-as-code", "tunisia"]
Expand Down
5 changes: 5 additions & 0 deletions tests/formulas/amen_social/eligibilite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,15 @@
date_naissance: 2015-01-01
eleve:
2022: true
enfant3:
date_naissance: 2020-01-01
eleve:
2022: true
menage:
personne_de_reference: parent1
enfants:
- enfant1
- enfant2
- enfant3
output:
amen_social_eligible: false