FINERACT-2385: Zero amount reage transaction should not be allowed
This commit is contained in:
committed by
Adam Saghy
parent
54e85c748d
commit
4ae6fd5694
+5
@@ -2902,6 +2902,11 @@ public class AdvancedPaymentScheduleTransactionProcessor extends AbstractLoanRep
|
||||
loanTransaction.updateComponentsAndTotal(outstandingPrincipalBalance.get(), Money.zero(currency), Money.zero(currency),
|
||||
Money.zero(currency));
|
||||
|
||||
if (outstandingPrincipalBalance.get().isZero()) {
|
||||
loanTransaction.reverse();
|
||||
return;
|
||||
}
|
||||
|
||||
Money calculatedPrincipal = Money.zero(currency);
|
||||
Money adjustCalculatedPrincipal = Money.zero(currency);
|
||||
if (outstandingPrincipalBalance.get().isGreaterThanZero()) {
|
||||
|
||||
Reference in New Issue
Block a user