-
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
Ipp 3 : Minor updates of tax credit and tax reductions #909
Conversation
14d7247
to
b47f2ae
Compare
@@ -888,7 +888,7 @@ class inthab(Variable): | |||
entity = FoyerFiscal | |||
label = u"Crédit d’impôt intérêts des emprunts pour l’habitation principale" | |||
definition_period = YEAR | |||
end = '2013-12-31' | |||
end = '2016-12-31' |
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.
Serait-il possible d'avoir une référence pour cette variable ?
f7vv = foyer_fiscal('f7vv', period) | ||
f7vx = foyer_fiscal('f7vx', period) | ||
f7vz = foyer_fiscal('f7vz', period) | ||
_P = parameters(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 que cette variable pourrait être mergée avec la ligne 1087 ?
P = parameters(period).impot_revenu.credits_impot.inthab
ou
credit_interets_emprunt_habitation = parameters(period).impot_revenu.credits_impot.inthab
2014 | ||
''' | ||
maries_ou_pacses = foyer_fiscal('maries_ou_pacses', period) | ||
nb_pac2 = foyer_fiscal('nb_pac2', 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 que certaines de ces variables pourraient être plus explicites ?
nb_pac2, caseP, nbG ...
max3 = max_(max2 - f7vz, 0) | ||
max4 = max_(max3 - f7vv, 0) | ||
return (P.taux1 * min_(f7vx, max0) + | ||
P.taux3 * min_(f7vu, max1) + |
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 plus de lisibilité, tu peux écrire :
return (
P.taux1 * min_(f7vx, max0)
+ P.taux3 * min_(f7vu, max1)
[...]
+ P.taux6 * min_(f7vt, max4)
)
P = _P.impot_revenu.credits_impot.inthab | ||
|
||
invalide = caseP | caseF | (nbG != 0) | (nbR != 0) | (nbI != 0) | ||
max0 = P.max * (maries_ou_pacses + 1) * (1 + invalide) + nb_pac2 * P.add |
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 serait possible de synthétiser la signification des
max0
,max1
, ... en un commentaire ?
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'ai mis ça :
# NB : max0 = plafond initial du montant d'intérêts retenus pour calculer le crédit
# max1..max4 = plafonds après imputations successives (dans l'ordre décrit dans la législation) des intérêts éligibles au crédit d'impôt
|
||
invalide = caseP | caseF | (nbG != 0) | (nbR != 0) | (nbI != 0) | ||
max0 = P.max * (maries_ou_pacses + 1) * (1 + invalide) + nb_pac2 * P.add | ||
|
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 serait possible de synthétiser la signification des
max0
,max1
, ... en un commentaire ?
P = _P.impot_revenu.credits_impot.inthab | ||
|
||
invalide = caseP | caseF | (nbG != 0) | (nbR != 0) | (nbI != 0) | ||
max0 = P.max * (maries_ou_pacses + 1) * (1 + invalide) + nb_pac2 * P.add |
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 serait possible de synthétiser la signification des
max0
,max1
, ... en un commentaire ?
f7vt = foyer_fiscal('f7vt', period) | ||
f7vx = foyer_fiscal('f7vx', period) | ||
f7vz = foyer_fiscal('f7vz', period) | ||
_P = parameters(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 que cette variable pourrait être mergée avec la ligne 1087 ?
P = parameters(period).impot_revenu.credits_impot.inthab
ou
credit_interets_emprunt_habitation = parameters(period).impot_revenu.credits_impot.inthab
max1 = max_(max0 - f7vx, 0) | ||
max2 = max_(max1 - f7vz, 0) | ||
max3 = max_(max2 - f7vv, 0) | ||
return (P.taux1 * min_(f7vx, max0) + |
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 plus de lisibilité, tu peux écrire :
return (
P.taux1 * min_(f7vx, max0) +
+ P.taux3 * min_(f7vu, max1) +
[...]
+ P.taux6 * min_(f7vt, max4)
)
|
||
max1 = max_(max0 - f7vx, 0) | ||
max2 = max_(max1 - f7vz, 0) | ||
return (P.taux1 * min_(f7vx, max0) + |
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 plus de lisibilité, tu peux écrire :
return (
P.taux1 * min_(f7vx, max0)
+ P.taux3 * min_(f7vu, max1)
[...]
+ P.taux6 * min_(f7vt, max4)
)
f7vc = foyer_fiscal('f7vc', period) | ||
P = parameters(period).impot_revenu.reductions_impots.dons | ||
P2 = parameters(period).impot_revenu.reductions_impots.donapd |
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.
Il y a t'il un moyen plus explicite pour différencier P
et P2
? Sachant qu'il semble que P2
n'est utilisé qu'une fois, avec P2.max
f7xq = simulation.calculate('f7xq', period) | ||
f7xr = simulation.calculate('f7xr', period) | ||
f7xv = simulation.calculate('f7xv', period) | ||
_P = simulation.parameters_at(period.start) |
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.
Cette ligne ne semble pas être utilisée
f7xq = simulation.calculate('f7xq', period) | ||
f7xr = simulation.calculate('f7xr', period) | ||
f7xv = simulation.calculate('f7xv', period) | ||
_P = simulation.parameters_at(period.start) |
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
f7xp = simulation.calculate('f7xp', period) | ||
f7xq = simulation.calculate('f7xq', period) | ||
f7xr = simulation.calculate('f7xr', period) | ||
f7xv = simulation.calculate('f7xv', 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.
Si certaines lignes sont des reports des années précédente, il serait intéressant d'ajouter un commentaire en fin de ligne le mentionnant (cette remarque vaut pour les formules des autres années)
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'ai modifié les noms de variables pour que la formule soit plus claire mais seulement à partir de 2014 (les années que j'ai updaté) car je ne peux pas revenir sur toutes les formules de toutes les années maintenant, cela prendrais vraiment beaucoup de temps de corriger tout ce qui a été fait par le passé. Cela peut faire l'objet d'une issue à part ceci dit.
f7xq = simulation.calculate('f7xq', period) | ||
f7xr = simulation.calculate('f7xr', period) | ||
f7xv = simulation.calculate('f7xv', period) | ||
_P = simulation.parameters_at(period.start) |
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
@@ -1538,7 +1574,7 @@ class garext(Variable): | |||
entity = FoyerFiscal | |||
label = u"garext" | |||
definition_period = YEAR | |||
end = '2005-12-31' | |||
end = '2004-12-31' |
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.
Serait-il possible d'avoir une référence pour cette variable ?
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.
Sachant que cette réduction a disparu en 2004 (pour devenir un crédit), j'ai du mal à trouver une référence. Je mets celle du crédit, sauf si quelqu'un trouve une meilleure référence
@@ -1449,7 +1486,6 @@ class donapd(Variable): | |||
entity = FoyerFiscal | |||
label = u"donapd" | |||
definition_period = YEAR | |||
end = '2013-12-31' |
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.
Serait-il possible d'avoir une référence pour cette variable ?
@@ -752,7 +787,6 @@ class dfppce(Variable): | |||
entity = FoyerFiscal | |||
label = u"dfppce" | |||
definition_period = YEAR | |||
end = '2013-12-31' |
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.
Serait-il possible d'avoir une référence pour cette variable ?
@@ -1205,7 +1276,6 @@ class prlire(Variable): | |||
value_type = float | |||
entity = FoyerFiscal | |||
label = u"Prélèvement libératoire à restituer (case 2DH)" | |||
end = '2013-12-31' |
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.
Serait-il possible d'avoir une référence pour cette variable ?
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.
A vrai dire je ne sais pas trop ce que c'est que ce crédit d'impôt... J'ai juste enlever la "end_date" (qui avait été mise de manière automatique à 2013 pour pas mal de réductions et crédits) car les cases 2DH et 2CH existent encore, mais c'est vrai que je n'ai pas plus checké que ça je crois. @benjello a peut-être une référence ?
@@ -2185,7 +2291,6 @@ class patnat(Variable): | |||
entity = FoyerFiscal | |||
label = u"patnat" | |||
definition_period = YEAR | |||
end = '2013-12-31' |
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.
Serait-il possible d'avoir une référence pour cette variable ? Et un label plus explicite ?
0f8e2af
to
6b4350e
Compare
2ca5328
to
2d3efa0
Compare
J'ai l'impression que le rebase n'a pas pris en compte certains des changements les plus récents de ipp-update-revenus-du-capital qui ont pourtant été intégrés sur master..
J'avais rajouté le commentaire dans la PR #908 mais maintenant il disparait.. |
2d3efa0
to
9605ceb
Compare
b4fc1c1
to
9379b4b
Compare
963626e
to
77146a4
Compare
…household tax deduction on financial profit and loss)
…me (used in the computation of RFR)
…household tax deduction on financial profit and loss)
…formula for 2014-2016
…s de raison de penser que le crédit s'arrêtera en 2017)
…e aux 5 premières annuités des dépenses effectuées jusqu'en 2011 et aux 7 premières annuités des dépenses effectuées jusqu'en 2009)
62f03d3
to
986f6f1
Compare
Les modifications de cette PR sont comparées à la branche
ipp-update-revenus-du-capital
(#908)openfisca_france/model/prelevements_obligatoires/impot_revenu/credits_impots.py
.openfisca_france/model/prelevements_obligatoires/impot_revenu/reductions_impots.py
.Ces changements :