OpenFisca-France 169.13.2__py3-none-any.whl → 169.14.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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: OpenFisca-France
3
- Version: 169.13.2
3
+ Version: 169.14.0
4
4
  Summary: OpenFisca Rules as Code model for France.
5
5
  Author-email: OpenFisca Team <contact@openfisca.fr>
6
6
  Project-URL: Homepage, https://github.com/openfisca/openfisca-france
@@ -38,14 +38,14 @@ openfisca_france/model/prelevements_obligatoires/isf.py,sha256=u0qlU4lDXSYDETupu
38
38
  openfisca_france/model/prelevements_obligatoires/impot_revenu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  openfisca_france/model/prelevements_obligatoires/impot_revenu/charges_deductibles.py,sha256=dXVJgd_dlJHxvgF_5JMWp9KBv-ovX4ubo43a32jTYG8,28152
40
40
  openfisca_france/model/prelevements_obligatoires/impot_revenu/credits_impot.py,sha256=d5gk7S7wgGI2VEYA6sStSwkivpo1-EBxAxWKR-EHMKA,128524
41
- openfisca_france/model/prelevements_obligatoires/impot_revenu/ir.py,sha256=BScPmjWjPUiPtTAJHuWuAyfPwpnW45B2ZoDpR7I5ej8,184050
41
+ openfisca_france/model/prelevements_obligatoires/impot_revenu/ir.py,sha256=AnIVbA5FT53PWuI8CGx26Qdv083pIchj7HFi74lgqEE,185583
42
42
  openfisca_france/model/prelevements_obligatoires/impot_revenu/plus_values_immobilieres.py,sha256=5gNB5ntU9I9XVeKhYyq94miM4Uv72HruO1Nu_jIPkn4,4754
43
43
  openfisca_france/model/prelevements_obligatoires/impot_revenu/reductions_impot_deplafonnees.py,sha256=pp4ykXm-_Tpp4AtYjop5fpGgjzXtTttmolFQBg-ma2E,34347
44
44
  openfisca_france/model/prelevements_obligatoires/impot_revenu/reductions_impot_iom.py,sha256=Q8hoXmUfuQLqzWA0S1CIaP3M7fAVcKtBVkoj3xJiae0,139248
45
45
  openfisca_france/model/prelevements_obligatoires/impot_revenu/reductions_impot_plafonnees.py,sha256=iGPE1pMYSkicuBqB9njkriUYRhZVk5SuCEM-8cnjf7M,245299
46
46
  openfisca_france/model/prelevements_obligatoires/impot_revenu/variables_reductions_credits.py,sha256=TPkhSfmuCb3AdM4itjJot8BGs35oYMLY0n7se1L1nkE,419356
47
47
  openfisca_france/model/prelevements_obligatoires/impot_revenu/prelevements_forfaitaires/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
- openfisca_france/model/prelevements_obligatoires/impot_revenu/prelevements_forfaitaires/ir_prelevement_forfaitaire_unique.py,sha256=jSCz_pL1vFvUh6X87sH5XDMvAw1KsqR_TA48QcsZk9M,17647
48
+ openfisca_france/model/prelevements_obligatoires/impot_revenu/prelevements_forfaitaires/ir_prelevement_forfaitaire_unique.py,sha256=bxTd15KUtkSIZS0PgUHx51HNpxEBA7bXIBrF8yulJxg,17645
49
49
  openfisca_france/model/prelevements_obligatoires/impot_revenu/prelevements_forfaitaires/prelevement_forfaitaire_liberatoire.py,sha256=Mnk13IZXhGrtFzqoBCf6P8N1tSrPXWAc7GK0w-AYCzk,6666
50
50
  openfisca_france/model/prelevements_obligatoires/impot_revenu/prelevements_forfaitaires/variables_communes.py,sha256=dMoooLKDnaHj2GtbmiXFMAQiPAkwow2MU18eDC63TD0,630
51
51
  openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -4036,8 +4036,8 @@ openfisca_france/scripts/performance/measure_spiral_performances.py,sha256=cQIxE
4036
4036
  openfisca_france/scripts/performance/measure_tests_performance.py,sha256=HYgSJy-OMZay2AZt6ztntgdUbW_RL2xMr-iHcK-zoVY,1869
4037
4037
  openfisca_france/situation_examples/__init__.py,sha256=BTRmrqk9lsjfhtPXsYcsWqXFEYyFpgLcxNs6oJsy8zk,262
4038
4038
  openfisca_france/situation_examples/couple.json,sha256=Ot1x4wl3IS-2-10X3V7ZUokkOMXi96s-xK7A0gNvRF4,862
4039
- OpenFisca_France-169.13.2.dist-info/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
4040
- OpenFisca_France-169.13.2.dist-info/METADATA,sha256=sszJ5k-geYf3JkeIIvPc-YPXY6L87vDzYTUqDjyb1kc,20831
4041
- OpenFisca_France-169.13.2.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
4042
- OpenFisca_France-169.13.2.dist-info/top_level.txt,sha256=1LbD6QJWehKGIcjtaJ45tbQOSDiFEXOlIdgWRI_jaHU,17
4043
- OpenFisca_France-169.13.2.dist-info/RECORD,,
4039
+ OpenFisca_France-169.14.0.dist-info/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
4040
+ OpenFisca_France-169.14.0.dist-info/METADATA,sha256=Qk2Wx8sBvN_4OBSjLE8TFYI7ghdO-VucLC1UyTcV88Y,20831
4041
+ OpenFisca_France-169.14.0.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
4042
+ OpenFisca_France-169.14.0.dist-info/top_level.txt,sha256=1LbD6QJWehKGIcjtaJ45tbQOSDiFEXOlIdgWRI_jaHU,17
4043
+ OpenFisca_France-169.14.0.dist-info/RECORD,,
@@ -2299,10 +2299,10 @@ class contribution_exceptionnelle_hauts_revenus(Variable):
2299
2299
  # TODO: Gérer le II.-1 du lissage interannuel ? (problème de non recours)
2300
2300
 
2301
2301
 
2302
- class impot_revenu_restant_a_payer(Variable):
2302
+ class impot_revenu_avant_seuils_mise_recouvrement(Variable):
2303
2303
  value_type = float
2304
2304
  entity = FoyerFiscal
2305
- label = 'Impôt sur le revenu des personnes physiques restant à payer, après prise en compte des éventuels acomptes'
2305
+ label = 'Impôt sur le revenu des personnes physiques restant à payer, après prise en compte des éventuels acomptes et avant application des seuils de mise en recouvrement'
2306
2306
  reference = 'https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000041464766'
2307
2307
  definition_period = YEAR
2308
2308
 
@@ -2311,33 +2311,63 @@ class impot_revenu_restant_a_payer(Variable):
2311
2311
  Montant après seuil de recouvrement (hors ppe)
2312
2312
  NB : ce montant l'impôt correspond à une notion administrative :
2313
2313
  dans certains cas, il existe des prélèvements à la source faisant
2314
- office d'acomptes d'impôt sur le revenu (cf. variable acomptes_ir). Ces acomptes sont comptabilisés
2315
- dans la feuille d'impôt comme des crédits d'impôt, mais correspondent économiquement à des montants d'impôt dus.
2316
- 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.
2317
- En revanche, il compte dans le calcul du seuil de recouvrement.
2314
+ office d'acomptes d'impôt sur le revenu (cf. variable acomptes_ir). Ces acomptes sont comptabilisés dans la feuille d'impôt comme des crédits d'impôt, mais correspondent économiquement à des montants d'impôt dus.
2318
2315
  '''
2319
2316
  iai = foyer_fiscal('iai', period)
2320
2317
  credits_impot = foyer_fiscal('credits_impot', period)
2321
2318
  acomptes_ir = foyer_fiscal('acomptes_ir', period)
2322
- contribution_exceptionnelle_hauts_revenus = foyer_fiscal('contribution_exceptionnelle_hauts_revenus', period)
2323
- prelevement_forfaitaire_unique_ir = foyer_fiscal('prelevement_forfaitaire_unique_ir', period)
2324
- prelevement_forfaitaire_liberatoire = foyer_fiscal('prelevement_forfaitaire_liberatoire', period)
2319
+ cehr = foyer_fiscal('contribution_exceptionnelle_hauts_revenus', period)
2320
+ pfu = foyer_fiscal('prelevement_forfaitaire_unique_ir', period)
2321
+
2322
+ return -(iai + cehr + pfu - credits_impot - acomptes_ir)
2323
+
2324
+
2325
+ class correction_ir_seuils_recouvrement(Variable):
2326
+ value_type = float
2327
+ entity = FoyerFiscal
2328
+ label = 'Montant de la correction de l´impôt sur le revenu par application des seuils de mise en recouvrement'
2329
+ reference = 'https://bofip.impots.gouv.fr/bofip/2496-PGP.html/identifiant%3DBOI-IR-LIQ-20-20-40-20180704#Franchise_pour_les_impositi_14'
2330
+ definition_period = YEAR
2331
+
2332
+ def formula(foyer_fiscal, period, parameters):
2333
+ iai = foyer_fiscal('iai', period)
2334
+ credits_impot = foyer_fiscal('credits_impot', period)
2335
+ acomptes_ir = foyer_fiscal('acomptes_ir', period)
2336
+ cehr = foyer_fiscal('contribution_exceptionnelle_hauts_revenus', period)
2337
+ pfu = foyer_fiscal('prelevement_forfaitaire_unique_ir', period)
2338
+ pfl = foyer_fiscal('prelevement_forfaitaire_liberatoire', period)
2339
+ impots_avant_seuils_mise_recouvrement = foyer_fiscal('impot_revenu_avant_seuils_mise_recouvrement', period)
2340
+ '''
2341
+ 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.
2342
+ En revanche, il compte dans le calcul du seuil de recouvrement.
2343
+ '''
2325
2344
  parameters_recouvrement = parameters(period).impot_revenu.calcul_impot_revenu.recouvrement
2345
+ seuil_avant_imputations = parameters_recouvrement.min_avant_credits_impots
2346
+ seuil_apres_imputations = parameters_recouvrement.min_apres_credits_impots
2326
2347
 
2327
- pre_result = iai - credits_impot - acomptes_ir + contribution_exceptionnelle_hauts_revenus - prelevement_forfaitaire_unique_ir - prelevement_forfaitaire_liberatoire
2328
- result = iai - credits_impot - acomptes_ir + contribution_exceptionnelle_hauts_revenus - prelevement_forfaitaire_unique_ir
2329
- impots_totaux_avant_imputations = iai + contribution_exceptionnelle_hauts_revenus - prelevement_forfaitaire_unique_ir - prelevement_forfaitaire_liberatoire
2348
+ impots_totaux_avant_imputations = iai + cehr + pfu - pfl
2349
+ impots_totaux_apres_imputations = iai + cehr + pfu - pfl - credits_impot - acomptes_ir
2330
2350
 
2331
- return (
2332
- (impots_totaux_avant_imputations > parameters_recouvrement.min_avant_credits_impots) * (
2333
- ((pre_result <= 0) + (pre_result >= parameters_recouvrement.min_apres_credits_impots))
2334
- * (- result)
2335
- )
2336
- + (impots_totaux_avant_imputations <= parameters_recouvrement.min_avant_credits_impots) * (
2337
- (pre_result < 0)
2338
- * (-result)
2339
- )
2340
- )
2351
+ condition_1 = (impots_totaux_avant_imputations <= seuil_avant_imputations) * (impots_totaux_apres_imputations > 0)
2352
+ condition_2 = (impots_totaux_avant_imputations > seuil_avant_imputations) * (impots_totaux_apres_imputations > 0) * (impots_totaux_apres_imputations <= seuil_apres_imputations)
2353
+
2354
+ condition_correction_seuils_mise_recouvrement = (condition_1 | condition_2)
2355
+
2356
+ return condition_correction_seuils_mise_recouvrement * impots_avant_seuils_mise_recouvrement
2357
+
2358
+
2359
+ class impot_revenu_restant_a_payer(Variable):
2360
+ value_type = float
2361
+ entity = FoyerFiscal
2362
+ label = 'Impôt sur le revenu des personnes physiques restant à payer, après prise en compte des éventuels acomptes et des seuils de mise en recouvrement'
2363
+ reference = 'https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000041464766'
2364
+ definition_period = YEAR
2365
+
2366
+ def formula(foyer_fiscal, period, parameters):
2367
+ impots_avant_seuils_recouvrement = foyer_fiscal('impot_revenu_avant_seuils_mise_recouvrement', period)
2368
+ correction_seuils_recouvrement = foyer_fiscal('correction_ir_seuils_recouvrement', period)
2369
+
2370
+ return (impots_avant_seuils_recouvrement - correction_seuils_recouvrement)
2341
2371
 
2342
2372
 
2343
2373
  class foyer_impose(Variable):
@@ -255,7 +255,7 @@ class prelevement_forfaitaire_unique_ir_hors_assurance_vie(Variable):
255
255
  + plus_values_prelevement_forfaitaire_unique_ir
256
256
  )
257
257
 
258
- return -assiette_pfu_hors_assurance_vie * P.taux_prelevement_forfaitaire_rev_capital_eligibles_pfu_interets_dividendes_etc
258
+ return assiette_pfu_hors_assurance_vie * P.taux_prelevement_forfaitaire_rev_capital_eligibles_pfu_interets_dividendes_etc
259
259
 
260
260
 
261
261
  class prelevement_forfaitaire_unique_ir_sur_assurance_vie(Variable):
@@ -290,7 +290,7 @@ class prelevement_forfaitaire_unique_ir_sur_assurance_vie(Variable):
290
290
  + (max_(f2ww - abattement_residuel2, 0) * parameters_taux)
291
291
  )
292
292
 
293
- return -pfu_ir_sur_assurance_vie
293
+ return pfu_ir_sur_assurance_vie
294
294
 
295
295
 
296
296
  class prelevement_forfaitaire_unique_ir(Variable):