From 5d96e8cc32ff63f97d5ac15e19c6fafee0c31357 Mon Sep 17 00:00:00 2001 From: Rajkumar-Selvaraj <148527647+Rajkumar-Selvaraj@users.noreply.github.com> Date: Wed, 3 Jan 2024 22:42:18 +0530 Subject: [PATCH] FINERACT-2034 : Fixed Handle Null Loan Cycle Counter in Loan Product Assignment for Borrow Cycle Enabled Products --- .../fineract/portfolio/loanaccount/data/LoanAccountData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java index 20572c6a825..acff5c52b45 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java @@ -500,7 +500,7 @@ public static LoanAccountData loanProductWithTemplateDefaults(final LoanProductD BigDecimal interestRatePerPeriod = null; Integer numberOfRepayments = null; - if (product.isUseBorrowerCycle() && loanCycleNumber > 0) { + if (product.isUseBorrowerCycle() && loanCycleNumber != null && loanCycleNumber > 0) { Collection principalVariationsForBorrowerCycle = product .getPrincipalVariationsForBorrowerCycle(); Collection interestForVariationsForBorrowerCycle = product