OpenFisca-France 154.0.2__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.

Files changed (22) hide show
  1. {OpenFisca_France-154.0.2.data → OpenFisca_France-155.0.0.data}/data/share/openfisca/openfisca-france/CHANGELOG.md +34 -0
  2. {OpenFisca_France-154.0.2.dist-info → OpenFisca_France-155.0.0.dist-info}/METADATA +1 -1
  3. {OpenFisca_France-154.0.2.dist-info → OpenFisca_France-155.0.0.dist-info}/RECORD +22 -22
  4. {OpenFisca_France-154.0.2.dist-info → OpenFisca_France-155.0.0.dist-info}/WHEEL +1 -1
  5. openfisca_france/model/mesures.py +8 -15
  6. openfisca_france/model/prelevements_obligatoires/impot_revenu/credits_impot.py +4 -5
  7. openfisca_france/model/prelevements_obligatoires/impot_revenu/ir.py +211 -32
  8. openfisca_france/model/prelevements_obligatoires/impot_revenu/prelevements_forfaitaires/ir_prelevement_forfaitaire_unique.py +88 -19
  9. openfisca_france/model/prelevements_obligatoires/impot_revenu/prelevements_forfaitaires/prelevement_forfaitaire_liberatoire.py +3 -3
  10. openfisca_france/model/prelevements_obligatoires/impot_revenu/variables_reductions_credits.py +15 -3
  11. openfisca_france/model/prelevements_obligatoires/isf.py +8 -13
  12. openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/contributions_sociales/remplacement.py +1 -1
  13. openfisca_france/model/prestations/aides_logement.py +0 -3
  14. openfisca_france/model/prestations/prestations_familiales/base_ressource.py +3 -3
  15. openfisca_france/model/revenus/autres.py +1 -1
  16. openfisca_france/model/revenus/capital/financier.py +89 -1
  17. openfisca_france/model/revenus/capital/plus_value.py +32 -1
  18. openfisca_france/parameters/prelevements_sociaux/cotisations_securite_sociale_regime_general/casa/seuil_exoneration_irpp_paye_en_n_1.yaml +2 -2
  19. openfisca_france/scripts/performance/measure_calculations_performance.py +122 -122
  20. {OpenFisca_France-154.0.2.data → OpenFisca_France-155.0.0.data}/data/share/openfisca/openfisca-france/README.md +0 -0
  21. {OpenFisca_France-154.0.2.dist-info → OpenFisca_France-155.0.0.dist-info}/LICENSE.AGPL.txt +0 -0
  22. {OpenFisca_France-154.0.2.dist-info → OpenFisca_France-155.0.0.dist-info}/top_level.txt +0 -0
@@ -653,6 +653,7 @@ class f7vh_2014(Variable):
653
653
  label = "Dépenses en faveur de la qualité environnementale de l'habitation principale: travaux d'isolation thermique de toute la toiture du 1.9 au 31.12.2014"
654
654
  # start_date = date(2014, 1, 1)
655
655
  definition_period = YEAR
656
+ end = '2014-12-31'
656
657
 
657
658
 
658
659
  class f7vh(Variable):
@@ -805,6 +806,7 @@ class f7vk_2015(Variable):
805
806
  label = "Dépenses en faveur de la qualité environnementale de l'habitation principale: Volets isolants 2015"
806
807
  # start_date = date(2015, 1, 1)
807
808
  definition_period = YEAR
809
+ end = '2015-12-31'
808
810
 
809
811
 
810
812
  class f7vk(Variable):
@@ -823,6 +825,7 @@ class f7vl_2015(Variable):
823
825
  label = "Dépenses en faveur de la qualité environnementale de l'habitation principale: Portes d'entrées donnant sur l'extérieur 2015"
824
826
  # start_date = date(2015, 1, 1)
825
827
  definition_period = YEAR
828
+ end = '2015-12-31'
826
829
 
827
830
 
828
831
  class f7vl(Variable):
@@ -964,6 +967,7 @@ class f7tp_2015(Variable):
964
967
  label = "Dépenses en faveur de la qualité environnementale de l'habitation principale 2015: Pompes à chaleur autres que air/air et autres que géothermiques dont la finalité essentielle est la production de chaleur"
965
968
  # start_date = date(2015, 1, 1)
966
969
  definition_period = YEAR
970
+ end = '2015-12-31'
967
971
 
968
972
 
969
973
  class f7tp(Variable):
@@ -982,6 +986,7 @@ class f7tq_2015(Variable):
982
986
  label = "Dépenses en faveur de la qualité environnementale de l'habitation principale 2015: Pompes à chaleur géothermiques dont la finalité essentielle est la production de chaleur"
983
987
  # start_date = date(2015, 1, 1)
984
988
  definition_period = YEAR
989
+ end = '2015-12-31'
985
990
 
986
991
 
987
992
  class f7tq(Variable):
@@ -1000,6 +1005,7 @@ class f7tr_2015(Variable):
1000
1005
  label = "Dépenses en faveur de la qualité environnementale de l'habitation principale 2015: Pompes à chaleur (autres que air/air) dédiées à la production d'eau chaude sanitaire (chauffe-eaux thermodynamiques)"
1001
1006
  # start_date = date(2015, 1, 1)
1002
1007
  definition_period = YEAR
1008
+ end = '2015-12-31'
1003
1009
 
1004
1010
 
1005
1011
  class f7tr(Variable):
@@ -1018,6 +1024,7 @@ class f7ts_2015(Variable):
1018
1024
  label = "Dépenses en faveur de la qualité environnementale de l'habitation principale 2015: Équipements de fourniture d'eau chaude sanitaire fonctionnant à l'énergie solaire et dotés de capteurs solaires"
1019
1025
  # start_date = date(2015, 1, 1)
1020
1026
  definition_period = YEAR
1027
+ end = '2015-12-31'
1021
1028
 
1022
1029
 
1023
1030
  class f7ts(Variable):
@@ -4928,6 +4935,7 @@ class f7sx_2017(Variable):
4928
4935
  label = 'Travaux de restauration immobilière dans un secteur sauvegardé ou assimilé'
4929
4936
  # start_date = date(2013, 1, 1)
4930
4937
  definition_period = YEAR
4938
+ end = '2017-12-31'
4931
4939
 
4932
4940
 
4933
4941
  class f7sx(Variable):
@@ -5769,6 +5777,7 @@ class f7qk_2019(Variable):
5769
5777
  entity = FoyerFiscal
5770
5778
  label = 'Investissements locatifs Pinel en outremer réalisés en 2016 avec engagement de location 6 ans'
5771
5779
  definition_period = YEAR
5780
+ end = '2019-12-31'
5772
5781
 
5773
5782
 
5774
5783
  class f7qk(Variable):
@@ -8945,6 +8954,7 @@ class f7ja_2017(Variable):
8945
8954
  label = 'Investissements locatifs neufs dispositif Scellier : investissements réalisés et engagés en 2012, métropole, BBC'
8946
8955
  # start_date = date(2012, 1, 1)
8947
8956
  definition_period = YEAR
8957
+ end = '2017-12-31'
8948
8958
 
8949
8959
 
8950
8960
  class f7ja(Variable):
@@ -11054,6 +11064,7 @@ class f7ta_2015(Variable):
11054
11064
  label = 'Dépenses en faveur de la qualité environnementale des logements donnés en location en 2015 : chaudières à condensation '
11055
11065
  # start_date = date(2015, 1, 1)
11056
11066
  definition_period = YEAR
11067
+ end = '2015-12-31'
11057
11068
 
11058
11069
 
11059
11070
  class f7ta(Variable):
@@ -11438,6 +11449,7 @@ class f7vi_2015(Variable):
11438
11449
  label = 'Matériaux d’isolation des planchers bas sur sous-sol, sur vide sanitaire ou sur passage couvert (acquisition et pose) en 2015'
11439
11450
  # start_date = date(2015, 1, 1)
11440
11451
  definition_period = YEAR
11452
+ end = '2015-12-31'
11441
11453
 
11442
11454
 
11443
11455
  class f7vi(Variable):
@@ -11487,7 +11499,7 @@ class f7tu_2012(Variable):
11487
11499
  entity = FoyerFiscal
11488
11500
  label = "Dépenses de travaux dans l'habitation principale"
11489
11501
  # start_date = date(2012, 1, 1)
11490
- # end = '2012-12-31'
11502
+ end = '2012-12-31'
11491
11503
  definition_period = YEAR
11492
11504
 
11493
11505
 
@@ -11508,7 +11520,7 @@ class f7tt_2012(Variable):
11508
11520
  entity = FoyerFiscal
11509
11521
  label = "Dépenses de travaux dans l'habitation principale"
11510
11522
  # start_date = date(2012, 1, 1)
11511
- # end = '2012-12-31'
11523
+ end = '2012-12-31'
11512
11524
  definition_period = YEAR
11513
11525
 
11514
11526
 
@@ -11529,7 +11541,7 @@ class f7tv_2012(Variable):
11529
11541
  entity = FoyerFiscal
11530
11542
  label = "Dépenses de travaux dans l'habitation principale"
11531
11543
  # start_date = date(2012, 1, 1)
11532
- # end = '2012-12-31'
11544
+ end = '2012-12-31'
11533
11545
  definition_period = YEAR
11534
11546
 
11535
11547
 
@@ -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 (irpp, 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."
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]) # Supprimée à partir de 2018
620
- revenus_capitaux_prelevement_liberatoire = foyer_fiscal('revenus_capitaux_prelevement_liberatoire', period, options = [ADD]) # Supprimée à partir de 2018
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 irpp
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 irpp (et vérifier au passage que frag_impo est dans la majo_cga
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
- irpp = foyer_fiscal('irpp', period)
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 + prelevement_forfaitaire_liberatoire
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 = irpp + isf_ifi + taxe_habitation + tax_fonc + csg_imposable_salaire + csg_imposable_chomage + csg_imposable_retraite
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('irpp', period = period.last_year)
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) # Supprimée en 2018
129
- revenus_capitaux_prelevement_liberatoire = foyer_fiscal('revenus_capitaux_prelevement_liberatoire', period, options = [ADD]) # Supprimée en 2018
130
- revenus_capitaux_prelevement_forfaitaire_unique_ir = foyer_fiscal('revenus_capitaux_prelevement_forfaitaire_unique_ir', period, options = [ADD]) # Existe à partir de 2018
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)
@@ -173,7 +173,7 @@ class f8td(Variable):
173
173
 
174
174
 
175
175
  class f8ti(Variable):
176
- cerfa_field = '8TK'
176
+ cerfa_field = '8TI'
177
177
  value_type = int
178
178
  unit = 'currency'
179
179
  entity = FoyerFiscal
@@ -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
- return (f2ch + f2yy) / 12
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'IRPP payé en N-1) de la Contribution SS additionnelle solidarité autonomie (CASA)
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'IRPP payé en N-1)
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