Loan Disbursement validation - timezone of tenant

This commit is contained in:
Mohit Sinha
2019-04-10 15:13:12 +02:00
committed by Michael Vorburger ⛑️
parent 80ae332aea
commit 3ee051cf57
@@ -2738,7 +2738,7 @@ public class Loan extends AbstractPersistableCustom<Long> {
validateActivityNotBeforeClientOrGroupTransferDate(LoanEvent.LOAN_DISBURSED, disbursedOn);
if (disbursedOn.isAfter(new LocalDate())) {
if (disbursedOn.isAfter(DateUtils.getLocalDateOfTenant())) {
final String errorMessage = "The date on which a loan with identifier : " + this.accountNumber
+ " is disbursed cannot be in the future.";
throw new InvalidLoanStateTransitionException("disbursal", "cannot.be.a.future.date", errorMessage, disbursedOn);