fix for MIFOSX-1019

This commit is contained in:
Vishwas Babu A J
2014-05-05 21:20:21 +05:30
parent a0c26c65d9
commit 285cce1bf8
2 changed files with 9 additions and 1 deletions
@@ -358,6 +358,14 @@ public class SavingsAccount extends AbstractPersistable<Long> {
return SavingsAccountStatusType.fromInt(this.status).isApproved();
}
public boolean isActivated() {
boolean isActive = false;
if (this.activatedOnDate != null) {
isActive = true;
}
return isActive;
}
public boolean isClosed() {
return SavingsAccountStatusType.fromInt(this.status).isClosed();
}
@@ -396,7 +396,7 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr
if (this.savingsAccountRepository.doNonClosedSavingAccountsExistForClient(client.getId())) {
// get each individual saving account for the client
for (final SavingsAccount savingsAccount : this.savingsAccountRepository.findSavingAccountByClientId(client.getId())) {
if (!savingsAccount.isClosed()) {
if (savingsAccount.isActivated() && !savingsAccount.isClosed()) {
switch (transferEventType) {
case ACCEPTANCE:
this.savingsAccountWritePlatformService.acceptSavingsTransfer(savingsAccount.getId(),