Skip to content

Commit

Permalink
Add inversion chomage avec salaire imposable
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainipp committed May 29, 2024
1 parent 5525d22 commit 3549b2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions openfisca_france_data/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,18 @@ def create_traitement_indiciaire_brut(individus, period = None, revenu_type = 'i
individus['primes_fonction_publique'] = TAUX_DE_PRIME * traitement_indiciaire_brut


def create_revenus_remplacement_bruts(individus, period, tax_benefit_system):
def create_revenus_remplacement_bruts(individus, period, tax_benefit_system, revenu_type = 'imposable'):
assert 'taux_csg_remplacement' in individus

individus.chomage_imposable.fillna(0, inplace = True)
individus.retraite_imposable.fillna(0, inplace = True)
individus.salaire_net.fillna(0, inplace = True)
if revenu_type == 'imposable':
assert 'salaire_imposable' in individus.columns
salaire_pour_inversion = individus.salaire_imposable
else:
assert 'salaire_net' in individus.columns
salaire_pour_inversion = individus.salaire_net
salaire_pour_inversion.fillna(0, inplace = True)

parameters = tax_benefit_system.get_parameters_at_instant(period.start)
csg = parameters.prelevements_sociaux.contributions_sociales.csg
Expand All @@ -436,7 +442,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
) - salaire_pour_inversion # théoriquement, il s'agit du net pour salaire et rpns, mais il n'est pas toujours disponible en pratique
exonere_csg_chomage = (
(individus.taux_csg_remplacement < 2)
| (individus.chomage_imposable <= seuil_chomage_net_exoneration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def create_individu_variables_brutes(
create_taux_csg_remplacement(individus, period, tax_benefit_system)
created_variables.append('taux_csg_remplacement')

create_revenus_remplacement_bruts(individus, period, tax_benefit_system)
create_revenus_remplacement_bruts(individus, period, tax_benefit_system, revenu_type = revenu_type)
created_variables.append('chomage_brut')
created_variables.append('retraite_brute')

Expand Down

0 comments on commit 3549b2c

Please sign in to comment.