Merge pull request #422 from goutham-M/mifosx-531

Loan is getting approved for a Closed client(fixed)
This commit is contained in:
Keith Woodlock
2013-07-03 02:40:30 -07:00
@@ -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);