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
|
@@ -564,7 +564,7 @@ class isf_ifi_avant_plaf(Variable):
|
|
|
564
564
|
class total_impots_plafonnement_isf_ifi(Variable):
|
|
565
565
|
value_type = float
|
|
566
566
|
entity = FoyerFiscal
|
|
567
|
-
label = "Total des impôts dus au titre des revenus et produits (
|
|
567
|
+
label = "Total des impôts dus au titre des revenus et produits (iai, contribution_exceptionnelle_hauts_revenus, prélèvements forfaitaires, prélèvements sociaux) + ISF et IFI. Utilisé pour calculer le montant du plafonnement de l'ISF et de l'IFI."
|
|
568
568
|
definition_period = YEAR
|
|
569
569
|
|
|
570
570
|
def formula(foyer_fiscal, period):
|
|
@@ -575,8 +575,6 @@ class total_impots_plafonnement_isf_ifi(Variable):
|
|
|
575
575
|
'''
|
|
576
576
|
isf_ifi_avant_plaf = foyer_fiscal('isf_ifi_avant_plaf', period)
|
|
577
577
|
irpp_economique = foyer_fiscal('irpp_economique', period)
|
|
578
|
-
prelevement_forfaitaire_liberatoire = foyer_fiscal('prelevement_forfaitaire_liberatoire', period)
|
|
579
|
-
prelevement_forfaitaire_unique_ir = foyer_fiscal('prelevement_forfaitaire_unique_ir', period)
|
|
580
578
|
ir_pv_immo = foyer_fiscal('ir_pv_immo', period)
|
|
581
579
|
crds_i = foyer_fiscal.members('crds', period)
|
|
582
580
|
csg_i = foyer_fiscal.members('csg', period)
|
|
@@ -587,8 +585,6 @@ class total_impots_plafonnement_isf_ifi(Variable):
|
|
|
587
585
|
return (
|
|
588
586
|
isf_ifi_avant_plaf
|
|
589
587
|
- irpp_economique
|
|
590
|
-
- prelevement_forfaitaire_liberatoire
|
|
591
|
-
- prelevement_forfaitaire_unique_ir
|
|
592
588
|
- ir_pv_immo
|
|
593
589
|
- crds
|
|
594
590
|
- csg
|
|
@@ -616,8 +612,8 @@ class revenus_et_produits_plafonnement_isf_ifi(Variable):
|
|
|
616
612
|
rag_i = foyer_fiscal.members('rag', period)
|
|
617
613
|
rpns_exon_i = foyer_fiscal.members('rpns_exon', period)
|
|
618
614
|
rpns_pvct_i = foyer_fiscal.members('rpns_pvct', period)
|
|
619
|
-
revenus_capitaux_prelevement_bareme = foyer_fiscal('revenus_capitaux_prelevement_bareme', period, options = [ADD])
|
|
620
|
-
revenus_capitaux_prelevement_liberatoire = foyer_fiscal('revenus_capitaux_prelevement_liberatoire', period, options = [ADD])
|
|
615
|
+
revenus_capitaux_prelevement_bareme = foyer_fiscal('revenus_capitaux_prelevement_bareme', period, options = [ADD])
|
|
616
|
+
revenus_capitaux_prelevement_liberatoire = foyer_fiscal('revenus_capitaux_prelevement_liberatoire', period, options = [ADD])
|
|
621
617
|
revenus_capitaux_prelevement_forfaitaire_unique_ir = foyer_fiscal('revenus_capitaux_prelevement_forfaitaire_unique_ir', period, options = [ADD]) # Existe à partir de 2018
|
|
622
618
|
plus_values_base_large = foyer_fiscal('plus_values_base_large', period)
|
|
623
619
|
assurance_vie_ps_exoneree_irpp_pl = foyer_fiscal('assurance_vie_ps_exoneree_irpp_pl', period)
|
|
@@ -748,7 +744,7 @@ class isf_ifi(Variable):
|
|
|
748
744
|
# calcul de l'ensemble des revenus du contribuable
|
|
749
745
|
|
|
750
746
|
|
|
751
|
-
# TODO: à reintégrer dans
|
|
747
|
+
# TODO: à reintégrer dans impot_revenu_restant_a_payer
|
|
752
748
|
class rvcm_plus_abat(Variable):
|
|
753
749
|
value_type = float
|
|
754
750
|
entity = FoyerFiscal
|
|
@@ -772,7 +768,7 @@ class maj_cga(Variable):
|
|
|
772
768
|
label = 'Majoration pour non adhésion à un centre de gestion agréé (pour chaque individu du foyer)'
|
|
773
769
|
definition_period = YEAR
|
|
774
770
|
|
|
775
|
-
# TODO: à reintégrer dans
|
|
771
|
+
# TODO: à reintégrer dans impot_revenu_restant_a_payer (et vérifier au passage que frag_impo est dans la majo_cga
|
|
776
772
|
def formula(individu, period, parameters):
|
|
777
773
|
frag_impo = individu('frag_impo', period)
|
|
778
774
|
nrag_impg = individu('nrag_impg', period)
|
|
@@ -872,7 +868,7 @@ class bouclier_imp_gen(Variable): # # ajouter CSG- CRDS
|
|
|
872
868
|
definition_period = YEAR
|
|
873
869
|
|
|
874
870
|
def formula_2006(foyer_fiscal, period, parameters):
|
|
875
|
-
|
|
871
|
+
impot_revenu_restant_a_payer = foyer_fiscal('impot_revenu_restant_a_payer', period)
|
|
876
872
|
tax_fonc = foyer_fiscal('tax_fonc', period)
|
|
877
873
|
isf_ifi = foyer_fiscal('isf_ifi', period)
|
|
878
874
|
csg_deductible_salaire_i = foyer_fiscal.members('csg_deductible_salaire', period)
|
|
@@ -882,7 +878,6 @@ class bouclier_imp_gen(Variable): # # ajouter CSG- CRDS
|
|
|
882
878
|
csg_deductible_chomage_i = foyer_fiscal.members('csg_deductible_chomage', period)
|
|
883
879
|
csg_deductible_retraite_i = foyer_fiscal.members('csg_deductible_retraite', period)
|
|
884
880
|
csg_imposable_retraite_i = foyer_fiscal.members('csg_imposable_retraite', period)
|
|
885
|
-
prelevement_forfaitaire_liberatoire = foyer_fiscal('prelevement_forfaitaire_liberatoire', period)
|
|
886
881
|
|
|
887
882
|
prelevements_sociaux_revenus_capital = foyer_fiscal('prelevements_sociaux_revenus_capital', period)
|
|
888
883
|
crds_salaire = foyer_fiscal.sum(crds_salaire_i)
|
|
@@ -899,11 +894,11 @@ class bouclier_imp_gen(Variable): # # ajouter CSG- CRDS
|
|
|
899
894
|
# # ajouter Prelèvements sources/ libé
|
|
900
895
|
# # ajouter crds rstd
|
|
901
896
|
# # impôt sur les plus-values immo et cession de fonds de commerce
|
|
902
|
-
imp1 = prelevements_sociaux_revenus_capital + csg_deductible_salaire + csg_deductible_chomage + crds_salaire + csg_deductible_retraite
|
|
897
|
+
imp1 = prelevements_sociaux_revenus_capital + csg_deductible_salaire + csg_deductible_chomage + crds_salaire + csg_deductible_retraite
|
|
903
898
|
'''
|
|
904
899
|
Impôts payés en l'année 'n' au titre des revenus réalisés sur l'année 'n'
|
|
905
900
|
'''
|
|
906
|
-
imp2 =
|
|
901
|
+
imp2 = impot_revenu_restant_a_payer + isf_ifi + taxe_habitation + tax_fonc + csg_imposable_salaire + csg_imposable_chomage + csg_imposable_retraite
|
|
907
902
|
'''
|
|
908
903
|
Impôts payés en l'année 'n' au titre des revenus réalisés en 'n-1'
|
|
909
904
|
'''
|
|
@@ -561,7 +561,7 @@ class casa(Variable):
|
|
|
561
561
|
|
|
562
562
|
def formula_2013_04_01(individu, period, parameters):
|
|
563
563
|
retraite_brute = individu('retraite_brute', period)
|
|
564
|
-
ir = individu.foyer_fiscal('
|
|
564
|
+
ir = individu.foyer_fiscal('impot_revenu_restant_a_payer', period = period.last_year)
|
|
565
565
|
parameters = parameters(period)
|
|
566
566
|
seuil_exoneration = parameters.prelevements_sociaux.contributions_sociales.csg.remplacement.seuils.seuil_ir
|
|
567
567
|
|
|
@@ -714,9 +714,7 @@ class aide_logement_base_revenus_fiscaux(Variable):
|
|
|
714
714
|
|
|
715
715
|
def formula(foyer_fiscal, period):
|
|
716
716
|
rente_viagere_titre_onereux_net = foyer_fiscal('rente_viagere_titre_onereux_net', period)
|
|
717
|
-
# Supprimée à partir de 2018
|
|
718
717
|
rev_cat_rvcm = foyer_fiscal('revenu_categoriel_capital', period)
|
|
719
|
-
# Supprimée à partir de 2018
|
|
720
718
|
revenus_capitaux_prelevement_liberatoire = foyer_fiscal('revenus_capitaux_prelevement_liberatoire', period, options = [ADD])
|
|
721
719
|
# Apparait à partir de 2018
|
|
722
720
|
revenus_capitaux_prelevement_forfaitaire_unique_ir = foyer_fiscal('revenus_capitaux_prelevement_forfaitaire_unique_ir', period, options = [ADD])
|
|
@@ -724,7 +722,6 @@ class aide_logement_base_revenus_fiscaux(Variable):
|
|
|
724
722
|
f7ga = foyer_fiscal('f7ga', period)
|
|
725
723
|
f7gb = foyer_fiscal('f7gb', period)
|
|
726
724
|
f7gc = foyer_fiscal('f7gc', period)
|
|
727
|
-
# Supprimée à partir de 2018
|
|
728
725
|
rev_cat_pv = foyer_fiscal('revenu_categoriel_plus_values', period)
|
|
729
726
|
# Apparait à partir de 2018
|
|
730
727
|
plus_values_prelevement_forfaitaire_unique_ir = foyer_fiscal('plus_values_prelevement_forfaitaire_unique_ir', period)
|
|
@@ -125,9 +125,9 @@ class rev_coll(Variable):
|
|
|
125
125
|
# Quand rev_coll est calculé sur une année glissante, rente_viagere_titre_onereux_net et pensions_alimentaires_versees sont calculés sur l'année légale correspondante.
|
|
126
126
|
rente_viagere_titre_onereux_net = foyer_fiscal('rente_viagere_titre_onereux_net', period)
|
|
127
127
|
pensions_alimentaires_versees = foyer_fiscal('pensions_alimentaires_versees', period)
|
|
128
|
-
rev_cat_rvcm = foyer_fiscal('revenu_categoriel_capital', period)
|
|
129
|
-
revenus_capitaux_prelevement_liberatoire = foyer_fiscal('revenus_capitaux_prelevement_liberatoire', period, options = [ADD])
|
|
130
|
-
revenus_capitaux_prelevement_forfaitaire_unique_ir = foyer_fiscal('revenus_capitaux_prelevement_forfaitaire_unique_ir', period, options = [ADD])
|
|
128
|
+
rev_cat_rvcm = foyer_fiscal('revenu_categoriel_capital', period)
|
|
129
|
+
revenus_capitaux_prelevement_liberatoire = foyer_fiscal('revenus_capitaux_prelevement_liberatoire', period, options = [ADD])
|
|
130
|
+
revenus_capitaux_prelevement_forfaitaire_unique_ir = foyer_fiscal('revenus_capitaux_prelevement_forfaitaire_unique_ir', period, options = [ADD])
|
|
131
131
|
abat_spe = foyer_fiscal('abattements_speciaux_prestations_familiales', period)
|
|
132
132
|
revenu_categoriel_foncier = foyer_fiscal('revenu_categoriel_foncier', period)
|
|
133
133
|
f7ga = foyer_fiscal('f7ga', period)
|
|
@@ -132,6 +132,7 @@ class f2tq(Variable):
|
|
|
132
132
|
unit = 'currency'
|
|
133
133
|
entity = FoyerFiscal
|
|
134
134
|
label = 'Intérêts imposables des obligations remboursables en actions détenues dans le PEA-PME'
|
|
135
|
+
# start_date = date(2019, 1, 1)
|
|
135
136
|
definition_period = YEAR
|
|
136
137
|
|
|
137
138
|
|
|
@@ -173,6 +174,16 @@ class f2tr(Variable):
|
|
|
173
174
|
definition_period = YEAR
|
|
174
175
|
|
|
175
176
|
|
|
177
|
+
class f2tz(Variable):
|
|
178
|
+
cerfa_field = '2TZ'
|
|
179
|
+
value_type = float
|
|
180
|
+
unit = 'currency'
|
|
181
|
+
entity = FoyerFiscal
|
|
182
|
+
label = "Produits des plans d'épargne retraite - sortie en capital"
|
|
183
|
+
definition_period = YEAR
|
|
184
|
+
# start_date = date(2020, 1, 1)
|
|
185
|
+
|
|
186
|
+
|
|
176
187
|
class f2yy(Variable):
|
|
177
188
|
cerfa_field = '2YY'
|
|
178
189
|
value_type = float
|
|
@@ -503,10 +514,87 @@ class revenus_capitaux_prelevement_bareme(Variable):
|
|
|
503
514
|
|
|
504
515
|
def formula_2018_01_01(foyer_fiscal, period, parameters):
|
|
505
516
|
year = period.this_year
|
|
517
|
+
imposition_au_bareme = foyer_fiscal('f2op', year)
|
|
518
|
+
majoration_revenus_reputes_distribues = parameters(period).impot_revenu.calcul_revenus_imposables.rvcm.majoration_revenus_reputes_distribues
|
|
519
|
+
|
|
520
|
+
# Revenus à prendre en compte dans les deux cas: pfu ou imposition au barème
|
|
521
|
+
f2ch = foyer_fiscal('f2ch', year)
|
|
522
|
+
f2yy = foyer_fiscal('f2yy', year)
|
|
523
|
+
|
|
524
|
+
# Revenus à prendre en compte dans un seul cas: imposition au barème
|
|
525
|
+
f2dc = foyer_fiscal('f2dc', year)
|
|
526
|
+
f2fu = foyer_fiscal('f2fu', year)
|
|
527
|
+
f2go = foyer_fiscal('f2go', year)
|
|
528
|
+
f2tr = foyer_fiscal('f2tr', year)
|
|
529
|
+
f2ts = foyer_fiscal('f2ts', year)
|
|
530
|
+
f2tt = foyer_fiscal('f2tt', year)
|
|
531
|
+
f2vv = foyer_fiscal('f2vv', year)
|
|
532
|
+
f2ww = foyer_fiscal('f2ww', year)
|
|
533
|
+
f2zz = foyer_fiscal('f2zz', year)
|
|
534
|
+
pre_result = where(imposition_au_bareme, f2dc + f2ts + f2go * majoration_revenus_reputes_distribues + f2tr + f2fu + f2tt + f2vv + f2ww + f2zz, 0)
|
|
535
|
+
|
|
536
|
+
return (f2ch + f2yy + pre_result) / 12
|
|
537
|
+
|
|
538
|
+
def formula_2019_01_01(foyer_fiscal, period, parameters):
|
|
539
|
+
'''
|
|
540
|
+
Seule différence avec la formule précédente :
|
|
541
|
+
On ajoute la case 2TQ qui représente des revenus qui étaient comptés dans 2TR jusqu'en 2018.
|
|
542
|
+
Source : Brochure pratique revenus 2019 page 123 et 340: https://www.impots.gouv.fr/www2/fichiers/documentation/brochure/ir_2020/accueil.htm
|
|
543
|
+
'''
|
|
544
|
+
year = period.this_year
|
|
545
|
+
imposition_au_bareme = foyer_fiscal('f2op', year)
|
|
546
|
+
majoration_revenus_reputes_distribues = parameters(period).impot_revenu.calcul_revenus_imposables.rvcm.majoration_revenus_reputes_distribues
|
|
547
|
+
|
|
548
|
+
# Revenus à prendre en compte dans les deux cas: pfu ou imposition au barème
|
|
549
|
+
f2ch = foyer_fiscal('f2ch', year)
|
|
550
|
+
f2yy = foyer_fiscal('f2yy', year)
|
|
551
|
+
|
|
552
|
+
# Revenus à prendre en compte dans un seul cas: imposition au barème
|
|
553
|
+
f2dc = foyer_fiscal('f2dc', year)
|
|
554
|
+
f2fu = foyer_fiscal('f2fu', year)
|
|
555
|
+
f2go = foyer_fiscal('f2go', year)
|
|
556
|
+
f2tr = foyer_fiscal('f2tr', year)
|
|
557
|
+
f2ts = foyer_fiscal('f2ts', year)
|
|
558
|
+
f2tt = foyer_fiscal('f2tt', year)
|
|
559
|
+
f2vv = foyer_fiscal('f2vv', year)
|
|
560
|
+
f2ww = foyer_fiscal('f2ww', year)
|
|
561
|
+
f2zz = foyer_fiscal('f2zz', year)
|
|
562
|
+
f2tq = foyer_fiscal('f2tq', year)
|
|
563
|
+
|
|
564
|
+
pre_result = where(imposition_au_bareme, f2dc + f2ts + f2go * majoration_revenus_reputes_distribues + f2tr + f2fu + f2tt + f2vv + f2ww + f2zz + f2tq, 0)
|
|
565
|
+
|
|
566
|
+
return (f2ch + f2yy + pre_result) / 12
|
|
567
|
+
|
|
568
|
+
def formula_2020_01_01(foyer_fiscal, period, parameters):
|
|
569
|
+
'''
|
|
570
|
+
Seule différence avec la formule précédente :
|
|
571
|
+
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.
|
|
572
|
+
Source : Brochure pratique revenus 2020 page 119, 132 et 364: https://www.impots.gouv.fr/www2/fichiers/documentation/brochure/ir_2021/accueil.htm
|
|
573
|
+
'''
|
|
574
|
+
year = period.this_year
|
|
575
|
+
imposition_au_bareme = foyer_fiscal('f2op', year)
|
|
576
|
+
majoration_revenus_reputes_distribues = parameters(period).impot_revenu.calcul_revenus_imposables.rvcm.majoration_revenus_reputes_distribues
|
|
577
|
+
|
|
578
|
+
# Revenus à prendre en compte dans les deux cas: pfu ou imposition au barème
|
|
506
579
|
f2ch = foyer_fiscal('f2ch', year)
|
|
507
580
|
f2yy = foyer_fiscal('f2yy', year)
|
|
508
581
|
|
|
509
|
-
|
|
582
|
+
# Revenus à prendre en compte dans un seul cas: imposition au barème
|
|
583
|
+
f2dc = foyer_fiscal('f2dc', year)
|
|
584
|
+
f2fu = foyer_fiscal('f2fu', year)
|
|
585
|
+
f2go = foyer_fiscal('f2go', year)
|
|
586
|
+
f2tr = foyer_fiscal('f2tr', year)
|
|
587
|
+
f2ts = foyer_fiscal('f2ts', year)
|
|
588
|
+
f2tt = foyer_fiscal('f2tt', year)
|
|
589
|
+
f2vv = foyer_fiscal('f2vv', year)
|
|
590
|
+
f2ww = foyer_fiscal('f2ww', year)
|
|
591
|
+
f2zz = foyer_fiscal('f2zz', year)
|
|
592
|
+
f2tq = foyer_fiscal('f2tq', year)
|
|
593
|
+
f2tz = foyer_fiscal('f2tz', year)
|
|
594
|
+
|
|
595
|
+
pre_result = where(imposition_au_bareme, f2dc + f2ts + f2go * majoration_revenus_reputes_distribues + f2tr + f2fu + f2tt + f2vv + f2ww + f2zz + f2tq + f2tz, 0)
|
|
596
|
+
|
|
597
|
+
return (f2ch + f2yy + pre_result) / 12
|
|
510
598
|
|
|
511
599
|
|
|
512
600
|
class revenus_capitaux_prelevement_liberatoire(Variable):
|
|
@@ -378,7 +378,6 @@ class abattements_plus_values(Variable):
|
|
|
378
378
|
reference = 'http://bofip.impots.gouv.fr/bofip/9540-PGP'
|
|
379
379
|
label = "Abattements sur plus-values notamment pour durée de détention de droit commun, renforcé, et abattement en cas de départ à la retraite d'un dirigeant de PME (abattement fixe et pour durée de détention)"
|
|
380
380
|
definition_period = YEAR
|
|
381
|
-
end = '2017-12-31'
|
|
382
381
|
|
|
383
382
|
def formula_2013_01_01(foyer_fiscal, period):
|
|
384
383
|
f3sg = foyer_fiscal('f3sg', period)
|
|
@@ -405,6 +404,38 @@ class abattements_plus_values(Variable):
|
|
|
405
404
|
|
|
406
405
|
return f3sg + f3sl + f3va
|
|
407
406
|
|
|
407
|
+
def formula_2018_01_01(foyer_fiscal, period):
|
|
408
|
+
'''
|
|
409
|
+
A partir de 2018, si le foyer choisit l'imposition au barème des revenus éligibles au pfu, les plus-values entrent dans le calcul du rfr net d'abattement, on rajoute donc les abattements.
|
|
410
|
+
Cela n'est pas nécessaire dans le cas pfu puisque les plus-values entrent dans le calcul du rfr brut d'abattement.
|
|
411
|
+
'''
|
|
412
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
413
|
+
f3sg = foyer_fiscal('f3sg', period)
|
|
414
|
+
f3sl = foyer_fiscal('f3sl', period)
|
|
415
|
+
f3va = foyer_fiscal('f3va', period)
|
|
416
|
+
|
|
417
|
+
result = where(imposition_au_bareme, f3sg + f3sl + f3va, 0)
|
|
418
|
+
|
|
419
|
+
return result
|
|
420
|
+
|
|
421
|
+
def formula_2019_01_01(foyer_fiscal, period):
|
|
422
|
+
'''
|
|
423
|
+
A partir de 2019, les revenus de la variable 3tj peuvent bénéficier d'un abattement fixe de départ à la retraite d’un dirigeant de PME (3tk). Cet abattement s'applique lorsque
|
|
424
|
+
le foyer choisit l'imposition au barème des revenus éligibles au pfu, ils doivent donc dans ce cas être rajouté au calcul du rfr.
|
|
425
|
+
Sources:
|
|
426
|
+
- Brochure pratique revenus 2019 page 147: https://www.impots.gouv.fr/www2/fichiers/documentation/brochure/ir_2020/accueil.htm
|
|
427
|
+
- Brochure pratique revenus 2018 page 142: https://www.impots.gouv.fr/www2/fichiers/documentation/brochure/ir_2019/accueil.htm
|
|
428
|
+
'''
|
|
429
|
+
imposition_au_bareme = foyer_fiscal('f2op', period)
|
|
430
|
+
f3sg = foyer_fiscal('f3sg', period)
|
|
431
|
+
f3sl = foyer_fiscal('f3sl', period)
|
|
432
|
+
f3va = foyer_fiscal('f3va', period)
|
|
433
|
+
f3tk = foyer_fiscal('f3tk', period)
|
|
434
|
+
|
|
435
|
+
result = where(imposition_au_bareme, f3sg + f3sl + f3va + f3tk, 0)
|
|
436
|
+
|
|
437
|
+
return result
|
|
438
|
+
|
|
408
439
|
|
|
409
440
|
# Plus values et gains taxables à des taux forfaitaires
|
|
410
441
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
description: Seuil d'exonération (sur l'
|
|
1
|
+
description: Seuil d'exonération (sur l'impôt sur le revenu payé en N-1) de la Contribution SS additionnelle solidarité autonomie (CASA)
|
|
2
2
|
values:
|
|
3
3
|
2013-04-01:
|
|
4
4
|
value: 61
|
|
5
5
|
metadata:
|
|
6
|
-
short_label: Seuil d'exonération (sur l'
|
|
6
|
+
short_label: Seuil d'exonération (sur l'impôt sur le revenu payé en N-1)
|
|
7
7
|
last_value_still_valid_on: "2021-12-07"
|
|
8
8
|
label_en: "Additional SSC for autonomy (CASA: Additional solidarity Contribution for Autonomy)"
|
|
9
9
|
ipp_csv_id: casa_seuil
|
|
@@ -93,7 +93,7 @@ tax_benefit_system = FranceTaxBenefitSystem()
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
@timeit
|
|
96
|
-
def
|
|
96
|
+
def test_impot_revenu_restant_a_payer(year, impot_revenu_restant_a_payer, **variables_value_by_name):
|
|
97
97
|
simulation = simulations.Simulation(period = periods.period(year), tax_benefit_system = tax_benefit_system,
|
|
98
98
|
debug = args.verbose)
|
|
99
99
|
famille = simulation.entity_by_key_singular['famille']
|
|
@@ -112,7 +112,7 @@ def test_irpp(year, irpp, **variables_value_by_name):
|
|
|
112
112
|
add_member(foyer_fiscal, **variables_value_by_name_by_entity.get(foyer_fiscal, {}))
|
|
113
113
|
add_member(menage, **variables_value_by_name_by_entity.get(menage, {}))
|
|
114
114
|
add_member(individu, quifam = 1, quifoy = 1, quimen = 1, **variables_value_by_name_by_entity.get(individu, {}))
|
|
115
|
-
assert_near(simulation.calculate('
|
|
115
|
+
assert_near(simulation.calculate('impot_revenu_restant_a_payer'), impot_revenu_restant_a_payer, absolute_error_margin = 0.51)
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
def main():
|
|
@@ -124,153 +124,153 @@ def main():
|
|
|
124
124
|
|
|
125
125
|
logger.debug('salaire_imposable')
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
127
|
+
test_impot_revenu_restant_a_payer(2010, -1181, salaire_imposable = 20000)
|
|
128
|
+
test_impot_revenu_restant_a_payer(2010, -7934, salaire_imposable = 50000)
|
|
129
|
+
test_impot_revenu_restant_a_payer(2010, -42338, salaire_imposable = 150000)
|
|
130
|
+
test_impot_revenu_restant_a_payer(2011, -1181, salaire_imposable = 20000)
|
|
131
|
+
test_impot_revenu_restant_a_payer(2011, -7934, salaire_imposable = 50000)
|
|
132
|
+
test_impot_revenu_restant_a_payer(2011, -42338, salaire_imposable = 150000)
|
|
133
|
+
test_impot_revenu_restant_a_payer(2012, -1181, salaire_imposable = 20000)
|
|
134
|
+
test_impot_revenu_restant_a_payer(2012, -7934, salaire_imposable = 50000)
|
|
135
|
+
test_impot_revenu_restant_a_payer(2012, -43222, salaire_imposable = 150000)
|
|
136
|
+
test_impot_revenu_restant_a_payer(2013, -1170, salaire_imposable = 20000)
|
|
137
|
+
test_impot_revenu_restant_a_payer(2013, -7889, salaire_imposable = 50000)
|
|
138
|
+
test_impot_revenu_restant_a_payer(2013, -43076, salaire_imposable = 150000)
|
|
139
139
|
|
|
140
140
|
logger.debug('retraite_imposable')
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
142
|
+
test_impot_revenu_restant_a_payer(2010, -1181, retraite_imposable = 20000)
|
|
143
|
+
test_impot_revenu_restant_a_payer(2010, -8336, retraite_imposable = 50000)
|
|
144
|
+
test_impot_revenu_restant_a_payer(2010, -46642, retraite_imposable = 150000)
|
|
145
|
+
test_impot_revenu_restant_a_payer(2011, -1181, retraite_imposable = 20000)
|
|
146
|
+
test_impot_revenu_restant_a_payer(2011, -8336, retraite_imposable = 50000)
|
|
147
|
+
test_impot_revenu_restant_a_payer(2011, -46642, retraite_imposable = 150000)
|
|
148
|
+
test_impot_revenu_restant_a_payer(2012, -1181, retraite_imposable = 20000)
|
|
149
|
+
test_impot_revenu_restant_a_payer(2012, -8336, retraite_imposable = 50000)
|
|
150
|
+
test_impot_revenu_restant_a_payer(2012, -46642, retraite_imposable = 150000)
|
|
151
|
+
test_impot_revenu_restant_a_payer(2013, -1170, retraite_imposable = 20000)
|
|
152
|
+
test_impot_revenu_restant_a_payer(2013, -8283, retraite_imposable = 50000)
|
|
153
|
+
test_impot_revenu_restant_a_payer(2013, -46523, retraite_imposable = 150000)
|
|
154
154
|
|
|
155
155
|
logger.debug('f2da')
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
#
|
|
167
|
-
#
|
|
168
|
-
#
|
|
157
|
+
test_impot_revenu_restant_a_payer(2010, 0, f2da = 20000)
|
|
158
|
+
test_impot_revenu_restant_a_payer(2010, 0, f2da = 50000)
|
|
159
|
+
test_impot_revenu_restant_a_payer(2010, 0, f2da = 150000)
|
|
160
|
+
test_impot_revenu_restant_a_payer(2011, 0, f2da = 20000)
|
|
161
|
+
test_impot_revenu_restant_a_payer(2011, 0, f2da = 50000)
|
|
162
|
+
test_impot_revenu_restant_a_payer(2011, 0, f2da = 150000)
|
|
163
|
+
test_impot_revenu_restant_a_payer(2012, 0, f2da = 20000)
|
|
164
|
+
test_impot_revenu_restant_a_payer(2012, 0, f2da = 50000)
|
|
165
|
+
test_impot_revenu_restant_a_payer(2012, 0, f2da = 150000)
|
|
166
|
+
# test_impot_revenu_restant_a_payer(2013, 0, f2da = 20000)
|
|
167
|
+
# test_impot_revenu_restant_a_payer(2013, 0, f2da = 50000)
|
|
168
|
+
# test_impot_revenu_restant_a_payer(2013, 0, f2da = 150000)
|
|
169
169
|
|
|
170
170
|
logger.debug('f2dc')
|
|
171
171
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
#
|
|
182
|
-
#
|
|
183
|
-
#
|
|
172
|
+
test_impot_revenu_restant_a_payer(2010, 0, f2dc = 20000)
|
|
173
|
+
test_impot_revenu_restant_a_payer(2010, -2976, f2dc = 50000)
|
|
174
|
+
test_impot_revenu_restant_a_payer(2010, -22917, f2dc = 150000)
|
|
175
|
+
test_impot_revenu_restant_a_payer(2011, 0, f2dc = 20000)
|
|
176
|
+
test_impot_revenu_restant_a_payer(2011, -2976, f2dc = 50000)
|
|
177
|
+
test_impot_revenu_restant_a_payer(2011, -22917, f2dc = 150000)
|
|
178
|
+
test_impot_revenu_restant_a_payer(2012, 0, f2dc = 20000)
|
|
179
|
+
test_impot_revenu_restant_a_payer(2012, -3434, f2dc = 50000)
|
|
180
|
+
test_impot_revenu_restant_a_payer(2012, -23542, f2dc = 150000)
|
|
181
|
+
# test_impot_revenu_restant_a_payer(2013, 0, f2dc = 20000)
|
|
182
|
+
# test_impot_revenu_restant_a_payer(2013, 0, f2dc = 50000)
|
|
183
|
+
# test_impot_revenu_restant_a_payer(2013, 0, f2dc = 150000)
|
|
184
184
|
|
|
185
185
|
logger.debug('f2dh')
|
|
186
186
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
187
|
+
test_impot_revenu_restant_a_payer(2010, 345, f2dh = 20000)
|
|
188
|
+
test_impot_revenu_restant_a_payer(2010, 345, f2dh = 50000)
|
|
189
|
+
test_impot_revenu_restant_a_payer(2010, 345, f2dh = 150000)
|
|
190
|
+
test_impot_revenu_restant_a_payer(2011, 345, f2dh = 20000)
|
|
191
|
+
test_impot_revenu_restant_a_payer(2011, 345, f2dh = 50000)
|
|
192
|
+
test_impot_revenu_restant_a_payer(2011, 345, f2dh = 150000)
|
|
193
|
+
test_impot_revenu_restant_a_payer(2012, 345, f2dh = 20000)
|
|
194
|
+
test_impot_revenu_restant_a_payer(2012, 345, f2dh = 50000)
|
|
195
|
+
test_impot_revenu_restant_a_payer(2012, 345, f2dh = 150000)
|
|
196
|
+
test_impot_revenu_restant_a_payer(2013, 345, f2dh = 20000)
|
|
197
|
+
test_impot_revenu_restant_a_payer(2013, 345, f2dh = 50000)
|
|
198
|
+
test_impot_revenu_restant_a_payer(2013, 345, f2dh = 150000)
|
|
199
199
|
|
|
200
200
|
logger.debug('f2tr')
|
|
201
201
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
202
|
+
test_impot_revenu_restant_a_payer(2010, -1461, f2tr = 20000)
|
|
203
|
+
test_impot_revenu_restant_a_payer(2010, -9434, f2tr = 50000)
|
|
204
|
+
test_impot_revenu_restant_a_payer(2010, -48142, f2tr = 150000)
|
|
205
|
+
test_impot_revenu_restant_a_payer(2011, -1461, f2tr = 20000)
|
|
206
|
+
test_impot_revenu_restant_a_payer(2011, -9434, f2tr = 50000)
|
|
207
|
+
test_impot_revenu_restant_a_payer(2011, -48142, f2tr = 150000)
|
|
208
|
+
test_impot_revenu_restant_a_payer(2012, -1461, f2tr = 20000)
|
|
209
|
+
test_impot_revenu_restant_a_payer(2012, -9434, f2tr = 50000)
|
|
210
|
+
test_impot_revenu_restant_a_payer(2012, -48142, f2tr = 150000)
|
|
211
|
+
test_impot_revenu_restant_a_payer(2013, -1450, f2tr = 20000)
|
|
212
|
+
test_impot_revenu_restant_a_payer(2013, -9389, f2tr = 50000)
|
|
213
|
+
test_impot_revenu_restant_a_payer(2013, -48036, f2tr = 150000)
|
|
214
214
|
|
|
215
215
|
logger.debug('f2ts')
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
217
|
+
test_impot_revenu_restant_a_payer(2010, -1461, f2ts = 20000)
|
|
218
|
+
test_impot_revenu_restant_a_payer(2010, -9434, f2ts = 50000)
|
|
219
|
+
test_impot_revenu_restant_a_payer(2010, -48142, f2ts = 150000)
|
|
220
|
+
test_impot_revenu_restant_a_payer(2011, -1461, f2ts = 20000)
|
|
221
|
+
test_impot_revenu_restant_a_payer(2011, -9434, f2ts = 50000)
|
|
222
|
+
test_impot_revenu_restant_a_payer(2011, -48142, f2ts = 150000)
|
|
223
|
+
test_impot_revenu_restant_a_payer(2012, -1461, f2ts = 20000)
|
|
224
|
+
test_impot_revenu_restant_a_payer(2012, -9434, f2ts = 50000)
|
|
225
|
+
test_impot_revenu_restant_a_payer(2012, -48142, f2ts = 150000)
|
|
226
|
+
test_impot_revenu_restant_a_payer(2013, -1450, f2ts = 20000)
|
|
227
|
+
test_impot_revenu_restant_a_payer(2013, -9389, f2ts = 50000)
|
|
228
|
+
test_impot_revenu_restant_a_payer(2013, -48036, f2ts = 150000)
|
|
229
229
|
|
|
230
230
|
logger.debug('f3vg')
|
|
231
231
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
232
|
+
test_impot_revenu_restant_a_payer(2010, -3600, f3vg = 20000)
|
|
233
|
+
test_impot_revenu_restant_a_payer(2010, -9000, f3vg = 50000)
|
|
234
|
+
test_impot_revenu_restant_a_payer(2010, -27000, f3vg = 150000)
|
|
235
|
+
test_impot_revenu_restant_a_payer(2011, -3800, f3vg = 20000)
|
|
236
|
+
test_impot_revenu_restant_a_payer(2011, -9500, f3vg = 50000)
|
|
237
|
+
test_impot_revenu_restant_a_payer(2011, -28500, f3vg = 150000)
|
|
238
|
+
test_impot_revenu_restant_a_payer(2012, -4800, f3vg = 20000)
|
|
239
|
+
test_impot_revenu_restant_a_payer(2012, -12000, f3vg = 50000)
|
|
240
|
+
test_impot_revenu_restant_a_payer(2012, -36000, f3vg = 150000)
|
|
241
|
+
test_impot_revenu_restant_a_payer(2013, -1450, f3vg = 20000)
|
|
242
|
+
test_impot_revenu_restant_a_payer(2013, -9389, f3vg = 50000)
|
|
243
|
+
test_impot_revenu_restant_a_payer(2013, -48036, f3vg = 150000)
|
|
244
244
|
|
|
245
245
|
logger.debug('f3vz')
|
|
246
246
|
|
|
247
|
-
#
|
|
248
|
-
#
|
|
249
|
-
#
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
247
|
+
# test_impot_revenu_restant_a_payer(2010, 0, f3vz = 20000)
|
|
248
|
+
# test_impot_revenu_restant_a_payer(2010, 0, f3vz = 50000)
|
|
249
|
+
# test_impot_revenu_restant_a_payer(2010, 0, f3vz = 150000)
|
|
250
|
+
test_impot_revenu_restant_a_payer(2011, 0, f3vz = 20000)
|
|
251
|
+
test_impot_revenu_restant_a_payer(2011, 0, f3vz = 50000)
|
|
252
|
+
test_impot_revenu_restant_a_payer(2011, 0, f3vz = 150000)
|
|
253
|
+
test_impot_revenu_restant_a_payer(2012, 0, f3vz = 20000)
|
|
254
|
+
test_impot_revenu_restant_a_payer(2012, 0, f3vz = 50000)
|
|
255
|
+
test_impot_revenu_restant_a_payer(2012, 0, f3vz = 150000)
|
|
256
|
+
test_impot_revenu_restant_a_payer(2013, 0, f3vz = 20000)
|
|
257
|
+
test_impot_revenu_restant_a_payer(2013, 0, f3vz = 50000)
|
|
258
|
+
test_impot_revenu_restant_a_payer(2013, 0, f3vz = 150000)
|
|
259
259
|
|
|
260
260
|
logger.debug('f4ba')
|
|
261
261
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
262
|
+
test_impot_revenu_restant_a_payer(2010, -1461, f4ba = 20000)
|
|
263
|
+
test_impot_revenu_restant_a_payer(2010, -9434, f4ba = 50000)
|
|
264
|
+
test_impot_revenu_restant_a_payer(2010, -48142, f4ba = 150000)
|
|
265
|
+
test_impot_revenu_restant_a_payer(2011, -1461, f4ba = 20000)
|
|
266
|
+
test_impot_revenu_restant_a_payer(2011, -9434, f4ba = 50000)
|
|
267
|
+
test_impot_revenu_restant_a_payer(2011, -48142, f4ba = 150000)
|
|
268
|
+
test_impot_revenu_restant_a_payer(2012, -1461, f4ba = 20000)
|
|
269
|
+
test_impot_revenu_restant_a_payer(2012, -9434, f4ba = 50000)
|
|
270
|
+
test_impot_revenu_restant_a_payer(2012, -48142, f4ba = 150000)
|
|
271
|
+
test_impot_revenu_restant_a_payer(2013, -1450, f4ba = 20000)
|
|
272
|
+
test_impot_revenu_restant_a_payer(2013, -9389, f4ba = 50000)
|
|
273
|
+
test_impot_revenu_restant_a_payer(2013, -48036, f4ba = 150000)
|
|
274
274
|
|
|
275
275
|
|
|
276
276
|
if __name__ == '__main__':
|
|
File without changes
|
|
File without changes
|
|
File without changes
|