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

arnold 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 4bb9c40cd [FINERACT-1971] don't send event if the installment is paid
4bb9c40cd is described below

commit 4bb9c40cdcb7d4407d8260a44058c7c2f148766d
Author: taskain7 <[email protected]>
AuthorDate: Mon Oct 16 10:31:33 2023 +0200

    [FINERACT-1971] don't send event if the installment is paid
---
 .../apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStep.java   | 2 +-
 .../fineract/cob/loan/CheckLoanRepaymentDueBusinessStepTest.java      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStep.java
 
b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStep.java
index 944031579..fc815f937 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStep.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStep.java
@@ -81,6 +81,6 @@ public class CheckLoanRepaymentDueBusinessStep implements 
LoanCOBBusinessStep {
         return 
repaymentDate.minusDays(numberOfDaysBeforeDueDateToRaiseEvent).equals(currentDate)
                 && !nonDisbursedStatuses.contains(loan.getStatus())
                 && 
loan.getLoanSummary().getTotalOutstanding().compareTo(BigDecimal.ZERO) > 0
-                && 
repaymentScheduleInstallment.getDue(loan.getCurrency()).isGreaterThanZero();
+                && 
repaymentScheduleInstallment.getTotalOutstanding(loan.getCurrency()).isGreaterThanZero();
     }
 }
diff --git 
a/fineract-provider/src/test/java/org/apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStepTest.java
 
b/fineract-provider/src/test/java/org/apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStepTest.java
index 5376ad815..6b193ad7c 100644
--- 
a/fineract-provider/src/test/java/org/apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStepTest.java
+++ 
b/fineract-provider/src/test/java/org/apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStepTest.java
@@ -92,7 +92,7 @@ public class CheckLoanRepaymentDueBusinessStepTest {
         when(loanForProcessing.getLoanSummary()).thenReturn(loanSummary);
         
when(loanForProcessing.getLoanSummary().getTotalOutstanding()).thenReturn(BigDecimal.ONE);
         when(loanForProcessing.getCurrency()).thenReturn(currency);
-        when(repaymentInstallment.getDue(currency)).thenReturn(money);
+        
when(repaymentInstallment.getTotalOutstanding(currency)).thenReturn(money);
         when(money.isGreaterThanZero()).thenReturn(true);
 
         // when
@@ -150,7 +150,7 @@ public class CheckLoanRepaymentDueBusinessStepTest {
         when(loanForProcessing.getLoanSummary()).thenReturn(loanSummary);
         
when(loanForProcessing.getLoanSummary().getTotalOutstanding()).thenReturn(BigDecimal.ONE);
         when(loanForProcessing.getCurrency()).thenReturn(currency);
-        when(repaymentInstallment.getDue(currency)).thenReturn(money);
+        
when(repaymentInstallment.getTotalOutstanding(currency)).thenReturn(money);
         when(money.isGreaterThanZero()).thenReturn(true);
 
         // when

Reply via email to