FINERACT-1724: Fix disbursement date validation message
This commit is contained in:
committed by
Arnold Gálovics
parent
4b5a795327
commit
cd9439fbbf
+2
-2
@@ -3226,7 +3226,7 @@ public class Loan extends AbstractAuditableWithUTCDateTimeCustom {
|
|||||||
final LocalDate loanTransactionDate = loanTransaction.getTransactionDate();
|
final LocalDate loanTransactionDate = loanTransaction.getTransactionDate();
|
||||||
if (loanTransactionDate.isBefore(getDisbursementDate())) {
|
if (loanTransactionDate.isBefore(getDisbursementDate())) {
|
||||||
final String errorMessage = "The transaction date cannot be before the loan disbursement date: "
|
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,
|
throw new InvalidLoanStateTransitionException("transaction", "cannot.be.before.disbursement.date", errorMessage,
|
||||||
loanTransactionDate, getDisbursementDate());
|
loanTransactionDate, getDisbursementDate());
|
||||||
}
|
}
|
||||||
@@ -6197,7 +6197,7 @@ public class Loan extends AbstractAuditableWithUTCDateTimeCustom {
|
|||||||
final LocalDate loanTransactionDate = loanTransaction.getTransactionDate();
|
final LocalDate loanTransactionDate = loanTransaction.getTransactionDate();
|
||||||
if (loanTransactionDate.isBefore(getDisbursementDate())) {
|
if (loanTransactionDate.isBefore(getDisbursementDate())) {
|
||||||
final String errorMessage = "The transaction date cannot be before the loan disbursement date: "
|
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,
|
throw new InvalidLoanStateTransitionException("transaction", "cannot.be.before.disbursement.date", errorMessage,
|
||||||
loanTransactionDate, getDisbursementDate());
|
loanTransactionDate, getDisbursementDate());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user