Loan is getting approved for a Closed client(fixed)

This commit is contained in:
goutham-M
2013-07-03 11:10:39 +05:30
parent f00d212e8f
commit a941bbdded
@@ -356,6 +356,9 @@ public class ClientWritePlatformServiceJpaRepositoryImpl implements ClientWriteP
final String errorMessage = "The client closureDate cannot be before the loan closedOnDate.";
throw new InvalidClientStateTransitionException("close", "date.cannot.before.loan.closed.date", errorMessage,
closureDate, loan.getClosedOnDate());
} else if (loanStatus.isPendingApproval()) {
final String errorMessage = "Client cannot be closed because of non-closed loans.";
throw new InvalidClientStateTransitionException("close", "loan.non-closed", errorMessage);
}
}
List<SavingsAccount> clientSavingAccounts = this.savingsRepository.findSavingAccountByClientId(clientId);