From f68d71e62c5a1e88db552bb9ab28a779544d15d4 Mon Sep 17 00:00:00 2001 From: Shamzic Date: Thu, 3 Oct 2024 11:27:25 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20mod=C3=A9lisation=20montpellier=5Fmutuel?= =?UTF-8?q?le=5Fcommunale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../communes/montpellier/montpellier_mutuelle_communale.py | 7 ++++--- .../montpellier/montpellier_mutuelle_communale.yml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/openfisca_france_local/communes/montpellier/montpellier_mutuelle_communale.py b/openfisca_france_local/communes/montpellier/montpellier_mutuelle_communale.py index a14facb4..09037bf9 100644 --- a/openfisca_france_local/communes/montpellier/montpellier_mutuelle_communale.py +++ b/openfisca_france_local/communes/montpellier/montpellier_mutuelle_communale.py @@ -11,6 +11,7 @@ class montpellier_mutuelle_communale(Variable): def formula(famille, period): eligibilite_residentielle = famille.demandeur.menage('montpellier_eligibilite_residence', period) - css_participation_forfaitaire = famille('css_participation_forfaitaire_montant', period) - eligibilite_css = css_participation_forfaitaire > 0 - return eligibilite_residentielle & not_(eligibilite_css) + css_participation_forfaitaire = famille('css_participation_forfaitaire', period) + cmu_c = famille('cmu_c', period) + eligibilite_css_cmu_c = (css_participation_forfaitaire > 0) | cmu_c + return eligibilite_residentielle * not_(eligibilite_css_cmu_c) diff --git a/tests/communes/montpellier/montpellier_mutuelle_communale.yml b/tests/communes/montpellier/montpellier_mutuelle_communale.yml index fe8034f8..cffa2e55 100644 --- a/tests/communes/montpellier/montpellier_mutuelle_communale.yml +++ b/tests/communes/montpellier/montpellier_mutuelle_communale.yml @@ -1,7 +1,8 @@ - name: "Égibilité à la mutuelle communale de Montpellier" period: 2024-10 input: - depcom: ["34172", "34172", "68400", "68400"] - css_participation_forfaitaire_montant: [0, 20, 25, 30] + depcom: ["34172","34172", "34172", "68400", "68400"] + css_participation_forfaitaire_montant: [0, 0, 20, 25, 30] + cmu_c: [False, True, False, False, False] output: - montpellier_mutuelle_communale: [True, False, False, False] + montpellier_mutuelle_communale: [True, False, False, False, False]