From e8b7f074dd213b578e8b39e99f6723ed0b14c216 Mon Sep 17 00:00:00 2001 From: johnnadeluy Date: Thu, 9 Jan 2025 12:16:53 +0100 Subject: [PATCH] Fix average year validation for Pif Calculator MIM-2162 --- src/main/resources/react4xp/_entries/PifCalculator.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/react4xp/_entries/PifCalculator.tsx b/src/main/resources/react4xp/_entries/PifCalculator.tsx index 357f04eaa..df7b1a6b4 100644 --- a/src/main/resources/react4xp/_entries/PifCalculator.tsx +++ b/src/main/resources/react4xp/_entries/PifCalculator.tsx @@ -209,7 +209,7 @@ function PifCalculator(props: PifCalculatorProps) { const endMonthValue = value || endMonth.value.id const maxYearAverage = Number(validMaxMonth) === 12 ? validMaxYear : Number(validMaxYear) - 1 const endMonthValid = - endMonthValue === '' + endMonthValue === '90' ? endYear.value <= maxYearAverage : !(endYear.value === validMaxYear && endMonthValue > validMaxMonth) if (!endMonthValid) {