From f1ffeed7f908e5bb5964f32f1b63379f9f599e24 Mon Sep 17 00:00:00 2001 From: Farooq Date: Wed, 11 Dec 2024 18:35:49 +0100 Subject: [PATCH] =?UTF-8?q?[SU-490]Adelanto=20de=20pago=20con=20per=C3=ADo?= =?UTF-8?q?do=20de=20gracia=20/=20Repayment=20with=20Grace=20Period?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/AbstractCumulativeLoanScheduleGenerator.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractCumulativeLoanScheduleGenerator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractCumulativeLoanScheduleGenerator.java index b210e350f3..fc5bf036c2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractCumulativeLoanScheduleGenerator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractCumulativeLoanScheduleGenerator.java @@ -3114,6 +3114,11 @@ private LoanScheduleDTO rescheduleNextInstallmentsForProgressiveLoans(final Math processInstallmentsInstallments = fetchRetainedInstallmentsForProgressiveLoans(loan.getRepaymentScheduleInstallments(), rescheduleFrom, currency); } + // if processed installements is empty , check for graced installments + if (processInstallmentsInstallments.isEmpty()) { + processInstallmentsInstallments = loan.getRepaymentScheduleInstallments().stream() + .filter(LoanRepaymentScheduleInstallment::isFullyGraced).toList(); + } final List newRepaymentScheduleInstallments = new ArrayList<>(); // Block process the installment and creates the period if it falls