FINERACT-1724: Fix disbursement date validation message

This commit is contained in:
Adam Saghy
2023-03-13 17:38:32 +01:00
committed by Arnold Gálovics
parent 4b5a795327
commit cd9439fbbf
@@ -3226,7 +3226,7 @@ public class Loan extends AbstractAuditableWithUTCDateTimeCustom {
final LocalDate loanTransactionDate = loanTransaction.getTransactionDate();
if (loanTransactionDate.isBefore(getDisbursementDate())) {
final String errorMessage = "The transaction date cannot be before the loan disbursement date: "
+ getApprovedOnDate().toString();
+ getDisbursementDate().toString();
throw new InvalidLoanStateTransitionException("transaction", "cannot.be.before.disbursement.date", errorMessage,
loanTransactionDate, getDisbursementDate());
}
@@ -6197,7 +6197,7 @@ public class Loan extends AbstractAuditableWithUTCDateTimeCustom {
final LocalDate loanTransactionDate = loanTransaction.getTransactionDate();
if (loanTransactionDate.isBefore(getDisbursementDate())) {
final String errorMessage = "The transaction date cannot be before the loan disbursement date: "
+ getApprovedOnDate().toString();
+ getDisbursementDate().toString();
throw new InvalidLoanStateTransitionException("transaction", "cannot.be.before.disbursement.date", errorMessage,
loanTransactionDate, getDisbursementDate());
}