Skip to content

Commit

Permalink
Impôt sur le revenu - Transformer les paramètres abattement contribua…
Browse files Browse the repository at this point in the history
…ble agé et invalide en barème. (#2376)
  • Loading branch information
DorineLam authored Oct 31, 2024
2 parents 7b98f0e + 3c743da commit c130e3d
Show file tree
Hide file tree
Showing 45 changed files with 730 additions and 1,214 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

### 169.3.0 [2376](https://github.com/openfisca/openfisca-france/pull/2376)

* Évolution du système socio-fiscal
* Périodes concernées : à partir du 1977
* Zones impactées :
- `parameters/impot_revenu/calcul_revenus_imposables/abat_rni`
- `model/prelevements_obligatoires/impot_revenu/ir.pyi`.
- `model/prestations/prestations_familiales/base_ressource.py`.
* Détails :
- Transforme 4 paramètres de l'abattement personnes âgées et invalides en 1 seul barème de type single_amount
- Réorganise le dossier `abat_rni`
- Modifie les formules en conséquence


### 169.2.1 [2361](https://github.com/openfisca/openfisca-france/pull/2361)

* Évolution du système socio-fiscal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,12 @@ def formula_2006_01_01(foyer_fiscal, period, parameters):
# foyer, la déduction est limitée à 2*max
# S'il habite chez ses parents, max 3359, sinon 5698
return (
min_(f6gi * (1 + taux_jgt_2006), max1)
+ min_(f6gj * (1 + taux_jgt_2006), max1)
min_(f6gi * taux_jgt_2006, max1)
+ min_(f6gj * taux_jgt_2006, max1)
+ min_(f6el, max1)
+ min_(f6em, max1)
+ f6gp
* (1 + taux_jgt_2006) + f6gu
+ f6gp * taux_jgt_2006
+ f6gu
)


Expand Down
102 changes: 45 additions & 57 deletions openfisca_france/model/prelevements_obligatoires/impot_revenu/ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -3496,7 +3496,7 @@ def formula(foyer_fiscal, period, parameters):
abattements = parameters(period).impot_revenu.calcul_revenus_imposables.abat_rni

# Abattement pour personnes agées de + de 65 ans ou invalide
abattement_age_ou_invalidite = abattements.personne_agee_ou_invalide
abattement_age_ou_invalidite = abattements.contribuable_age_invalide

# Abattement pour rattachement d'enfants mari·é·s
abattement_enfant_marie = abattements.enfant_marie
Expand All @@ -3510,25 +3510,13 @@ def formula(foyer_fiscal, period, parameters):
# Vecteur de montants d'abattement pour personnes âges ou invalides
as_inv = (
foyers_eligibles
* (
(
+ abattement_age_ou_invalidite.montant_1
* (revenu_net_global <= abattement_age_ou_invalidite.plafond_1)
)
+ (
+ abattement_age_ou_invalidite.montant_2
* (
(revenu_net_global > abattement_age_ou_invalidite.plafond_1)
& (revenu_net_global <= abattement_age_ou_invalidite.plafond_2)
)
)
)
* abattement_age_ou_invalidite.calc(revenu_net_global)
)

# Vecteur de montants d'abattement pour enfants à charge
as_enf = (
nombre_enfants
* abattement_enfant_marie.montant
* abattement_enfant_marie
)

# Le montant total d'abattement ne peut pas être supérieur au revenu net global
Expand Down Expand Up @@ -3632,29 +3620,29 @@ def formula_2008_01_01(foyer_fiscal, period, parameters):

# parts des enfants en résidence alternée quand il n'y a que des enfants en résidence alternée
enf_a = (no_pac & has_alt) * (
quotient_familial.enf1 * min_(nbH, 1)
+ quotient_familial.enf2 * max_(min_(nbH - 1, 1), 0)
+ quotient_familial.enf3_et_sup * max_(nbH - 2, 0)
quotient_familial.cas_general.enf1 * min_(nbH, 1)
+ quotient_familial.cas_general.enf2 * max_(min_(nbH - 1, 1), 0)
+ quotient_familial.cas_general.enf3_et_sup * max_(nbH - 2, 0)
) * 0.5
# parts des enfants en résidence alternée quand il y a aussi des enfants entièrement à charge
enf_b = (has_pac & has_alt) * (
(nb_pac == 1) * (
quotient_familial.enf2 * min_(nbH, 1)
+ quotient_familial.enf3_et_sup * max_(nbH - 1, 0)
quotient_familial.cas_general.enf2 * min_(nbH, 1)
+ quotient_familial.cas_general.enf3_et_sup * max_(nbH - 1, 0)
) * 0.5
+ (nb_pac > 1) * (quotient_familial.enf3_et_sup * nbH * 0.5)
+ (nb_pac > 1) * (quotient_familial.cas_general.enf3_et_sup * nbH * 0.5)
)
# parts des enfants entièrement à charge
enf_c = (
quotient_familial.enf1 * min_(nb_pac, 1)
+ quotient_familial.enf2 * max_(min_(nb_pac - 1, 1), 0)
+ quotient_familial.enf3_et_sup * max_(nb_pac - 2, 0)
quotient_familial.cas_general.enf1 * min_(nb_pac, 1)
+ quotient_familial.cas_general.enf2 * max_(min_(nb_pac - 1, 1), 0)
+ quotient_familial.cas_general.enf3_et_sup * max_(nb_pac - 2, 0)
)

enf = enf_a + enf_b + enf_c

# # note 2 : nombre de parts liées aux invalides (enfant + adulte)
n2 = quotient_familial.inv1 * (nbG + nbI / 2) + quotient_familial.inv2 * nbR
n2 = quotient_familial.couple_ou_pers_a_charge.inv1 * (nbG + nbI / 2) + quotient_familial.couple_ou_pers_a_charge.inv2 * nbR

# # note 3 : Pas de personne à charge
# - invalide
Expand All @@ -3668,23 +3656,23 @@ def formula_2008_01_01(foyer_fiscal, period, parameters):
n3 = max_(n31, n32)
# # note 4 Invalidité de la personne ou du conjoint pour les mariés ou
# # jeunes veuf(ve)s
n4 = max_(quotient_familial.not41 * (1 * caseP + 1 * caseF), quotient_familial.not42 * (caseW | caseS))
n4 = max_(quotient_familial.couple_ou_pers_a_charge.not41 * (1 * caseP + 1 * caseF), quotient_familial.couple_ou_pers_a_charge.not42 * (caseW | caseS))

# # note 5
# - enfant autre et parent isolé
n5 = quotient_familial.isol * caseT * (((no_pac & has_alt) * ((nbH == 1) * 0.5 + (nbH >= 2))) + 1 * has_pac)
n5 = quotient_familial.couple_ou_pers_a_charge.isol * caseT * (((no_pac & has_alt) * ((nbH == 1) * 0.5 + (nbH >= 2))) + 1 * has_pac)

# # note 6 invalide avec personne à charge
n6 = quotient_familial.not6 * (caseP & (has_pac | has_alt))
n6 = quotient_familial.couple_ou_pers_a_charge.not6 * (caseP & (has_pac | has_alt))

# # note 7 Parent isolé
n7 = quotient_familial.isol * caseT * ((no_pac & has_alt) * ((nbH == 1) * 0.5 + (nbH >= 2)) + 1 * has_pac)
n7 = quotient_familial.couple_ou_pers_a_charge.isol * caseT * ((no_pac & has_alt) * ((nbH == 1) * 0.5 + (nbH >= 2)) + 1 * has_pac)

# # Régime des mariés ou pacsés
nb_parts_famille = 1 + quotient_familial.conj + enf + n2 + n4
nb_parts_famille = 1 + quotient_familial.cas_general.conj + enf + n2 + n4

# # veufs hors jeune_veuf
nb_parts_veuf = 1 + quotient_familial.veuf * (has_pac | has_alt) + enf + n2 + n3 + n5 + n6
nb_parts_veuf = 1 + quotient_familial.cas_general.veuf * (has_pac | has_alt) + enf + n2 + n3 + n5 + n6

# # celib div
nb_parts_celib = 1 + enf + n2 + n3 + n6 + n7
Expand All @@ -3697,18 +3685,18 @@ def formula(foyer_fiscal, period, parameters):
note 1 enfants et résidence alternée (formulaire 2041 GV page 10)
quotient_familial.conj : nb part associées au conjoint d'un couple marié ou pacsé
quotient_familial.enf1 : nb part premier enfant
quotient_familial.enf2 : nb part deuxième enfant
quotient_familial.enf3_et_sup : nb part enfants de rang 3 ou plus
quotient_familial.inv1 : nb part supp enfants invalides (I, G)
quotient_familial.inv2 : nb part supp adultes invalides (R)
quotient_familial.cas_general.conj : nb part associées au conjoint d'un couple marié ou pacsé
quotient_familial.cas_general.enf1 : nb part premier enfant
quotient_familial.cas_general.enf2 : nb part deuxième enfant
quotient_familial.cas_general.enf3_et_sup : nb part enfants de rang 3 ou plus
quotient_familial.couple_ou_pers_a_charge.inv1 : nb part supp enfants invalides (I, G)
quotient_familial.couple_ou_pers_a_charge.inv2 : nb part supp adultes invalides (R)
quotient_familial.sans_pers_a_charge.not31 : nb part supp note 3 : cases W ou G pour veuf, celib ou div
quotient_familial.sans_pers_a_charge.not32 : nb part supp note 3 : personne seule ayant élevé des enfants
quotient_familial.not41 : nb part supp adultes invalides (vous et/ou conjoint) note 4
quotient_familial.not42 : nb part supp adultes anciens combattants (vous et/ou conjoint) note 4
quotient_familial.not6 : nb part supp note 6
quotient_familial.isol : demi-part parent isolé (T)
quotient_familial.couple_ou_pers_a_charge.not41 : nb part supp adultes invalides (vous et/ou conjoint) note 4
quotient_familial.couple_ou_pers_a_charge.not42 : nb part supp adultes anciens combattants (vous et/ou conjoint) note 4
quotient_familial.couple_ou_pers_a_charge.not6 : nb part supp note 6
quotient_familial.couple_ou_pers_a_charge.isol : demi-part parent isolé (T)
quotient_familial.edcd : enfant issu du mariage avec conjoint décédé;
'''
nb_pac = foyer_fiscal('nb_pac', period)
Expand Down Expand Up @@ -3744,29 +3732,29 @@ def formula(foyer_fiscal, period, parameters):

# parts des enfants en résidence alternée quand il n'y a que des enfants en résidence alternée
enf_a = (no_pac & has_alt) * (
quotient_familial.enf1 * min_(nbH, 1)
+ quotient_familial.enf2 * max_(min_(nbH - 1, 1), 0)
+ quotient_familial.enf3_et_sup * max_(nbH - 2, 0)
quotient_familial.cas_general.enf1 * min_(nbH, 1)
+ quotient_familial.cas_general.enf2 * max_(min_(nbH - 1, 1), 0)
+ quotient_familial.cas_general.enf3_et_sup * max_(nbH - 2, 0)
) * 0.5
# parts des enfants en résidence alternée quand il y a aussi des enfants entièrement à charge
enf_b = (has_pac & has_alt) * (
(nb_pac == 1) * (
quotient_familial.enf2 * min_(nbH, 1)
+ quotient_familial.enf3_et_sup * max_(nbH - 1, 0)
quotient_familial.cas_general.enf2 * min_(nbH, 1)
+ quotient_familial.cas_general.enf3_et_sup * max_(nbH - 1, 0)
) * 0.5
+ (nb_pac > 1) * (quotient_familial.enf3_et_sup * nbH * 0.5)
+ (nb_pac > 1) * (quotient_familial.cas_general.enf3_et_sup * nbH * 0.5)
)
# parts des enfants entièrement à charge
enf_c = (
quotient_familial.enf1 * min_(nb_pac, 1)
+ quotient_familial.enf2 * max_(min_(nb_pac - 1, 1), 0)
+ quotient_familial.enf3_et_sup * max_(nb_pac - 2, 0)
quotient_familial.cas_general.enf1 * min_(nb_pac, 1)
+ quotient_familial.cas_general.enf2 * max_(min_(nb_pac - 1, 1), 0)
+ quotient_familial.cas_general.enf3_et_sup * max_(nb_pac - 2, 0)
)

enf = enf_a + enf_b + enf_c

# # note 2 : nombre de parts liées aux invalides (enfant + adulte)
n2 = quotient_familial.inv1 * (nbG + nbI / 2) + quotient_familial.inv2 * nbR
n2 = quotient_familial.couple_ou_pers_a_charge.inv1 * (nbG + nbI / 2) + quotient_familial.couple_ou_pers_a_charge.inv2 * nbR

# # note 3 : Pas de personne à charge
# - invalide
Expand All @@ -3780,23 +3768,23 @@ def formula(foyer_fiscal, period, parameters):
n3 = max_(n31, n32)
# # note 4 Invalidité de la personne ou du conjoint pour les mariés ou
# # jeunes veuf(ve)s
n4 = max_(quotient_familial.not41 * (1 * caseP + 1 * caseF), quotient_familial.not42 * (caseW | caseS))
n4 = max_(quotient_familial.couple_ou_pers_a_charge.not41 * (1 * caseP + 1 * caseF), quotient_familial.couple_ou_pers_a_charge.not42 * (caseW | caseS))

# # note 5
# - enfant du conjoint décédé
n51 = quotient_familial.cdcd * (caseL & ((nbF + nbJ) > 0))
n51 = quotient_familial.couple_ou_pers_a_charge.cdcd * (caseL & ((nbF + nbJ) > 0))
# - enfant autre et parent isolé
n52 = quotient_familial.isol * caseT * (((no_pac & has_alt) * ((nbH == 1) * 0.5 + (nbH >= 2))) + 1 * has_pac)
n52 = quotient_familial.couple_ou_pers_a_charge.isol * caseT * (((no_pac & has_alt) * ((nbH == 1) * 0.5 + (nbH >= 2))) + 1 * has_pac)
n5 = max_(n51, n52)

# # note 6 invalide avec personne à charge
n6 = quotient_familial.not6 * (caseP & (has_pac | has_alt))
n6 = quotient_familial.couple_ou_pers_a_charge.not6 * (caseP & (has_pac | has_alt))

# # note 7 Parent isolé
n7 = quotient_familial.isol * caseT * ((no_pac & has_alt) * ((nbH == 1) * 0.5 + (nbH >= 2)) + 1 * has_pac)
n7 = quotient_familial.couple_ou_pers_a_charge.isol * caseT * ((no_pac & has_alt) * ((nbH == 1) * 0.5 + (nbH >= 2)) + 1 * has_pac)

# # Régime des mariés ou pacsés
nb_parts_famille = 1 + quotient_familial.conj + enf + n2 + n4
nb_parts_famille = 1 + quotient_familial.cas_general.conj + enf + n2 + n4

# # veufs hors jeune_veuf
nb_parts_veuf = 1 + enf + n2 + n3 + n5 + n6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def formula(foyer_fiscal, period, parameters):
abattements = parameters(period).impot_revenu.calcul_revenus_imposables.abat_rni

# Abattement pour personnes agées de + de 65 ans ou invalide
abattement_age_ou_invalidite = abattements.personne_agee_ou_invalide
abattement_age_ou_invalidite = abattements.contribuable_age_invalide

# Abattement pour rattachement d'enfants mari·é·s
abattement_enfant_marie = abattements.enfant_marie
Expand All @@ -283,25 +283,13 @@ def formula(foyer_fiscal, period, parameters):
# Vecteur de montants d'abattement pour personnes âges ou invalides
abattement_special_personne_agee_invalide = (
foyers_eligibles
* (
(
abattement_age_ou_invalidite.montant_1
* (revenu_net_global <= abattement_age_ou_invalidite.plafond_1)
)
+ (
abattement_age_ou_invalidite.montant_2
* (
(revenu_net_global > abattement_age_ou_invalidite.plafond_1)
& (revenu_net_global <= abattement_age_ou_invalidite.plafond_2)
)
)
)
* abattement_age_ou_invalidite.calc(revenu_net_global)
)

# Vecteur de montants d'abattement pour enfants à charge
abattement_special_enfants_a_charge = (
nombre_enfants
* abattement_enfant_marie.montant
* abattement_enfant_marie
)

# Le montant total d'abattement ne peut pas être supérieur au revenu net global
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ metadata:
documentation_start: true
label_en: Family quotient ceiling and "decote"
order:
- decote
- quotient_familial
- plafond_avantages_procures_par_demi_part
- reduction_ss_condition_revenus
- decote
- abat_dom
- reduction_ss_condition_revenus
documentation: |-
Création du quotient familial en 1945 (Loi 45-0195 du 31/02/1945).
Les montants des plafonnements de quotient familial et de la décote se trouvent à l'article 197-2 du CGI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ values:
value: 1
metadata:
short_label: Conjoint d'un couple marié ou pacsé
last_value_still_valid_on: "2024-04-26"
last_value_still_valid_on: "2024-10-23"
unit: part_quotient_familial
reference:
1951-01-01:
title: Article 194 du Code général des impôts
title: Article 194, I. du Code général des impôts
href: https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000049371120/1951-12-19/
notes:
1951-01-01:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ values:
value: 0.5
metadata:
short_label: Premier enfant
last_value_still_valid_on: "2024-04-26"
last_value_still_valid_on: "2024-10-23"
unit: part_quotient_familial
reference:
1951-01-01:
title: Article 194 du Code général des impôts
title: Article 194, I. du Code général des impôts
href: https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000049371120/1951-12-19/
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ values:
value: 0.5
metadata:
short_label: Deuxième enfant
last_value_still_valid_on: "2024-04-26"
last_value_still_valid_on: "2024-10-23"
unit: part_quotient_familial
reference:
1951-01-01:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ values:
value: 1
metadata:
short_label: À partir du troisième enfant inclus
last_value_still_valid_on: "2024-04-26"
last_value_still_valid_on: "2024-10-23"
unit: part_quotient_familial
reference:
1951-01-01:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: Cas général des situations de famille pour attribuer les parts du quotient familial de l'impôt sur le revenu (IR)
metadata:
documentation_start: true
short_label: Cas général
order:
- conj
- enf1
- enf2
- enf3_et_sup
- veuf
documentation: |+
Les paramètres disponibles dans ce dossier "cas général" sont tous présents dans le tableau de l'article 194 du CGI, au I.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ values:
value: 1
metadata:
short_label: Personne veuve ayant des personnes à charge
last_value_still_valid_on: "2024-04-26"
last_value_still_valid_on: "2024-10-23"
unit: part_quotient_familial
reference:
2008-01-01:
title: Article 195, I. du Code général des impôts
href: https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000046860994
title: Article 194, I. du Code général des impôts
href: https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000033817781
documentation: Part supplémentaire pour quotient familial d'un veuf avec personne à charge, suit le régime "mariés/pacsés" à partir de 2008
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: Parts supplémentaires de quotient familial pour certaines situations de foyers fiscaux en couple ou avec personne à charge
metadata:
documentation_start: true
short_label: Parts supplémentaires personne en couple ou avec personne à charge
order:
- isol
- inv1
- not41
- not6
- not42
- inv2
- cdcd
documentation: |-
Ces paramètres sont énumérés dans l'article 195 du code général des impôts, à compter du 2. Seuls not6 et isol sont dans d'autres articles, respectivement l'article 196 (not6) et le II du 194 (isol).
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description: Part supplémentaire de quotient familial (IR) par personne à charge invalide titulaire de la carte d'invalidité ou de la carte mobilité inclusion (CMI) mention “invalidité“ (cadre C - case R)
values:
2000-01-01:
value: 0.5
metadata:
short_label: Personne à charge titulaire de la carte invalidité ou CMI-invalidité
last_value_still_valid_on: "2024-10-23"
unit: part_quotient_familial
reference:
2000-01-01:
- title: Article 196 A bis du Code général des impôts
href: https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000006303124/2001-03-31
- title: Bofip.impots.gouv.fr
href: https://bofip.impots.gouv.fr/bofip/1032-PGP.html/identifiant=BOI-IR-LIQ-10-10-10-30-20130613#Determination_du_quotient_f_12
documentation: |+
La demi-part supplémentaire ici en paramètre est attribuée au titre de l'invalidité de la personne à charge. Ce complément s'additionne à la demi-part ou part supplémentaire (selon le nombre d'enfants du foyer) ajoutée au titre "personne à charge"
Loading

0 comments on commit c130e3d

Please sign in to comment.