From d29c8528f57b53893ef4b61270161fa116bb3c4d Mon Sep 17 00:00:00 2001 From: Johnnadel Salita Uy Date: Thu, 9 Jan 2025 13:02:05 +0100 Subject: [PATCH] [MIM-2162] Fix average year validation for Pif Calculator (#3086) 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) {