-
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 11 : Correction du calcul des revenus non salariaux pour l'IR #917
Conversation
|
||
return frag_impo | ||
|
||
def formula_2016_01_01(individu, period, parameters): |
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.
Utiliser end plutôt que renvoyer 0
@@ -2499,7 +2555,7 @@ def abat_rpns(rev, P): | |||
|
|||
# # E revenus non commerciaux non professionnels | |||
# regime déclaratif special ou micro-bnc | |||
mncn_timp = abat_rpns(mncn_impo, micro.specialbnc.services) # TODO check | |||
mncn_timp = abat_rpns(mncn_impo, micro.specialbnc) |
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.
espace en trop
RPNS = (rev_NS + rev_NS_mi + rpns_pvct + exon + abic_impm - abic_defm + alnp_imps + cncn_aimp - nbic_mvct) | ||
exon_acc = max_(0, macc_timp + nacc_timp - macc_mvct) - macc_timp - nacc_timp # ajout artificiel | ||
exon_ncn = max_(0, mncn_timp - mncn_mvct) - mncn_timp # ajout artificiel | ||
RPNS = (rev_NS + rev_NS_mi + rpns_pvct + exon_acc + exon_ncn + abic_impm - abic_defm + alnp_imps + cncn_aimp - rpns_mvct_pro) |
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.
Ne pas utiliser de majuscules
0a2dc73
to
f94ab8b
Compare
@@ -2329,10 +2328,10 @@ def formula(individu, period, parameters): | |||
return frag_pvct + macc_pvct + mbic_pvct + mbnc_pvct + mncn_pvct | |||
|
|||
|
|||
class rpns_mvct(Variable): | |||
class rpns_mvct_nonpro(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.
Est-il possible de donner un nom plus explicite à cette variable ? moins_values_ct_non_pro
ou moins_values_court_terme_non_pro
definition_period = YEAR | ||
|
||
def formula(individu, period, parameters): | ||
"""Moins values de court terme |
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.
Aller à 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.
J'ai viré ces descriptions finalement parce qu'elles me paraissent redondantes avec le label
@@ -2373,6 +2404,29 @@ def formula(individu, period, parameters): | |||
return mbic_mvlt + macc_mvlt + mbnc_mvlt + mncn_mvlt | |||
|
|||
|
|||
class rpns_frag(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.
Est-il possible de donner un nom plus explicite à cette variable ? rnps_revenus_forfait_agricoles
ou revenus_forfait_agricoles
P.taux_wj * min_(f7wj, max1) + P.taux_wi * min_(f7wi, max2)) | ||
max1 = max_(0, max0 - f7wj) # f7wj s'impute avant f7wl et f7wi | ||
max2 = max_(0, max1 - f7wi) # f7wi s'impute avant f7wl | ||
return ( |
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 :
return (
P.taux_wr * f7wr
+ P.taux_wj * min_(f7wj, max0)
+ P.taux_wi * min_(f7wi, max1)
+ P.taux_wl * min_(f7wl, max2)
+ P.taux_wl * min_(max_(0,f7wl - max2), max00)
)
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 #916
|
||
return (P.taux_wr * f7wr + P.taux_wl * min_(f7wl, max00) + P.taux_wl * max_(f7wl - max00, 0) + P.taux_wj * | ||
min_(f7wj, max1)) | ||
return ( |
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 :
return (
P.taux_wr * f7wr
+ P.taux_wj * min_(f7wj, max0)
+ P.taux_wl * min_(f7wl, max1)
+ P.taux_wl * min_(max_(0,f7wl - max1), max00)
)
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 #916
@@ -707,7 +979,7 @@ class f7wv(Variable): | |||
entity = FoyerFiscal | |||
label = u"Dépenses en faveur de la qualité environnementale de l'habitation principale: achat de volets en 2012" | |||
# start_date = date(2012, 1, 1) | |||
end = '2012-12-31' | |||
# end = '2012-12-31' changes meaning in 2015 |
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 discussions sur ces expressions dans les PR précédentes
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 #913
# start_date = date(2013, 1, 1) | ||
definition_period = YEAR | ||
|
||
|
||
class fhsn(Variable): | ||
cerfa_field = u"HSN" | ||
# Investissements OUTRE-MER dans le secteur du logement et autres secteurs d’activité |
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 cases ci-dessous n'ont pas de label. Est-il possible d'en rajouter un, même si il est très large ?
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 #912
value_type = int | ||
unit = 'currency' | ||
entity = FoyerFiscal | ||
label = u"Investissements outre-mer dans le cadre de l'entreprise : Autres investissements, Investissements dans votre entreprise avec exploitation directe, montant de la réduction d’impôt dont vous demandez l’imputation en 2013, en 2010" | ||
# start_date = date(2013, 1, 1) | ||
label = u"Cotisations pour la défense des forêts contre l'incendie " |
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.
🙌
label = u"Investissements locatifs neufs dispositif Scellier : Reports concernant les investissements achevés ou acquis au cours des années antérieures, Investissements achevés en 2013 et réalisés du 1.1.2013 au 31.3.2013 avec promesse d'achat en 2012, en métropole, dans les DOM, à Saint-Barthélemy, Saint-Martin, Saint-Pierre-et-Miquelon" | ||
# start_date = date(2014, 1, 1) | ||
definition_period = YEAR | ||
|
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 faut mettre 2 espaces entre les classes :)
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
2009-01-01: | ||
value: 45000.0 | ||
2012-01-01: | ||
value: 30000.0 |
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 une ligne vide à la fin :)
…ic_impm, nbic_impm)
…nnal income (rpns_mvct_nonpro) can be imputed on global income (NB : not the case for long-run capital loss (rpns_mvlt) or for short-run net losses of non-professionnal income (rpns_mvct) that can only be imputed on similar incomes
…n 2016 TODO : code the new system of "micro BA" that replaced it
… already taken into account in 'rpns_individu'
e2e9f8a
to
bb2995a
Compare
CHANGELOG.md
Outdated
* Correction du système socio-fiscal. | ||
* Périodes concernées : toutes | ||
* Zones impactées : | ||
- `openfisca_france/model/prelevements_obligatoires/impot_revenu/ir` |
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.
Générallement, on omet openfisca_france/model/
des chemins dans le contributing cf #956
Les modifications de cette PR sont comparées à la branche
ipp-update-tax-credit-aidper
(#916)openfisca_france/model/prelevements_obligatoires/impot_revenu/ir.py
.openfisca_france/model/revenus/activite/non_salarie.py
openfisca_france/parameters/impot_revenu/rpns/micro/specialbnc/max.yaml
openfisca_france/parameters/impot_revenu/rpns/micro/specialbnc/min.yaml
non_salarie.py
Ces changements :