[FINERACT-1971] don't send event if the installment is paid
This commit is contained in:
committed by
Arnold Gálovics
parent
c0d0b565cb
commit
4bb9c40cdc
+1
-1
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user