Skip to content

Commit

Permalink
complexifie l'inversion avec salaire + chomage
Browse files Browse the repository at this point in the history
  • Loading branch information
paul committed May 24, 2023
1 parent ce22668 commit 31aa515
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
5 changes: 3 additions & 2 deletions openfisca_france_data/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def create_salaire_de_base(individus, period = None, revenu_type = 'imposable',
if name not in target:
baremes_to_remove.append(name)

# We split since we cannot remove from dict while iterating
# We split since we cannot remove from dict while iterating
for name in baremes_to_remove:
del baremes_collection._children[name]

Expand Down Expand Up @@ -400,6 +400,7 @@ def create_revenus_remplacement_bruts(individus, period, tax_benefit_system):

individus.chomage_imposable.fillna(0, inplace = True)
individus.retraite_imposable.fillna(0, inplace = True)
individus.salaire_net.fillna(0, inplace = True)

parameters = tax_benefit_system.get_parameters_at_instant(period.start)
csg = parameters.prelevements_sociaux.contributions_sociales.csg
Expand All @@ -415,7 +416,7 @@ def create_revenus_remplacement_bruts(individus, period, tax_benefit_system):
(individus.taux_csg_remplacement == 2) / (1 - taux_reduit)
+ (individus.taux_csg_remplacement >= 3) / (1 - taux_plein)
)
)
) - individus.salaire_net
exonere_csg_chomage = (
(individus.taux_csg_remplacement < 2)
| (individus.chomage_imposable <= seuil_chomage_net_exoneration)
Expand Down
13 changes: 12 additions & 1 deletion tests/inversion/remplacement_2021.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@
nbp: 100
chomage_imposable: 19000 # 11408 < revkire <= 14914 & nbp =1 : taux is taux_reduit BUT chomage_imposable < seuil d'exo so net == gross
chomage_brut_test: 19000
- name: "Chomage avec RFR sous seuil 2, personne seule, salaire non nul mais exonération car faible"
revkire:
nbp: 100
chomage_imposable: 6000 #
salaire_net: 6000
chomage_brut_test: 6000
- name: "Chomage avec RFR sous seuil 2, personne seule, mais salaire non nul alors pas d'exonération"
revkire: 11410
nbp: 100
chomage_imposable: 11551.98 #
salaire_net: 18000
chomage_brut_test: 12000
- name: "Chomage avec RFR sous seuil 2, personne seule, pas d'exonération"
revkire: 11410
nbp: 100
Expand Down Expand Up @@ -83,4 +95,3 @@
nbp: 200
retraite_imposable: 20000
retraite_brute_test: 21254 # 20000/(1-0.059)

0 comments on commit 31aa515

Please sign in to comment.