-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correction de l'exonération de la CSG et CRDS pour les non-résidents #2106
Open
Nodraak
wants to merge
1
commit into
openfisca:master
Choose a base branch
from
Nodraak:nodraak/fix-2104-non-residents
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from openfisca_core import periods, populations | ||
from openfisca_france.model.base import * | ||
|
||
|
||
def montant_csg_crds(base_avec_abattement = None, base_sans_abattement = None, indicatrice_taux_plein = None, | ||
|
@@ -18,3 +20,31 @@ def montant_csg_crds(base_avec_abattement = None, base_sans_abattement = None, i | |
return -law_node.taux * base | ||
else: | ||
return - (law_node.taux_plein * indicatrice_taux_plein + law_node.taux_reduit * indicatrice_taux_reduit) * base | ||
|
||
|
||
def condition_csg_crds_non_residents(individu_or_foyerfiscal, period): | ||
''' | ||
Depuis le 1er janvier 2019, les personnes affiliées à un régime obligatoire | ||
de sécurité sociale autre que français au sein d'un pays de l'EEE (Union | ||
européenne, Islande, Norvège, Liechtenstein) ou de la Suisse sont exonérées | ||
de CSG et de CRDS. | ||
Ces revenus demeurent soumis à un prélèvement de solidarité au taux de 7,5%. | ||
Reference: https://www.impots.gouv.fr/international-particulier/questions/je-suis-non-resident-suis-je-redevable-des-contributions | ||
|
||
Return: | ||
* True: la CSG et la CRDS sont exigibles | ||
* False: la CSG et la CRDS sont exonerees | ||
''' | ||
|
||
if isinstance(individu_or_foyerfiscal, populations.group_population.GroupPopulation): | ||
# FoyerFiscal | ||
rehf = individu_or_foyerfiscal.any(individu_or_foyerfiscal.members('resident_eee_hors_france', period)) | ||
else: | ||
# Individu | ||
rehf = individu_or_foyerfiscal('resident_eee_hors_france', period) | ||
|
||
exonere = ( | ||
(periods.period('2019-01-01').start <= period.start) | ||
* rehf | ||
) | ||
return not_(exonere) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Il vaut mieux éviter de manipuler des GroupPopulation et passer par des variables. Elles permettent la gestion des changements de législation dans le temps de façon plus naturelle. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
|
||
setup( | ||
name = 'OpenFisca-France', | ||
version = '147.2.2', | ||
version = '147.3.2', | ||
author = 'OpenFisca Team', | ||
author_email = '[email protected]', | ||
classifiers = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Before 2019, everybody pay | ||
|
||
- name: pre_2019_residents_non_exoneres | ||
description: Avant 2019, les résidents ne sont pas exonérés | ||
period: 2018 | ||
absolute_error_margin: 1 | ||
input: | ||
f4ba: 1000 | ||
# resident_eee_hors_france: False | ||
output: | ||
csg_revenus_capital: -99 | ||
crds_revenus_capital: -5 | ||
prelevements_sociaux_revenus_capital_hors_csg_crds: -68 | ||
revenus_nets_du_capital: 828 | ||
|
||
- name: pre_2019_non_residents_non_exoneres | ||
description: Avant 2019, les non résidents ne sont pas exonérés | ||
period: 2018 | ||
absolute_error_margin: 1 | ||
input: | ||
f4ba: 1000 | ||
resident_eee_hors_france: true | ||
output: | ||
csg_revenus_capital: -99 | ||
crds_revenus_capital: -5 | ||
prelevements_sociaux_revenus_capital_hors_csg_crds: -68 | ||
revenus_nets_du_capital: 828 | ||
|
||
# After 2019, only residents in France pay | ||
|
||
- name: post_2019_residents_non_exoneres | ||
description: A partir de 2019, les résidents ne sont pas exonérés | ||
period: 2019 | ||
absolute_error_margin: 1 | ||
input: | ||
f4ba: 1000 | ||
# resident_eee_hors_france: False | ||
output: | ||
csg_revenus_capital: -92 | ||
crds_revenus_capital: -5 | ||
prelevements_sociaux_revenus_capital_hors_csg_crds: -75 | ||
revenus_nets_du_capital: 828 | ||
revenu_disponible: 6837 # due to RSA | ||
|
||
- name: post_2019_non_residents_exoneres | ||
description: A partir de 2019, les non résidents sont exonérés | ||
period: 2019 | ||
absolute_error_margin: 1 | ||
input: | ||
f4ba: 1000 | ||
resident_eee_hors_france: true | ||
output: | ||
csg_revenus_capital: 0 | ||
crds_revenus_capital: 0 | ||
prelevements_sociaux_revenus_capital_hors_csg_crds: -75 | ||
revenus_nets_du_capital: 925 | ||
revenu_disponible: 925 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L'import n'est pas nécessaire.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si il l'est sinon j'ai une erreur
NameError: name 'csg_crds_condition_residence' is not defined
... J'ai raté quelque chose ?