-
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 8 : Update réduction et crédit IR pour emploi à domicile #914
Conversation
Sommes versées pour l'emploi d'un salariés à domicile | ||
2011 - | ||
''' | ||
nb_pac2 = simulation.calculate('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.
Virer ces simulation.calculate
f7dl = simulation.calculate('f7dl', period) | ||
f7dq = simulation.calculate('f7dq', period) | ||
f7dg = simulation.calculate('f7dg', 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.
Virer ce _P
f7dq = simulation.calculate('f7dq', period) | ||
f7dg = simulation.calculate('f7dg', period) | ||
_P = simulation.parameters_at(period.start) | ||
P = simulation.parameters_at(period.start).impot_revenu.reductions_impots.salarie_domicile |
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.
Remplacer ce P par salarie_domicile
68feb62
to
2f6f820
Compare
0cbcb28
to
2e19b09
Compare
f7jy = foyer_fiscal('f7jy', period) | ||
P = parameters(period).impot_revenu.reductions_impots.locmeu | ||
|
||
m18 = (maxi(f7id, f7ie, f7if, f7ig) == max_(f7ie, f7if)) |
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 nom de variable plus explicite pour m18
et m20
?
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. PR #910
|
||
m18 = (maxi(f7id, f7ie, f7if, f7ig) == max_(f7ie, f7if)) | ||
m20 = (maxi(f7ij, f7il, f7in, f7iv) == max_(f7il, f7in)) | ||
return ((min_(P.max, maxi(f7ij, f7il, f7in, f7iv)) * (P.taux20 * m20 + P.taux18 * not_(m20)) + |
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.
concernant P.taux20
et consorts, Si le taux n'est pas amené à changer, il me semble qu'il vaut mieux le mettre en dur dans la formule. S'il peut changer, un nom de paramètre plus générique me semble de mise.
|
||
m18 = (maxi(f7id, f7ie, f7if, f7ig) == max_(f7ie, f7if)) | ||
m20 = (maxi(f7ij, f7il, f7in, f7iv) == max_(f7il, f7in)) | ||
return ((min_(P.max, maxi(f7ij, f7il, f7in, f7iv)) * (P.taux20 * m20 + P.taux18 * not_(m20)) + |
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 vaut mieux mettre les opérateurs (
+
) en début de ligne qu'en fin de ligne : https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
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. PR #910
2002-2004 | ||
''' | ||
f7df = foyer_fiscal('f7df', period) | ||
f7dg = foyer_fiscal('f7dg', period) | ||
isinvalid = foyer_fiscal('f7dg', 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.
proposition:
invalide
Sommes versées pour l'emploi d'un salariés à domicile | ||
2011 - | ||
''' | ||
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.
Il y aurait-il un nom de variable plus explicite ?
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 change en "nb_pac_majoration_plafond" comme dans PR #909
|
||
nbpacmin = nb_pac2 + f7dl | ||
maxBase = P.max1 * not_(annee1) + P.max1_1ereAnnee * annee1 | ||
maxDuMaxNonInv = P.max2 * not_(annee1) + P.max2_1ereAnnee * annee1 |
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.
En python, il est plutôt recommandé d'utiliser du "camel case" c'est à dire de plutot écrire
max_du_max_non_inv
https://www.python.org/dev/peps/pep-0008/#id45
b4debc3
to
70934e2
Compare
f86edef
to
8b9973b
Compare
…or years 2014-2016
…Update formula for tax reduction 'duflot' (common tax base ceiling with 'rpinel')
…n 2013 - f7.. variables were replaced by fh.. variables
…vious formula (ceiling applies to tax base not tax credit) + update parameters
…se of the ceiling due to f7dl only applies to tax reduction not tax credit
8b9973b
to
2a1e7eb
Compare
@ClaireLeroyIPP : il va te falloir éditer le CHANGELOG avant de merger. |
Les modifications de cette PR sont comparées à la branche
ipp-update-tax-reduction-quaenv
(#913)openfisca_france/model/prelevements_obligatoires/impot_revenu/credits_impots.py
.openfisca_france/model/prelevements_obligatoires/impot_revenu/variables_reductions_credits.py
openfisca_france/model/prelevements_obligatoires/impot_revenu/reductions_impots.py
.Ces changements :