From 9fa65f1604915f41b8feb63a330e1ad9d56c693a Mon Sep 17 00:00:00 2001 From: TOMAS Frederic Date: Fri, 26 Nov 2021 10:47:19 +0100 Subject: [PATCH] =?UTF-8?q?Ajoute=20une=20condition=20a=20la=20comparaison?= =?UTF-8?q?=20des=20ressources=20M-1=20=C3=A0=20m-3=20et=20N-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openfisca_france_local/communes/antony/base_ressources.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openfisca_france_local/communes/antony/base_ressources.py b/openfisca_france_local/communes/antony/base_ressources.py index c723dbe4..c883221d 100644 --- a/openfisca_france_local/communes/antony/base_ressources.py +++ b/openfisca_france_local/communes/antony/base_ressources.py @@ -66,8 +66,9 @@ def formula(famille, period, parameters): + (ressources_mensuelles_famille_n_1 / 4) + (ressources_annuelles_famille_n_1 / 4) ) - - ressources_considerees = min_(ressources_m_3, ressources_n_1) + # on ne compare les ressources recentes avec le N-1 + # que si on a effectivement des ressources N-1 + ressources_considerees = where(ressources_n_1 > 0, min_(ressources_m_3, ressources_n_1), ressources_m_3) return ressources_considerees