Skip to content

Commit

Permalink
Ajoute un paramètre pour le seuil de paiement
Browse files Browse the repository at this point in the history
  • Loading branch information
guillett committed Dec 11, 2024
1 parent c140778 commit 0419883
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Seuil de paiement
metadata:
unit: currency-FCP
values:
2015-12-01:
value: 2000
8 changes: 6 additions & 2 deletions openfisca_nouvelle_caledonie/variables/aide_logement.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,13 +533,17 @@ class aide_logement_montant(Variable):
definition_period = MONTH
label = "Aide au logement"

def formula(household, period):
def formula(household, period, parameters):
seuil_paiement = parameters(
period
).benefits.aide_logement.seuil_paiement

loyer = household("aide_logement_loyer", period)
supplement_loyer = household("aide_logement_supplement_loyer", period)
contribution = household("aide_logement_contribution_locataire", period)
montant = loyer + supplement_loyer - contribution

return (montant > 2000) * montant
return (montant >= seuil_paiement) * montant


class aide_logement(Variable):
Expand Down

0 comments on commit 0419883

Please sign in to comment.