-
Notifications
You must be signed in to change notification settings - Fork 101
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
Update de l'impôt sur les revenus 2017 #1018
Conversation
67fcea0
to
fecf30c
Compare
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.
Quelques remarques cosmétiques mais sinon super taf.
Tu abats la législation à une vitesse vraiment impressionnante !
spfcpi = foyer_fiscal('spfcpi', period) | ||
|
||
total_reductions = (accult + adhcga + cappme + daepad + deffor + dfppce + doment + domlog + donapd + | ||
duflot + ecpess + intagr + invfor + invlst + locmeu + mecena + mohist + |
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.
indentation quand retour à la ligne dans expression entre ()
base_report_cappme_2013_PME = min_(f7cl, seuil1) | ||
base_report_cappme_2014_PME = max_(0, min_(f7cm, seuil1) - base_report_cappme_2013_PME) | ||
base_report_cappme_2015_PME = max_(0, min_(f7cn, seuil1 - base_report_cappme_2013_PME - base_report_cappme_2014_PME)) | ||
base_report_cappme_2016_PME = max_(0, min_(f7cc, seuil1 - base_report_cappme_2013_PME - base_report_cappme_2014_PME - base_report_cappme_2015_PME )) |
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.
Pas d'espaces avant les )
@@ -8,3 +8,5 @@ values: | |||
value: 0.058 | |||
2012-01-01: | |||
value: 0.051 | |||
2017-01-01: | |||
value: 0.068 |
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.
Ajouter un retour à la ligne ? 🙂
@@ -6,3 +6,5 @@ values: | |||
value: 0.075 | |||
2004-01-01: | |||
value: 0.082 | |||
2017-01-01: | |||
value: 0.099 |
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.
De même, ajouter un retour à la ligne ?
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.
Je suis impressionnée par tout le travail que tu as accomplis ! Bravo :)
Je ne vois pas de tests liés à ces modifications. Pourrais tu en ajouter ?
@@ -193,7 +193,7 @@ def formula_2013_01_01(foyer_fiscal, period, parameters): | |||
preetu + prlire + quaenv + saldom2) | |||
|
|||
def formula_2014_01_01(foyer_fiscal, period, parameters): | |||
""" Crédits d'impôt crédités l'impôt sur les revenus de 2014 et + (non vérifié)""" | |||
""" Crédits d'impôt crédités l'impôt sur les revenus de 2014 à 2016""" |
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.
proposition pour cohérence
"""
Crédits d'impôt crédités l'impôt sur les revenus de 2014 à 2016
"""
@@ -211,6 +211,24 @@ def formula_2014_01_01(foyer_fiscal, period, parameters): | |||
return (aidper + assloy + autent + ci_garext + cotsyn + creimp + direpa + drbail + inthab + | |||
preetu + prlire + quaenv + saldom2) | |||
|
|||
def formula_2017_01_01(foyer_fiscal, period, parameters): | |||
""" Crédits d'impôt crédités l'impôt sur les revenus de 2014 et + (non vérifié)""" |
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.
idem
report_2016 = foyer_fiscal('f6hq', period) | ||
plafond_grosses_reparations = parameters(period).impot_revenu.charges_deductibles.grosses_reparations.plafond | ||
|
||
return min_(f6cb + report_2009 + report_2010 + report_2011 + report_2012 + report_2013 + report_2014 + report_2015 + report_2016, plafond_grosses_reparations) |
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.
est-ce qu'il y a un terme pour représenter la longue somme
6cb + report_2009 + report_2010 + report_2011 + report_2012 + report_2013 + report_2014 + report_2015 + report_2016
?
On pourrait imaginer :
somme_engagees = f6cb + report_2009 + report_2010 + report_2011 + report_2012 + report_2013 + report_2014 + report_2015 + report_2016
return min_(somme_engagees, plafond_grosses_reparations)
quaenv = foyer_fiscal('quaenv', period) | ||
saldom2 = foyer_fiscal('saldom2', period) | ||
|
||
return (aidper + autent + ci_garext + cotsyn + creimp + direpa + drbail + inthab + |
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.
Tu peux retirer les parenthèses ou faire quelque chose comme ça :
return (
aidper + autent + ci_garext
+ cotsyn + creimp + direpa
+ drbail + inthab + preetu
+ prlire + quaenv + saldom2
)
@@ -211,6 +211,24 @@ def formula_2014_01_01(foyer_fiscal, period, parameters): | |||
return (aidper + assloy + autent + ci_garext + cotsyn + creimp + direpa + drbail + inthab + | |||
preetu + prlire + quaenv + saldom2) | |||
|
|||
def formula_2017_01_01(foyer_fiscal, period, parameters): | |||
""" Crédits d'impôt crédités l'impôt sur les revenus de 2014 et + (non vérifié)""" | |||
aidper = foyer_fiscal('aidper', period) |
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.
Est-ce qu'il y aurait des termes plus explicites pour ces variables ?
Investissements locatifs intermediaires (loi Duflot) | ||
2017 | ||
''' | ||
invest_domtom_2013 = foyer_fiscal('f7gi', period) |
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.
Super explicite :)
P.taux_m * ( | ||
min_(P.plafond - invest_domtom_2013, invest_metropole_2013) + | ||
min_(P.plafond - invest_domtom_2014, invest_metropole_2014) | ||
) + |
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.
Mettre l'opérateur en début de ligne
report_depenses_2010 = f7uv + f7tf | ||
report_depenses_2011 = f7uw + f7tg | ||
|
||
max0 = max_(0, P.plafond_travaux * (maries_ou_pacses + 1) - f7ul) |
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.
plafond_2010
ouplafond_report_2010
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.
Dans ce genre de cas c'est compliqué de nommer plus explicitement max0
, max1
, max2
etc. parce qu'il s'agit simplement de plafonds intermédiaires (certaines cases s'imputent en premier sur le plafond, d'autres en seconde etc.). J'opterais pour garder ces noms.
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.
Oki :)
value_type = int | ||
unit = 'currency' | ||
entity = FoyerFiscal | ||
label = u"Investissements outre-mer dans le cadre de l'entreprise" |
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.
Les labels se ressemblent tous, serait-il possible de les différencier ?
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.
J'avoue que je trouve ça un peu long de renseigner chacun des labels des cases (il y en a quand même beaucoup qui se rajoute chaque année) quand, comme ici, ce sont des cases dont le label est super long mais pas forcement explicite.
Ex : case 'fhdi' = "Investissements ayant fait l’objet en 2012, 2013 ou 2014 d’une demande d’agrément, d’une déclaration d’ouverture de chantier ou d’un acompte d’au moins 50%; Investissements donnés en location à une entreprise exploitante à laquelle vous rétrocédez la réduction d’impôt en 2012 à hauteur de 52,63%"
Est-ce que ce label aide quelqu'un à y voir plus clair ? Pas sûr ...
C'est un travail assez fastidieux que je fais quand ça apporte de l'information mais là dans le cas des DOM-TOM il y a 100 cases pour tout et n'importe quoi..
Cf. page 30 de la brochure pratique
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.
Je trouve que c'est beaucoup plus explicite. Et comme on souhaite pouvoir être la référence de la fiscalité, je trouve qu'il y a beaucoup de valeur dedans.
Après, ça peut être pour la prochaine passe :)
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.
Oui disons la prochaine fois ! et d'ailleurs si quelqu'un est motivé, c'est quelque chose que n'importe qui peut faire en utilisant la brochure pratique dont je parle plus haut :)
value_type = int | ||
unit = 'currency' | ||
entity = FoyerFiscal | ||
label = u"Travaux de restauration immobilière dans un secteur sauvegardé ou assimilé" |
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.
Les deux descriptions se ressemblent. Serait-il possible de les différentier ?
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.
cf. plus haut
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.
Pour celle-ci, vu qu'il y en que 2, je trouve de que ce serait chouette de les avoir :)
@Anna-Livia Merci pour la review :) Concernant les tests, je reprends ce qu'a dit @benjello sur Slack. On ne peut pas faire de tests qui compare nos résultats de l'impôt avec ceux du simulateur DGFiP (comme ceux mentionnés dans l'issue #920) car la version pour l'impôt sur les revenus 2017 est certes en ligne mais pour avoir fait quelques tests de mon côté, ne simule pas encore tout complètement et correctement. Par ailleurs je bosse de temps en temps sur la branche Sinon je crois que j'ai répondu à chacun des commentaires et demande de correction de ta review ? Est-ce que ça te parait correct ? |
@ClaireLeroyIPP Merci pour tes remarques. J'ai répondu. N'ouvlie pas le changelog et le version bump ;) |
Toutes les dépenses ouvrent désormais droit au crédit d'impôt
5708ec2
to
d0cea6c
Compare
@Anna-Livia Prêt à merger alors ? J'ai rebasé, updater la version et le Changelog. |
Mise à jour des dispositifs de l'impôt pour les revenus 2017.
Les modifications reprennent pour l'essentiel les nouveautés de l'IR 2018 sur revenus 2017 listées dans la brochure pratique page 35. Cette PR inclut aussi des modifications sur la CSG et la CRDS.
Cette PR est liée à la PR #1017 qui se concentrait sur la partie paramètres de l'impôt sans modifier les formules.
model\prelevements_obligatoires\impot_revenu
parameters\impot_revenu
parameters\prelevements_sociaux\contributions
Ces changements :