Skip to content

Commit

Permalink
Supprime les termes à zéro
Browse files Browse the repository at this point in the history
  • Loading branch information
b-michaud committed Dec 9, 2024
1 parent b609e6b commit 562c5a7
Showing 1 changed file with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2329,22 +2329,16 @@ def formula(foyer_fiscal, period, parameters):
impots_totaux_avant_imputations = iai + contribution_exceptionnelle_hauts_revenus - prelevement_forfaitaire_unique_ir - prelevement_forfaitaire_liberatoire

return (
(impots_totaux_avant_imputations > parameters_recouvrement.min_avant_credits_impots) * (
(pre_result < parameters_recouvrement.min_apres_credits_impots)
* (result > 0)
* result
* 0
+ ((pre_result <= 0) + (pre_result >= parameters_recouvrement.min_apres_credits_impots))
* (- result)
)
+ (impots_totaux_avant_imputations <= parameters_recouvrement.min_avant_credits_impots) * (
(pre_result < 0)
* (-result)
+ (pre_result >= 0)
* 0
* result
)
(impots_totaux_avant_imputations > parameters_recouvrement.min_avant_credits_impots) *
(((pre_result <= 0) + (pre_result >= parameters_recouvrement.min_apres_credits_impots)) *
(- result)
)
+
(impots_totaux_avant_imputations <= parameters_recouvrement.min_avant_credits_impots) *
((pre_result < 0) *
(-result)
)
)


class foyer_impose(Variable):
Expand Down

0 comments on commit 562c5a7

Please sign in to comment.