Skip to content
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 9 : Mise à jour de la réduction d'impôt PME non cotées (2014-2016) #915

Conversation

claireleroy
Copy link
Contributor

Les modifications de cette PR sont comparées à la branche ipp-update-tax-reduc-and-credit-saldom (#914)

  • Évolution du système socio-fiscal.
  • Périodes concernées : à partir du 01/01/2014
  • Zones impactées :
  • openfisca_france/model/prelevements_obligatoires/impot_revenu/variables_reductions_credits.py
  • openfisca_france/model/prelevements_obligatoires/impot_revenu/reductions_impots.py.
  • Détails :
    • Mise à jour des formules (2014-2016) de la réduction 'cappme' (réduction pour souscription au capital de PME non cotées)
    • Ajout des inputs variables associées

Ces changements :

  • Ajoutent une fonctionnalité (par exemple ajout d'une variable).
  • Corrigent ou améliorent un calcul déjà existant.

Copy link
Member

@benjello benjello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Virer les simulation.calculate

f7cr = simulation.calculate('f7cr', period)
f7cu = simulation.calculate('f7cu', period)
f7cy = simulation.calculate('f7cy', period)
_P = simulation.parameters_at(period.start)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactorer _P

f7cy = simulation.calculate('f7cy', period)
f7dy = simulation.calculate('f7dy', period)
f7ey = simulation.calculate('f7ey', period)
_P = simulation.parameters_at(period.start)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactorer _P

base_report_cappme_2011_PME = max_(0, min_(f7cm, seuil1) - base_report_cappme_2010_PME)
base_report_cappme_2012_PME = max_(0, min_(f7cn, seuil1 - base_report_cappme_2010_PME - base_report_cappme_2011_PME))
base_report_cappme_2013_PME = max_(0, min_(f7cc, seuil1 - base_report_cappme_2010_PME - base_report_cappme_2011_PME - base_report_cappme_2012_PME ))
base_cappme_2014_PME = max_(0, min_(f7cu, seuil1 - base_report_cappme_2010_PME - base_report_cappme_2011_PME - base_report_cappme_2012_PME - base_report_cappme_2013_PME))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

base_report_cappme_2013_TPE = max_(0, min_(f7cr, seuil2 - base_report_cappme_2012_TPE))
base_cappme_2014_TPE = max_(0, min_(f7cf, seuil2 - base_report_cappme_2012_TPE - base_report_cappme_2013_TPE))

report_cappme_2013_plaf_general = f7cy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Est ce que cette équivalence ne pourrait pas être remontée en ligne 675 ?

seuil4 = seuil3 - min_(seuil3, base_report_cappme_2010_PME + base_report_cappme_2011_PME)

return (report_cappme_2013_plaf_general +
min_(seuil2, base_report_cappme_2010_PME) * P.taux25 +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pour les parametre P.taux25 ...
Si le taux n'est pas amené à changer, il me semble qu'il vaudrait mieux écrire le taux en dur dans la formule.
S"il est amené à changer, il me semble qu'un terme plus générique serait plus approprié.

seuil3 = seuil2 - min_(seuil2, base_report_cappme_2010_PME)
seuil4 = seuil3 - min_(seuil3, base_report_cappme_2010_PME + base_report_cappme_2011_PME)

return (report_cappme_2013_plaf_general +
Copy link
Contributor

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

@claireleroy claireleroy force-pushed the ipp-update-tax-reduc-and-credit-saldom branch 2 times, most recently from 8b9973b to 2a1e7eb Compare April 4, 2018 16:43
@claireleroy claireleroy force-pushed the ipp-update-tax-reduction-cappme branch from d7dbd44 to acbf554 Compare April 5, 2018 11:50
@claireleroy claireleroy deleted the ipp-update-tax-reduction-cappme branch April 9, 2018 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants