This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new de329e2  FINERACT-83 Made interestIncome variable null-safe
de329e2 is described below

commit de329e2489e85601b978301bef9939ea9fb5b464
Author: thesmallstar <[email protected]>
AuthorDate: Tue Mar 10 21:43:19 2020 +0530

    FINERACT-83 Made interestIncome variable null-safe
---
 .../loanaccount/service/LoanAccrualWritePlatformServiceImpl.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualWritePlatformServiceImpl.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualWritePlatformServiceImpl.java
index e9513bf..f8da103 100755
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualWritePlatformServiceImpl.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualWritePlatformServiceImpl.java
@@ -430,7 +430,10 @@ public class LoanAccrualWritePlatformServiceImpl 
implements LoanAccrualWritePlat
             final Collection<LoanTransactionData> loanWaiverTansactions, final 
Collection<LoanSchedulePeriodData> loanSchedulePeriodDatas,
             final LocalDate tilldate) {
 
-        BigDecimal interestIncome = accrualData.getInterestIncome();
+        BigDecimal interestIncome = BigDecimal.ZERO;
+        if(accrualData.getInterestIncome() != null) {
+             interestIncome = accrualData.getInterestIncome();
+        }
         if (accrualData.getWaivedInterestIncome() != null) {
             BigDecimal recognized = BigDecimal.ZERO;
             BigDecimal unrecognized = BigDecimal.ZERO;

Reply via email to