FINERACT-2205: Add tests when charge is added after the charge off date and forbid backdated charge-off transactions in the middle of the monetary activity.
This commit is contained in:
committed by
Adam Saghy
parent
bc0293bfa1
commit
69317d62c8
+6
@@ -3201,6 +3201,12 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
||||
transactionDate);
|
||||
}
|
||||
|
||||
if (loan.hasMonetaryActivityAfter(transactionDate)) {
|
||||
throw new GeneralPlatformDomainRuleException("error.msg.loan.monetary.transactions.after.charge.off",
|
||||
"Loan: " + loanId + " charge-off cannot be executed. Loan has monetary activity after the charge-off transaction date!",
|
||||
loanId);
|
||||
}
|
||||
|
||||
businessEventNotifierService.notifyPreBusinessEvent(new LoanChargeOffPreBusinessEvent(loan));
|
||||
|
||||
if (command.hasParameter(LoanApiConstants.chargeOffReasonIdParamName)) {
|
||||
|
||||
Reference in New Issue
Block a user