FINERACT-2385: Zero amount reage transaction should not be allowed

This commit is contained in:
Oleksii Novikov
2025-10-27 10:45:14 +01:00
committed by Adam Saghy
parent 54e85c748d
commit 4ae6fd5694
6 changed files with 177 additions and 14 deletions
@@ -44,6 +44,7 @@ import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil;
import org.apache.fineract.portfolio.loanaccount.domain.Loan;
import org.apache.fineract.portfolio.loanaccount.domain.LoanStatus;
import org.apache.fineract.portfolio.loanaccount.domain.LoanSummary;
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction;
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepository;
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType;
@@ -516,6 +517,9 @@ class LoanReAgingValidatorTest {
given(loanProductRelatedDetail.getLoanScheduleType()).willReturn(LoanScheduleType.PROGRESSIVE);
given(loan.isInterestBearing()).willReturn(false);
given(loan.getLoanTransactions()).willReturn(List.of());
LoanSummary loanSummary = mock(LoanSummary.class);
given(loan.getSummary()).willReturn(loanSummary);
given(loanSummary.getTotalPrincipalOutstanding()).willReturn(java.math.BigDecimal.valueOf(1000));
return loan;
}