OpenFisca-France 154.1.0__py3-none-any.whl → 155.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of OpenFisca-France might be problematic. Click here for more details.
- {OpenFisca_France-154.1.0.data → OpenFisca_France-155.0.0.data}/data/share/openfisca/openfisca-france/CHANGELOG.md +22 -0
- {OpenFisca_France-154.1.0.dist-info → OpenFisca_France-155.0.0.dist-info}/METADATA +1 -1
- {OpenFisca_France-154.1.0.dist-info → OpenFisca_France-155.0.0.dist-info}/RECORD +20 -20
- {OpenFisca_France-154.1.0.dist-info → OpenFisca_France-155.0.0.dist-info}/WHEEL +1 -1
- openfisca_france/model/mesures.py +8 -15
- openfisca_france/model/prelevements_obligatoires/impot_revenu/credits_impot.py +4 -5
- openfisca_france/model/prelevements_obligatoires/impot_revenu/ir.py +211 -32
- openfisca_france/model/prelevements_obligatoires/impot_revenu/prelevements_forfaitaires/ir_prelevement_forfaitaire_unique.py +88 -19
- openfisca_france/model/prelevements_obligatoires/impot_revenu/prelevements_forfaitaires/prelevement_forfaitaire_liberatoire.py +3 -3
- openfisca_france/model/prelevements_obligatoires/isf.py +8 -13
- openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/contributions_sociales/remplacement.py +1 -1
- openfisca_france/model/prestations/aides_logement.py +0 -3
- openfisca_france/model/prestations/prestations_familiales/base_ressource.py +3 -3
- openfisca_france/model/revenus/capital/financier.py +89 -1
- openfisca_france/model/revenus/capital/plus_value.py +32 -1
- openfisca_france/parameters/prelevements_sociaux/cotisations_securite_sociale_regime_general/casa/seuil_exoneration_irpp_paye_en_n_1.yaml +2 -2
- openfisca_france/scripts/performance/measure_calculations_performance.py +122 -122
- {OpenFisca_France-154.1.0.data → OpenFisca_France-155.0.0.data}/data/share/openfisca/openfisca-france/README.md +0 -0
- {OpenFisca_France-154.1.0.dist-info → OpenFisca_France-155.0.0.dist-info}/LICENSE.AGPL.txt +0 -0
- {OpenFisca_France-154.1.0.dist-info → OpenFisca_France-155.0.0.dist-info}/top_level.txt +0 -0
|
@@ -23,7 +23,7 @@ log = logging.getLogger(__name__)
|
|
|
23
23
|
# # sont intégrés. Pas possible de le recalculer.
|
|
24
24
|
#
|
|
25
25
|
# # impot sur le revenu du foyer (hors prélèvement libératoire, revenus au quotient)
|
|
26
|
-
#
|
|
26
|
+
# impot_revenu_restant_a_payer = -(mciria + ppetot - mcirra )
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
class jour_xyz(Variable):
|
|
@@ -573,8 +573,7 @@ class traitements_salaires_pensions_rentes(Variable):
|
|
|
573
573
|
class revenu_categoriel_plus_values(Variable):
|
|
574
574
|
value_type = float
|
|
575
575
|
entity = FoyerFiscal
|
|
576
|
-
label = 'Revenu catégoriel - Plus-values'
|
|
577
|
-
reference = 'http://www.insee.fr/fr/methodes/default.asp?page=definitions/revenus-categoriesl.htm'
|
|
576
|
+
label = 'Revenu catégoriel - Plus-values (plus-values imposées au barème, les autres entrent dans la variable plus_values_prelevement_forfaitaire_unique_ir si elles sont éligibles au pfu et dans taxation_plus_values_hors_bareme sinon)'
|
|
578
577
|
definition_period = YEAR
|
|
579
578
|
|
|
580
579
|
def formula_2013_01_01(foyer_fiscal, period, parameters):
|
|
@@ -601,9 +600,36 @@ class revenu_categoriel_plus_values(Variable):
|
|
|
601
600
|
return f3sb + f3vg + f3wb + f3ua
|
|
602
601
|
|
|
603
602
|
def formula_2018_01_01(foyer_fiscal, period, parameters):
|
|
603
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
604
|
+
f3sb = foyer_fiscal('f3sb', period)
|
|
605
|
+
f3wb = foyer_fiscal('f3wb', period)
|
|
606
|
+
f3vg = foyer_fiscal('f3vg', period) # Brut d'abattement à partir de 2018
|
|
607
|
+
f3sg = foyer_fiscal('f3sg', period) # Abattement pour durée de détention de droit commun
|
|
608
|
+
f3ua = foyer_fiscal('f3ua', period) # Brut d'abattement à partir de 2018
|
|
609
|
+
f3sl = foyer_fiscal('f3sl', period) # Abattement pour durée de détention renforcé
|
|
610
|
+
f3va = foyer_fiscal('f3va', period) # Abattement fixe
|
|
611
|
+
f3tj = foyer_fiscal('f3tj', period)
|
|
612
|
+
|
|
613
|
+
pre_result = where(imposition_au_bareme, f3sb + max_(0, f3ua - f3sl - f3va) + max_(0, f3vg - f3sg) + f3tj, 0)
|
|
614
|
+
|
|
615
|
+
return f3wb + pre_result
|
|
616
|
+
|
|
617
|
+
def formula_2019_01_01(foyer_fiscal, period, parameters):
|
|
618
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
619
|
+
f3sb = foyer_fiscal('f3sb', period)
|
|
604
620
|
f3wb = foyer_fiscal('f3wb', period)
|
|
621
|
+
f3vg = foyer_fiscal('f3vg', period) # Brut d'abattement à partir de 2018
|
|
622
|
+
f3sg = foyer_fiscal('f3sg', period) # Abattement pour durée de détention de droit commun
|
|
623
|
+
f3ua = foyer_fiscal('f3ua', period) # Brut d'abattement à partir de 2018
|
|
624
|
+
f3sl = foyer_fiscal('f3sl', period) # Abattement pour durée de détention renforcé
|
|
625
|
+
f3va = foyer_fiscal('f3va', period) # Abattement fixe
|
|
626
|
+
f3tj = foyer_fiscal('f3tj', period)
|
|
627
|
+
f3tk = foyer_fiscal('f3tk', period)
|
|
628
|
+
f3vt = foyer_fiscal('f3vt', period)
|
|
605
629
|
|
|
606
|
-
|
|
630
|
+
pre_result = where(imposition_au_bareme, f3sb + max_(0, f3ua - f3sl - f3va) + max_(0, f3vg - f3sg) + max_(0, f3tj - f3tk) + f3vt, 0)
|
|
631
|
+
|
|
632
|
+
return f3wb + pre_result
|
|
607
633
|
|
|
608
634
|
|
|
609
635
|
class revenu_categoriel_deductions(Variable):
|
|
@@ -823,20 +849,138 @@ class revenu_categoriel_capital(Variable):
|
|
|
823
849
|
|
|
824
850
|
NB : La mise en place du PFU supprime la taxation au barème de la plupart des revenus des valeurs et capitaux mobiliers.
|
|
825
851
|
Ces revenus sortent donc de la variable `revenu_categoriel_capital` et entrent dans la variable `revenus_capitaux_prelevement_forfaitaire_unique_ir`.
|
|
852
|
+
En revanche, si la case 2op est cochée, les revenus des valeurs et capitaux mobiliers sont taxés au barème et non au pfu.
|
|
853
|
+
Dans ce cas, ils ne sortent pas de la variable `revenu_categoriel_capital`.
|
|
826
854
|
'''
|
|
827
855
|
maries_ou_pacses = foyer_fiscal('maries_ou_pacses', period)
|
|
828
856
|
deficit_rcm = foyer_fiscal('deficit_rcm', period)
|
|
857
|
+
P = parameters(period).impot_revenu.calcul_revenus_imposables.rvcm
|
|
858
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
859
|
+
|
|
860
|
+
# Revenus à prendre en compte dans les deux cas: pfu ou imposition au barème
|
|
829
861
|
f2ch = foyer_fiscal('f2ch', period)
|
|
830
862
|
f2yy = foyer_fiscal('f2yy', period)
|
|
863
|
+
|
|
864
|
+
# Revenus à prendre en compte dans un seul cas: imposition au barème
|
|
865
|
+
f2ca = foyer_fiscal('f2ca', period)
|
|
866
|
+
f2dc = foyer_fiscal('f2dc', period)
|
|
867
|
+
f2fu = foyer_fiscal('f2fu', period)
|
|
868
|
+
f2go = foyer_fiscal('f2go', period)
|
|
869
|
+
f2tr = foyer_fiscal('f2tr', period)
|
|
870
|
+
f2ts = foyer_fiscal('f2ts', period)
|
|
871
|
+
f2tt = foyer_fiscal('f2tt', period)
|
|
872
|
+
f2vv = foyer_fiscal('f2vv', period)
|
|
873
|
+
f2ww = foyer_fiscal('f2ww', period)
|
|
874
|
+
f2zz = foyer_fiscal('f2zz', period)
|
|
875
|
+
|
|
876
|
+
# Revenus après abatemment
|
|
877
|
+
abattement_dividende = (f2fu + f2dc) * P.revenus_capitaux_mobiliers_dividendes.taux_abattement
|
|
878
|
+
abattement_assurance_vie = P.produits_assurances_vies_assimiles.abattement * (1 + maries_ou_pacses)
|
|
879
|
+
abattement_residuel = max_(abattement_assurance_vie - f2ch, 0)
|
|
880
|
+
abattement_residuel2 = max_(abattement_residuel - f2vv, 0)
|
|
881
|
+
pre_result = where(imposition_au_bareme, f2zz + max_(f2vv - abattement_residuel, 0) + max_(f2ww - abattement_residuel2, 0) + f2fu + f2dc - abattement_dividende
|
|
882
|
+
+ f2ts + f2tr + f2tt + f2go * P.majoration_revenus_reputes_distribues, 0)
|
|
883
|
+
rvcm_apres_abattement = (
|
|
884
|
+
f2yy
|
|
885
|
+
+ f2ch - min_(f2ch, abattement_assurance_vie)
|
|
886
|
+
+ pre_result
|
|
887
|
+
)
|
|
888
|
+
f2ca = where(imposition_au_bareme, f2ca, 0)
|
|
889
|
+
|
|
890
|
+
return max_(0, rvcm_apres_abattement - f2ca - deficit_rcm)
|
|
891
|
+
|
|
892
|
+
def formula_2019_01_01(foyer_fiscal, period, parameters):
|
|
893
|
+
'''
|
|
894
|
+
Revenus des valeurs et capitaux mobiliers
|
|
895
|
+
|
|
896
|
+
Seule différence avec la formule précédente :
|
|
897
|
+
On ajoute la case 2TQ qui représente des revenus qui étaient comptés dans 2TR jusqu'en 2018.
|
|
898
|
+
Source : Brochure pratique revenus 2019 page 123 et 340: https://www.impots.gouv.fr/www2/fichiers/documentation/brochure/ir_2020/accueil.htm
|
|
899
|
+
'''
|
|
900
|
+
maries_ou_pacses = foyer_fiscal('maries_ou_pacses', period)
|
|
901
|
+
deficit_rcm = foyer_fiscal('deficit_rcm', period)
|
|
831
902
|
P = parameters(period).impot_revenu.calcul_revenus_imposables.rvcm
|
|
903
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
904
|
+
|
|
905
|
+
# Revenus à prendre en compte dans les deux cas: pfu ou imposition au barème
|
|
906
|
+
f2ch = foyer_fiscal('f2ch', period)
|
|
907
|
+
f2yy = foyer_fiscal('f2yy', period)
|
|
832
908
|
|
|
909
|
+
# Revenus à prendre en compte dans un seul cas: imposition au barème
|
|
910
|
+
f2ca = foyer_fiscal('f2ca', period)
|
|
911
|
+
f2dc = foyer_fiscal('f2dc', period)
|
|
912
|
+
f2fu = foyer_fiscal('f2fu', period)
|
|
913
|
+
f2go = foyer_fiscal('f2go', period)
|
|
914
|
+
f2tr = foyer_fiscal('f2tr', period)
|
|
915
|
+
f2ts = foyer_fiscal('f2ts', period)
|
|
916
|
+
f2tt = foyer_fiscal('f2tt', period)
|
|
917
|
+
f2vv = foyer_fiscal('f2vv', period)
|
|
918
|
+
f2ww = foyer_fiscal('f2ww', period)
|
|
919
|
+
f2zz = foyer_fiscal('f2zz', period)
|
|
920
|
+
f2tq = foyer_fiscal('f2tq', period)
|
|
921
|
+
|
|
922
|
+
# Revenus après abatemment
|
|
923
|
+
abattement_dividende = (f2fu + f2dc) * P.revenus_capitaux_mobiliers_dividendes.taux_abattement
|
|
924
|
+
abattement_assurance_vie = P.produits_assurances_vies_assimiles.abattement * (1 + maries_ou_pacses)
|
|
925
|
+
abattement_residuel = max_(abattement_assurance_vie - f2ch, 0)
|
|
926
|
+
abattement_residuel2 = max_(abattement_residuel - f2vv, 0)
|
|
927
|
+
pre_result = where(imposition_au_bareme, f2zz + max_(f2vv - abattement_residuel, 0) + max_(f2ww - abattement_residuel2, 0) + f2fu + f2dc - abattement_dividende
|
|
928
|
+
+ f2ts + f2tr + f2tt + f2go * P.majoration_revenus_reputes_distribues + f2tq, 0)
|
|
929
|
+
rvcm_apres_abattement = (
|
|
930
|
+
f2yy
|
|
931
|
+
+ f2ch - min_(f2ch, abattement_assurance_vie)
|
|
932
|
+
+ pre_result
|
|
933
|
+
)
|
|
934
|
+
f2ca = where(imposition_au_bareme, f2ca, 0)
|
|
935
|
+
|
|
936
|
+
return max_(0, rvcm_apres_abattement - f2ca - deficit_rcm)
|
|
937
|
+
|
|
938
|
+
def formula_2020_01_01(foyer_fiscal, period, parameters):
|
|
939
|
+
'''
|
|
940
|
+
Revenus des valeurs et capitaux mobiliers
|
|
941
|
+
|
|
942
|
+
Seule différence avec la formule précédente :
|
|
943
|
+
On ajoute la case 2TZ qui représente des revenus qui étaient comptés dans 1AI jusqu'en 2018 et n'étaient pas éligibles au pfu.
|
|
944
|
+
Source : Brochure pratique revenus 2020 page 119, 132 et 364: https://www.impots.gouv.fr/www2/fichiers/documentation/brochure/ir_2021/accueil.htm
|
|
945
|
+
'''
|
|
946
|
+
maries_ou_pacses = foyer_fiscal('maries_ou_pacses', period)
|
|
947
|
+
deficit_rcm = foyer_fiscal('deficit_rcm', period)
|
|
948
|
+
P = parameters(period).impot_revenu.calcul_revenus_imposables.rvcm
|
|
949
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
950
|
+
|
|
951
|
+
# Revenus à prendre en compte dans les deux cas: pfu ou imposition au barème
|
|
952
|
+
f2ch = foyer_fiscal('f2ch', period)
|
|
953
|
+
f2yy = foyer_fiscal('f2yy', period)
|
|
954
|
+
|
|
955
|
+
# Revenus à prendre en compte dans un seul cas: imposition au barème
|
|
956
|
+
f2ca = foyer_fiscal('f2ca', period)
|
|
957
|
+
f2dc = foyer_fiscal('f2dc', period)
|
|
958
|
+
f2fu = foyer_fiscal('f2fu', period)
|
|
959
|
+
f2go = foyer_fiscal('f2go', period)
|
|
960
|
+
f2tr = foyer_fiscal('f2tr', period)
|
|
961
|
+
f2ts = foyer_fiscal('f2ts', period)
|
|
962
|
+
f2tt = foyer_fiscal('f2tt', period)
|
|
963
|
+
f2vv = foyer_fiscal('f2vv', period)
|
|
964
|
+
f2ww = foyer_fiscal('f2ww', period)
|
|
965
|
+
f2zz = foyer_fiscal('f2zz', period)
|
|
966
|
+
f2tq = foyer_fiscal('f2tq', period)
|
|
967
|
+
f2tz = foyer_fiscal('f2tz', period)
|
|
968
|
+
|
|
969
|
+
# Revenus après abatemment
|
|
970
|
+
abattement_dividende = (f2fu + f2dc) * P.revenus_capitaux_mobiliers_dividendes.taux_abattement
|
|
833
971
|
abattement_assurance_vie = P.produits_assurances_vies_assimiles.abattement * (1 + maries_ou_pacses)
|
|
972
|
+
abattement_residuel = max_(abattement_assurance_vie - f2ch, 0)
|
|
973
|
+
abattement_residuel2 = max_(abattement_residuel - f2vv, 0)
|
|
974
|
+
pre_result = where(imposition_au_bareme, f2zz + max_(f2vv - abattement_residuel, 0) + max_(f2ww - abattement_residuel2, 0) + f2fu + f2dc - abattement_dividende
|
|
975
|
+
+ f2ts + f2tr + f2tt + f2go * P.majoration_revenus_reputes_distribues + f2tq + f2tz, 0)
|
|
834
976
|
rvcm_apres_abattement = (
|
|
835
977
|
f2yy
|
|
836
978
|
+ f2ch - min_(f2ch, abattement_assurance_vie)
|
|
979
|
+
+ pre_result
|
|
837
980
|
)
|
|
981
|
+
f2ca = where(imposition_au_bareme, f2ca, 0)
|
|
838
982
|
|
|
839
|
-
return max_(0, rvcm_apres_abattement - deficit_rcm)
|
|
983
|
+
return max_(0, rvcm_apres_abattement - f2ca - deficit_rcm)
|
|
840
984
|
|
|
841
985
|
|
|
842
986
|
class rfr_rvcm_abattements_a_reintegrer(Variable):
|
|
@@ -847,7 +991,6 @@ class rfr_rvcm_abattements_a_reintegrer(Variable):
|
|
|
847
991
|
|
|
848
992
|
def formula(foyer_fiscal, period, parameters):
|
|
849
993
|
maries_ou_pacses = foyer_fiscal('maries_ou_pacses', period)
|
|
850
|
-
f2da = foyer_fiscal('f2da', period)
|
|
851
994
|
f2dc = foyer_fiscal('f2dc', period)
|
|
852
995
|
f2ts = foyer_fiscal('f2ts', period)
|
|
853
996
|
f2ca = foyer_fiscal('f2ca', period)
|
|
@@ -882,22 +1025,26 @@ class rfr_rvcm_abattements_a_reintegrer(Variable):
|
|
|
882
1025
|
def formula_2018_01_01(foyer_fiscal, period, parameters):
|
|
883
1026
|
'''
|
|
884
1027
|
2 remarques :
|
|
885
|
-
- L'abattement sur les dividendes devrait être intégré dans cette formule (il s'ajoute au RFR) mais on attends pour cela de coder l'option pour l'imposition au barème des dividendes.
|
|
886
1028
|
- À partir de 2018, les revenus de l'assurance-vie sont taxés au PFU et entrent dans le calcul du RFR via `revenus_capitaux_prelevement_forfaitaire_unique_ir`.
|
|
887
|
-
Cette variable est brute d'abattement. Or, l'abattement sur les assurance-vie se déduit bien du RFR (contrairement à celui sur les dividendes). On le rajoute donc ici en négatif.
|
|
1029
|
+
Cette variable est brute d'abattement. Or, l'abattement sur les assurance-vie se déduit bien du RFR (contrairement à celui sur les dividendes). On le rajoute donc ici en négatif dans le cas où le foyer choisit le pfu.
|
|
1030
|
+
Si le foyer a choisi l'imposition au barème pour les revenus éligibles au pfu, les revenus de l'assurance-vie entrent dans le calcul du RFR via `revenus_categoriel` net d'abattement.
|
|
888
1031
|
'''
|
|
889
1032
|
maries_ou_pacses = foyer_fiscal('maries_ou_pacses', period)
|
|
1033
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
890
1034
|
f2ch = foyer_fiscal('f2ch', period)
|
|
891
1035
|
f2dh = foyer_fiscal('f2dh', period)
|
|
892
1036
|
f2vv = foyer_fiscal('f2vv', period)
|
|
893
1037
|
f2ww = foyer_fiscal('f2ww', period)
|
|
1038
|
+
f2dc = foyer_fiscal('f2dc', period)
|
|
1039
|
+
f2fu = foyer_fiscal('f2fu', period)
|
|
894
1040
|
P = parameters(period).impot_revenu.calcul_revenus_imposables.rvcm
|
|
895
1041
|
|
|
896
|
-
abattement_assurance_vie = (
|
|
1042
|
+
abattement_assurance_vie = where(imposition_au_bareme, 0,
|
|
897
1043
|
(f2ch < P.produits_assurances_vies_assimiles.abattement * (1 + maries_ou_pacses)) * max_(0, min_(f2vv + f2ww, P.produits_assurances_vies_assimiles.abattement * (1 + maries_ou_pacses) - f2ch - f2dh))
|
|
898
1044
|
)
|
|
1045
|
+
abattement_dividende = where(imposition_au_bareme, (f2fu + f2dc) * P.revenus_capitaux_mobiliers_dividendes.taux_abattement, 0)
|
|
899
1046
|
|
|
900
|
-
return - abattement_assurance_vie
|
|
1047
|
+
return - abattement_assurance_vie + abattement_dividende
|
|
901
1048
|
|
|
902
1049
|
|
|
903
1050
|
class revenu_categoriel_foncier(Variable):
|
|
@@ -990,7 +1137,7 @@ class revenu_categoriel(Variable):
|
|
|
990
1137
|
|
|
991
1138
|
|
|
992
1139
|
###############################################################################
|
|
993
|
-
# # Déroulé du calcul de l'
|
|
1140
|
+
# # Déroulé du calcul de l'impot_revenu_restant_a_payer
|
|
994
1141
|
###############################################################################
|
|
995
1142
|
|
|
996
1143
|
|
|
@@ -1056,6 +1203,21 @@ class csg_patrimoine_deductible_ir(Variable):
|
|
|
1056
1203
|
|
|
1057
1204
|
return min_(csg_deduc_patrimoine, max_(rbg, 0))
|
|
1058
1205
|
|
|
1206
|
+
def formula_2018_01_01(foyer_fiscal, period, parameters):
|
|
1207
|
+
'''
|
|
1208
|
+
Si le foyer fiscal n'opte pas pour l'imposition au barème des revenus éligibles au pfu, les revenus inscrits case 2BH n'ouvrent pas droit à csg déductible
|
|
1209
|
+
'''
|
|
1210
|
+
csg_deductible = parameters(period).taxation_capital.prelevements_sociaux.csg.taux_deductible.revenus_du_patrimoine
|
|
1211
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
1212
|
+
rbg = foyer_fiscal('rbg', period)
|
|
1213
|
+
f6de = foyer_fiscal('f6de', period)
|
|
1214
|
+
f2bh = foyer_fiscal('f2bh', period)
|
|
1215
|
+
f2df = foyer_fiscal('f2df', period)
|
|
1216
|
+
f2bh = where(imposition_au_bareme, f2bh, 0)
|
|
1217
|
+
csg_deduc_patrimoine = max_(f6de, 0) + max_(csg_deductible * (f2bh + f2df), 0)
|
|
1218
|
+
|
|
1219
|
+
return min_(csg_deduc_patrimoine, max_(rbg, 0))
|
|
1220
|
+
|
|
1059
1221
|
|
|
1060
1222
|
class rng(Variable):
|
|
1061
1223
|
value_type = float
|
|
@@ -1953,6 +2115,7 @@ class rfr_plus_values_hors_rni(Variable):
|
|
|
1953
2115
|
def formula_2018_01_01(foyer_fiscal, period):
|
|
1954
2116
|
'''
|
|
1955
2117
|
Plus-values réalisées sur année 2018 entrant dans le calcul du revenu fiscal de référence.
|
|
2118
|
+
Si on choisit l'imposition au barème pour les revenus éligibles au pfu, les plus-values réalisées éligibles au pfu (3vg, 3tj et 3ua) sont déjà comptés dans le calcul du rfr via la variable 'rni'.
|
|
1956
2119
|
'''
|
|
1957
2120
|
f3vg = foyer_fiscal('f3vg', period)
|
|
1958
2121
|
f3ua = foyer_fiscal('f3ua', period)
|
|
@@ -1961,6 +2124,7 @@ class rfr_plus_values_hors_rni(Variable):
|
|
|
1961
2124
|
f3sk = foyer_fiscal('f3sk', period)
|
|
1962
2125
|
f3vc = foyer_fiscal('f3vc', period)
|
|
1963
2126
|
|
|
2127
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
1964
2128
|
glo_taxation_ir_forfaitaire = foyer_fiscal('glo_taxation_ir_forfaitaire', period)
|
|
1965
2129
|
|
|
1966
2130
|
f3vm = foyer_fiscal('f3vm', period)
|
|
@@ -1976,7 +2140,9 @@ class rfr_plus_values_hors_rni(Variable):
|
|
|
1976
2140
|
rpns_pvce_i = foyer_fiscal.members('rpns_pvce', period)
|
|
1977
2141
|
rpns_pvce = foyer_fiscal.sum(rpns_pvce_i)
|
|
1978
2142
|
|
|
1979
|
-
|
|
2143
|
+
pre_result = where(imposition_au_bareme, 0, f3vg + f3ua + f3tj)
|
|
2144
|
+
|
|
2145
|
+
return f3sj + f3sk + f3vc + glo_taxation_ir_forfaitaire + f3vm + (f3vq - f3vr) + f3vt + f3vz + f3we + f3wi + f3wj + rpns_pvce + f3pi + pre_result
|
|
1980
2146
|
|
|
1981
2147
|
def formula_2019_01_01(foyer_fiscal, period):
|
|
1982
2148
|
'''
|
|
@@ -1989,6 +2155,7 @@ class rfr_plus_values_hors_rni(Variable):
|
|
|
1989
2155
|
f3sk = foyer_fiscal('f3sk', period)
|
|
1990
2156
|
f3vc = foyer_fiscal('f3vc', period)
|
|
1991
2157
|
|
|
2158
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
1992
2159
|
glo_taxation_ir_forfaitaire = foyer_fiscal('glo_taxation_ir_forfaitaire', period)
|
|
1993
2160
|
|
|
1994
2161
|
f3vq = foyer_fiscal('f3vq', period)
|
|
@@ -2004,7 +2171,9 @@ class rfr_plus_values_hors_rni(Variable):
|
|
|
2004
2171
|
rpns_pvce_i = foyer_fiscal.members('rpns_pvce', period)
|
|
2005
2172
|
rpns_pvce = foyer_fiscal.sum(rpns_pvce_i)
|
|
2006
2173
|
|
|
2007
|
-
|
|
2174
|
+
pre_result = where(imposition_au_bareme, 0, f3vg + f3ua + f3tj + f3vt)
|
|
2175
|
+
|
|
2176
|
+
return f3sj + f3sk + f3vc + glo_taxation_ir_forfaitaire + (f3vq - f3vr) + f3vz + f3we + f3wi + f3wj + rpns_pvce + f3an + f3pi + pre_result
|
|
2008
2177
|
|
|
2009
2178
|
|
|
2010
2179
|
class iai(Variable):
|
|
@@ -2016,7 +2185,7 @@ class iai(Variable):
|
|
|
2016
2185
|
|
|
2017
2186
|
def formula(foyer_fiscal, period, parameters):
|
|
2018
2187
|
'''
|
|
2019
|
-
impôt avant imputation
|
|
2188
|
+
impôt sur le revenu avant imputation
|
|
2020
2189
|
'''
|
|
2021
2190
|
iaidrdi = foyer_fiscal('iaidrdi', period)
|
|
2022
2191
|
taxation_plus_values_hors_bareme = foyer_fiscal('taxation_plus_values_hors_bareme', period)
|
|
@@ -2027,7 +2196,7 @@ class iai(Variable):
|
|
|
2027
2196
|
|
|
2028
2197
|
def formula_2013_01_01(foyer_fiscal, period, parameters):
|
|
2029
2198
|
'''
|
|
2030
|
-
impôt avant imputation
|
|
2199
|
+
impôt sur le revenu avant imputation
|
|
2031
2200
|
'''
|
|
2032
2201
|
iaidrdi = foyer_fiscal('iaidrdi', period)
|
|
2033
2202
|
taxation_plus_values_hors_bareme = foyer_fiscal('taxation_plus_values_hors_bareme', period)
|
|
@@ -2058,11 +2227,11 @@ class contribution_exceptionnelle_hauts_revenus(Variable):
|
|
|
2058
2227
|
# TODO: Gérer le II.-1 du lissage interannuel ? (problème de non recours)
|
|
2059
2228
|
|
|
2060
2229
|
|
|
2061
|
-
class
|
|
2230
|
+
class impot_revenu_restant_a_payer(Variable):
|
|
2062
2231
|
value_type = float
|
|
2063
2232
|
entity = FoyerFiscal
|
|
2064
2233
|
label = 'Impôt sur le revenu des personnes physiques restant à payer, après prise en compte des éventuels acomptes'
|
|
2065
|
-
reference = '
|
|
2234
|
+
reference = 'https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000041464766'
|
|
2066
2235
|
definition_period = YEAR
|
|
2067
2236
|
|
|
2068
2237
|
def formula(foyer_fiscal, period, parameters):
|
|
@@ -2072,30 +2241,36 @@ class irpp(Variable):
|
|
|
2072
2241
|
dans certains cas, il existe des prélèvements à la source faisant
|
|
2073
2242
|
office d'acomptes d'impôt sur le revenu (cf. variable acomptes_ir). Ces acomptes sont comptabilisés
|
|
2074
2243
|
dans la feuille d'impôt comme des crédits d'impôt, mais correspondent économiquement à des montants d'impôt dus.
|
|
2244
|
+
Le prélèvement forfaitaire libératoire a déjà été payé il ne doit donc pas être compté dans l'impôt restant à payer.
|
|
2245
|
+
En revanche, il compte dans le calcul du seuil de recouvrement.
|
|
2075
2246
|
'''
|
|
2076
2247
|
iai = foyer_fiscal('iai', period)
|
|
2077
2248
|
credits_impot = foyer_fiscal('credits_impot', period)
|
|
2078
2249
|
acomptes_ir = foyer_fiscal('acomptes_ir', period)
|
|
2079
2250
|
contribution_exceptionnelle_hauts_revenus = foyer_fiscal('contribution_exceptionnelle_hauts_revenus', period)
|
|
2251
|
+
prelevement_forfaitaire_unique_ir = foyer_fiscal('prelevement_forfaitaire_unique_ir', period)
|
|
2252
|
+
prelevement_forfaitaire_liberatoire = foyer_fiscal('prelevement_forfaitaire_liberatoire', period)
|
|
2080
2253
|
P = parameters(period).impot_revenu.calcul_impot_revenu.recouvrement
|
|
2081
2254
|
|
|
2082
|
-
pre_result = iai - credits_impot - acomptes_ir + contribution_exceptionnelle_hauts_revenus
|
|
2255
|
+
pre_result = iai - credits_impot - acomptes_ir + contribution_exceptionnelle_hauts_revenus - prelevement_forfaitaire_unique_ir - prelevement_forfaitaire_liberatoire
|
|
2256
|
+
result = iai - credits_impot - acomptes_ir + contribution_exceptionnelle_hauts_revenus - prelevement_forfaitaire_unique_ir
|
|
2257
|
+
impots_totaux_avant_imputations = iai + contribution_exceptionnelle_hauts_revenus - prelevement_forfaitaire_unique_ir - prelevement_forfaitaire_liberatoire
|
|
2083
2258
|
|
|
2084
2259
|
return (
|
|
2085
|
-
(
|
|
2260
|
+
(impots_totaux_avant_imputations > P.seuil) * (
|
|
2086
2261
|
(pre_result < P.min)
|
|
2087
|
-
* (
|
|
2088
|
-
*
|
|
2262
|
+
* (result > 0)
|
|
2263
|
+
* result
|
|
2089
2264
|
* 0
|
|
2090
2265
|
+ ((pre_result <= 0) + (pre_result >= P.min))
|
|
2091
|
-
* (-
|
|
2266
|
+
* (- result)
|
|
2092
2267
|
)
|
|
2093
|
-
+ (
|
|
2268
|
+
+ (impots_totaux_avant_imputations <= P.seuil) * (
|
|
2094
2269
|
(pre_result < 0)
|
|
2095
|
-
* (-
|
|
2270
|
+
* (-result)
|
|
2096
2271
|
+ (pre_result >= 0)
|
|
2097
2272
|
* 0
|
|
2098
|
-
*
|
|
2273
|
+
* result
|
|
2099
2274
|
)
|
|
2100
2275
|
)
|
|
2101
2276
|
|
|
@@ -2107,8 +2282,8 @@ class foyer_impose(Variable):
|
|
|
2107
2282
|
definition_period = YEAR
|
|
2108
2283
|
|
|
2109
2284
|
def formula(foyer_fiscal, period, parameters):
|
|
2110
|
-
|
|
2111
|
-
return (
|
|
2285
|
+
impot_revenu_restant_a_payer = foyer_fiscal('irpp_economique', period)
|
|
2286
|
+
return (impot_revenu_restant_a_payer < 0)
|
|
2112
2287
|
|
|
2113
2288
|
###############################################################################
|
|
2114
2289
|
# # Autres totaux utiles pour la suite
|
|
@@ -2148,12 +2323,14 @@ class rfr(Variable):
|
|
|
2148
2323
|
abattements_plus_values = foyer_fiscal('abattements_plus_values', period)
|
|
2149
2324
|
f2dm = foyer_fiscal('f2dm', period)
|
|
2150
2325
|
microentreprise = foyer_fiscal('microentreprise', period)
|
|
2151
|
-
rfr_rev_capitaux_mobiliers = foyer_fiscal('rfr_rvcm_abattements_a_reintegrer', period)
|
|
2326
|
+
rfr_rev_capitaux_mobiliers = foyer_fiscal('rfr_rvcm_abattements_a_reintegrer', period)
|
|
2152
2327
|
revenus_capitaux_prelevement_liberatoire = foyer_fiscal('revenus_capitaux_prelevement_liberatoire', period, options = [ADD])
|
|
2153
|
-
revenus_capitaux_prelevement_forfaitaire_unique_ir = foyer_fiscal('revenus_capitaux_prelevement_forfaitaire_unique_ir', period, options = [ADD])
|
|
2328
|
+
revenus_capitaux_prelevement_forfaitaire_unique_ir = foyer_fiscal('revenus_capitaux_prelevement_forfaitaire_unique_ir', period, options = [ADD])
|
|
2154
2329
|
rfr_charges_deductibles = foyer_fiscal('rfr_cd', period)
|
|
2155
2330
|
rfr_plus_values_hors_rni = foyer_fiscal('rfr_plus_values_hors_rni', period)
|
|
2156
2331
|
rni = foyer_fiscal('rni', period)
|
|
2332
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
2333
|
+
f3sb = foyer_fiscal('f3sb', period) # Dans le cas de l'imposition au barème des revenus éligibles au pfu, les plus-values en report d'imposition qui sont imposables pour la période concernée sont comptées dans le rni mais ne doivent pas être comptées dans le rfr.
|
|
2157
2334
|
rpns_exon_i = foyer_fiscal.members('rpns_exon', period)
|
|
2158
2335
|
rpns_info_i = foyer_fiscal.members('rpns_info', period)
|
|
2159
2336
|
|
|
@@ -2166,8 +2343,10 @@ class rfr(Variable):
|
|
|
2166
2343
|
# TODO: On applique ici l'abattement de 10% mais idéalement il faudrait tenir compte des frais réels le cas échéant.
|
|
2167
2344
|
prime_partage_valeur_exoneree_exceptionnelle = (foyer_fiscal.sum(prime_partage_valeur_exoneree_exceptionnelle_i) * 0.9)
|
|
2168
2345
|
|
|
2346
|
+
f3sb = where(imposition_au_bareme, f3sb, 0)
|
|
2347
|
+
|
|
2169
2348
|
return (
|
|
2170
|
-
max_(0, rni)
|
|
2349
|
+
max_(0, rni - f3sb)
|
|
2171
2350
|
+ rfr_charges_deductibles + rfr_plus_values_hors_rni + rfr_rev_capitaux_mobiliers + revenus_capitaux_prelevement_liberatoire + revenus_capitaux_prelevement_forfaitaire_unique_ir
|
|
2172
2351
|
+ rpns_exon + rpns_info
|
|
2173
2352
|
+ abattements_plus_values
|
|
@@ -3364,9 +3543,9 @@ class taux_moyen_imposition(Variable):
|
|
|
3364
3543
|
|
|
3365
3544
|
def formula(foyer_fiscal, period, parameters):
|
|
3366
3545
|
rni = foyer_fiscal('rni', period)
|
|
3367
|
-
|
|
3546
|
+
impot_revenu_restant_a_payer = foyer_fiscal('impot_revenu_restant_a_payer', period)
|
|
3368
3547
|
return (
|
|
3369
|
-
(-
|
|
3548
|
+
(- impot_revenu_restant_a_payer) / (rni + (rni == 0))
|
|
3370
3549
|
) * (rni > 0)
|
|
3371
3550
|
|
|
3372
3551
|
|
|
@@ -7,6 +7,14 @@ log = logging.getLogger(__name__)
|
|
|
7
7
|
# (le reste étant associé aux prélèvements sociaux)
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
class f2op(Variable):
|
|
11
|
+
cerfa_field = '2OP'
|
|
12
|
+
value_type = bool
|
|
13
|
+
entity = FoyerFiscal
|
|
14
|
+
label = 'Le foyer fiscal choisit l imposition au barème plutôt que le pfu si il coche la case 2op'
|
|
15
|
+
definition_period = YEAR
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
class assurance_vie_pfu_ir_plus8ans_1990_19970926(Variable):
|
|
11
19
|
value_type = float
|
|
12
20
|
entity = FoyerFiscal
|
|
@@ -92,11 +100,14 @@ class assurance_vie_pfu_ir(Variable):
|
|
|
92
100
|
definition_period = YEAR
|
|
93
101
|
|
|
94
102
|
def formula_2018_01_01(foyer_fiscal, period):
|
|
103
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
95
104
|
f2zz = foyer_fiscal('f2zz', period)
|
|
96
105
|
f2vv = foyer_fiscal('f2vv', period)
|
|
97
106
|
f2ww = foyer_fiscal('f2ww', period)
|
|
98
107
|
|
|
99
|
-
|
|
108
|
+
result = where(imposition_au_bareme, 0, f2zz + f2vv + f2ww)
|
|
109
|
+
|
|
110
|
+
return result
|
|
100
111
|
|
|
101
112
|
|
|
102
113
|
class revenus_capitaux_prelevement_forfaitaire_unique_ir(Variable):
|
|
@@ -112,6 +123,28 @@ class revenus_capitaux_prelevement_forfaitaire_unique_ir(Variable):
|
|
|
112
123
|
(à savoir revenus_capitaux_prelevement_bareme et revenus_capitaux_prelevement_liberatoire)
|
|
113
124
|
'''
|
|
114
125
|
year = period.this_year
|
|
126
|
+
imposition_au_bareme = foyer_fiscal('f2op', year)
|
|
127
|
+
assurance_vie_pfu_ir = foyer_fiscal('assurance_vie_pfu_ir', year)
|
|
128
|
+
f2dc = foyer_fiscal('f2dc', year)
|
|
129
|
+
f2fu = foyer_fiscal('f2fu', year)
|
|
130
|
+
f2ts = foyer_fiscal('f2ts', year)
|
|
131
|
+
f2tr = foyer_fiscal('f2tr', year)
|
|
132
|
+
f2tt = foyer_fiscal('f2tt', year)
|
|
133
|
+
f2go = foyer_fiscal('f2go', year)
|
|
134
|
+
|
|
135
|
+
result = where(imposition_au_bareme, 0, assurance_vie_pfu_ir + f2dc + f2fu + f2ts + f2tr + f2tt + f2go)
|
|
136
|
+
|
|
137
|
+
return result / 12
|
|
138
|
+
|
|
139
|
+
def formula_2019_01_01(foyer_fiscal, period, parameters):
|
|
140
|
+
'''
|
|
141
|
+
Note : cette variable est définie à l'échelle du mois pour être en cohérence avec les variables qu'elle remplace
|
|
142
|
+
(à savoir revenus_capitaux_prelevement_bareme et revenus_capitaux_prelevement_liberatoire)
|
|
143
|
+
Brochure pratique revenus 2019 page 123 et 340: https://www.impots.gouv.fr/www2/fichiers/documentation/brochure/ir_2020/accueil.htm
|
|
144
|
+
Nouvelle variable 'Intérêts imposables des obligations remboursables en actions détenues dans le PEA-PME' (2tq) qui est éligible au pfu. Ces revenus étaient comptés dans la variable 2tr auparavant.
|
|
145
|
+
'''
|
|
146
|
+
year = period.this_year
|
|
147
|
+
imposition_au_bareme = foyer_fiscal('f2op', year)
|
|
115
148
|
assurance_vie_pfu_ir = foyer_fiscal('assurance_vie_pfu_ir', year)
|
|
116
149
|
f2dc = foyer_fiscal('f2dc', year)
|
|
117
150
|
f2fu = foyer_fiscal('f2fu', year)
|
|
@@ -119,8 +152,43 @@ class revenus_capitaux_prelevement_forfaitaire_unique_ir(Variable):
|
|
|
119
152
|
f2tr = foyer_fiscal('f2tr', year)
|
|
120
153
|
f2tt = foyer_fiscal('f2tt', year)
|
|
121
154
|
f2go = foyer_fiscal('f2go', year)
|
|
155
|
+
f2tq = foyer_fiscal('f2tq', year)
|
|
122
156
|
|
|
123
|
-
|
|
157
|
+
result = where(imposition_au_bareme, 0, assurance_vie_pfu_ir + f2dc + f2fu + f2ts + f2tr + f2tt + f2go + f2tq)
|
|
158
|
+
|
|
159
|
+
return result / 12
|
|
160
|
+
|
|
161
|
+
def formula_2020_01_01(foyer_fiscal, period, parameters):
|
|
162
|
+
'''
|
|
163
|
+
Note : cette variable est définie à l'échelle du mois pour être en cohérence avec les variables qu'elle remplace
|
|
164
|
+
(à savoir revenus_capitaux_prelevement_bareme et revenus_capitaux_prelevement_liberatoire)
|
|
165
|
+
|
|
166
|
+
Nouvelle variable 'Produits des plans d’épargne retraite – sortie en capital' (2tz) qui est éligible au pfu. Ces revenus étaient comptés dans la variable 2tr auparavant.
|
|
167
|
+
Source: Brochure pratique revenus 2020 pages 119, 132 et 364: https://www.impots.gouv.fr/www2/fichiers/documentation/brochure/ir_2021/accueil.htm
|
|
168
|
+
|
|
169
|
+
A compter de l’imposition des revenus de 2020, le montant des revenus 2GO est multiplié par un coefficient de 1,25 pour le calcul de l’impôt sur le revenu quelles que
|
|
170
|
+
soient les modalités d’imposition de ces revenus (prélèvement forfaitaire unique de 12,8% ou option pour le barème progressif). Jusqu'en 2019, ce coefficient ne s'appliquait qu'en
|
|
171
|
+
cas d'option pour le barème progressif.
|
|
172
|
+
Sources:
|
|
173
|
+
- Brochure pratique revenus 2020 page 130: https://www.impots.gouv.fr/www2/fichiers/documentation/brochure/ir_2021/accueil.htm
|
|
174
|
+
- Brochure pratique revenus 2019 page 120: https://www.impots.gouv.fr/www2/fichiers/documentation/brochure/ir_2020/accueil.htm
|
|
175
|
+
'''
|
|
176
|
+
year = period.this_year
|
|
177
|
+
imposition_au_bareme = foyer_fiscal('f2op', year)
|
|
178
|
+
P = parameters(period).impot_revenu.calcul_revenus_imposables.rvcm
|
|
179
|
+
assurance_vie_pfu_ir = foyer_fiscal('assurance_vie_pfu_ir', year)
|
|
180
|
+
f2dc = foyer_fiscal('f2dc', year)
|
|
181
|
+
f2fu = foyer_fiscal('f2fu', year)
|
|
182
|
+
f2ts = foyer_fiscal('f2ts', year)
|
|
183
|
+
f2tr = foyer_fiscal('f2tr', year)
|
|
184
|
+
f2tt = foyer_fiscal('f2tt', year)
|
|
185
|
+
f2go = foyer_fiscal('f2go', year)
|
|
186
|
+
f2tq = foyer_fiscal('f2tq', year)
|
|
187
|
+
f2tz = foyer_fiscal('f2tz', year)
|
|
188
|
+
|
|
189
|
+
result = where(imposition_au_bareme, 0, assurance_vie_pfu_ir + f2dc + f2fu + f2ts + f2tr + f2tt + f2go * P.majoration_revenus_reputes_distribues + f2tq + f2tz)
|
|
190
|
+
|
|
191
|
+
return result / 12
|
|
124
192
|
|
|
125
193
|
|
|
126
194
|
class plus_values_prelevement_forfaitaire_unique_ir(Variable):
|
|
@@ -131,15 +199,19 @@ class plus_values_prelevement_forfaitaire_unique_ir(Variable):
|
|
|
131
199
|
definition_period = YEAR
|
|
132
200
|
|
|
133
201
|
def formula_2018_01_01(foyer_fiscal, period, parameters):
|
|
202
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
134
203
|
f3sb = foyer_fiscal('f3sb', period)
|
|
135
204
|
f3ua = foyer_fiscal('f3ua', period)
|
|
136
205
|
f3va = foyer_fiscal('f3va', period)
|
|
137
206
|
f3vg = foyer_fiscal('f3vg', period)
|
|
138
207
|
f3tj = foyer_fiscal('f3tj', period)
|
|
139
208
|
|
|
140
|
-
|
|
209
|
+
result = where(imposition_au_bareme, 0, f3sb + max_(0, f3ua - f3va) + f3vg + f3tj)
|
|
210
|
+
|
|
211
|
+
return result
|
|
141
212
|
|
|
142
213
|
def formula_2019_01_01(foyer_fiscal, period, parameters):
|
|
214
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
143
215
|
f3sb = foyer_fiscal('f3sb', period)
|
|
144
216
|
f3ua = foyer_fiscal('f3ua', period)
|
|
145
217
|
f3va = foyer_fiscal('f3va', period)
|
|
@@ -147,12 +219,14 @@ class plus_values_prelevement_forfaitaire_unique_ir(Variable):
|
|
|
147
219
|
f3tj = foyer_fiscal('f3tj', period)
|
|
148
220
|
f3tk = foyer_fiscal('f3tk', period)
|
|
149
221
|
f3vt = foyer_fiscal('f3vt', period)
|
|
150
|
-
f3an = foyer_fiscal('f3an', period)
|
|
222
|
+
f3an = foyer_fiscal('f3an', period) # Actifs numériques toujours soumis au pfu, pas d'option d'imposition au barème
|
|
223
|
+
|
|
224
|
+
pre_result = where(imposition_au_bareme, 0, f3sb + max_(0, f3ua - f3va) + f3vg + max_(0, f3tj - f3tk) + f3vt)
|
|
151
225
|
|
|
152
|
-
return
|
|
226
|
+
return f3an + pre_result
|
|
153
227
|
|
|
154
228
|
|
|
155
|
-
class
|
|
229
|
+
class prelevement_forfaitaire_unique_ir_hors_assurance_vie(Variable):
|
|
156
230
|
value_type = float
|
|
157
231
|
entity = FoyerFiscal
|
|
158
232
|
label = "Partie du prélèvement forfaitaire unique associée à l'impôt sur le revenu (hors assurance-vie, épargne solidaire et produits venant des états non-coopératifs)"
|
|
@@ -165,25 +239,19 @@ class prelevement_forfaitaire_unique_ir_hors_assurance_vie_epargne_solidaire_eta
|
|
|
165
239
|
def formula_2018_01_01(foyer_fiscal, period, parameters):
|
|
166
240
|
P = parameters(period).taxation_capital.prelevement_forfaitaire.partir_2018
|
|
167
241
|
|
|
168
|
-
# Revenus des valeurs et capitaux mobiliers hors assurance-vie
|
|
169
|
-
# Note : Les revenus d'assurance-vie, de l'épargne solidaire et des produits des états non-coopératifs ont été ajoutés dans les variables f2ee et f2dh (cf. docstring de ces varables pour une explication), d'où le fait qu'on soustrait ici ces variables de revenus_capitaux_prelevement_forfaitaire_unique_ir
|
|
242
|
+
# Revenus des valeurs et capitaux mobiliers hors assurance-vie
|
|
170
243
|
revenus_capitaux_prelevement_forfaitaire_unique_ir = foyer_fiscal('revenus_capitaux_prelevement_forfaitaire_unique_ir', period, options = [ADD])
|
|
171
244
|
assurance_vie_pfu_ir = foyer_fiscal('assurance_vie_pfu_ir', period)
|
|
172
|
-
|
|
173
|
-
produit_etats_non_cooperatif = foyer_fiscal('produit_etats_non_cooperatif', period)
|
|
174
|
-
revenus_capitaux_prelevement_forfaitaire_unique_ir_hors_assurance_vie_epargne_solidaire_etats_non_cooperatifs = max_(
|
|
175
|
-
0,
|
|
245
|
+
revenus_capitaux_prelevement_forfaitaire_unique_ir_hors_assurance_vie = (
|
|
176
246
|
revenus_capitaux_prelevement_forfaitaire_unique_ir
|
|
177
247
|
- assurance_vie_pfu_ir
|
|
178
|
-
- produit_epargne_solidaire
|
|
179
|
-
- produit_etats_non_cooperatif
|
|
180
248
|
)
|
|
181
249
|
|
|
182
250
|
# Plus-values
|
|
183
251
|
plus_values_prelevement_forfaitaire_unique_ir = foyer_fiscal('plus_values_prelevement_forfaitaire_unique_ir', period)
|
|
184
252
|
|
|
185
253
|
assiette_pfu_hors_assurance_vie = (
|
|
186
|
-
|
|
254
|
+
revenus_capitaux_prelevement_forfaitaire_unique_ir_hors_assurance_vie
|
|
187
255
|
+ plus_values_prelevement_forfaitaire_unique_ir
|
|
188
256
|
)
|
|
189
257
|
|
|
@@ -201,6 +269,7 @@ class prelevement_forfaitaire_unique_ir_sur_assurance_vie(Variable):
|
|
|
201
269
|
P1_taux_reduit_av = parameters(period).taxation_capital.prelevement_forfaitaire.partir_2018.taux_prelevement_produits_assurance_vie_non_eligibles_prelevement_forfaitaire_unique
|
|
202
270
|
P2 = parameters(period).impot_revenu.calcul_revenus_imposables.rvcm
|
|
203
271
|
|
|
272
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
204
273
|
maries_ou_pacses = foyer_fiscal('maries_ou_pacses', period)
|
|
205
274
|
f2ch = foyer_fiscal('f2ch', period)
|
|
206
275
|
f2zz = foyer_fiscal('f2zz', period)
|
|
@@ -209,13 +278,13 @@ class prelevement_forfaitaire_unique_ir_sur_assurance_vie(Variable):
|
|
|
209
278
|
|
|
210
279
|
abattement_residuel = max_(P2.produits_assurances_vies_assimiles.abattement * (1 + maries_ou_pacses) - f2ch, 0)
|
|
211
280
|
abattement_residuel2 = max_(abattement_residuel - f2vv, 0)
|
|
212
|
-
pfu_ir_sur_assurance_vie =
|
|
281
|
+
pfu_ir_sur_assurance_vie = where(imposition_au_bareme, 0,
|
|
213
282
|
(f2zz * P1_taux)
|
|
214
283
|
+ (max_(f2vv - abattement_residuel, 0) * P1_taux_reduit_av)
|
|
215
284
|
+ (max_(f2ww - abattement_residuel2, 0) * P1_taux)
|
|
216
285
|
)
|
|
217
286
|
|
|
218
|
-
return pfu_ir_sur_assurance_vie
|
|
287
|
+
return -pfu_ir_sur_assurance_vie
|
|
219
288
|
|
|
220
289
|
|
|
221
290
|
class prelevement_forfaitaire_unique_ir(Variable):
|
|
@@ -225,10 +294,10 @@ class prelevement_forfaitaire_unique_ir(Variable):
|
|
|
225
294
|
definition_period = YEAR
|
|
226
295
|
|
|
227
296
|
def formula_2018_01_01(foyer_fiscal, period, parameters):
|
|
228
|
-
|
|
297
|
+
prelevement_forfaitaire_unique_ir_hors_assurance_vie = foyer_fiscal('prelevement_forfaitaire_unique_ir_hors_assurance_vie', period)
|
|
229
298
|
prelevement_forfaitaire_unique_ir_sur_assurance_vie = foyer_fiscal('prelevement_forfaitaire_unique_ir_sur_assurance_vie', period)
|
|
230
299
|
|
|
231
300
|
return (
|
|
232
|
-
|
|
301
|
+
prelevement_forfaitaire_unique_ir_hors_assurance_vie
|
|
233
302
|
+ prelevement_forfaitaire_unique_ir_sur_assurance_vie
|
|
234
303
|
)
|
|
@@ -87,9 +87,9 @@ class prelevement_forfaitaire_liberatoire(Variable):
|
|
|
87
87
|
A priori, cette ancienne formule n'est pas entièrement correcte (application d'un taux unique à la case 2EE par exemple) et mériterait d'être corrigée.
|
|
88
88
|
(2) Cette variable ne comprend pas la taxation forfaitaire à 24% associée
|
|
89
89
|
à la base f2fa, qui est prise en compte via la variable tax_rvcm_forfaitaire,
|
|
90
|
-
qui est incluse dans
|
|
91
|
-
mais apparemment pas à la source. Elle serait calculée au moment de l'
|
|
92
|
-
d'où le fait de l'inclure dans la variable
|
|
90
|
+
qui est incluse dans impot_revenu_restant_a_payer. Cette taxaiton à 24% est certes forfaitaire,
|
|
91
|
+
mais apparemment pas à la source. Elle serait calculée au moment de l'impot_revenu_restant_a_payer,
|
|
92
|
+
d'où le fait de l'inclure dans la variable impot_revenu_restant_a_payer.
|
|
93
93
|
'''
|
|
94
94
|
|
|
95
95
|
assurance_vie_pl_non_anonyme_plus8ans_depuis1990 = foyer_fiscal('assurance_vie_pl_non_anonyme_plus8ans_depuis1990', period)
|