fix for MIFOSX-1019
This commit is contained in:
+8
@@ -358,6 +358,14 @@ public class SavingsAccount extends AbstractPersistable<Long> {
|
|||||||
return SavingsAccountStatusType.fromInt(this.status).isApproved();
|
return SavingsAccountStatusType.fromInt(this.status).isApproved();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isActivated() {
|
||||||
|
boolean isActive = false;
|
||||||
|
if (this.activatedOnDate != null) {
|
||||||
|
isActive = true;
|
||||||
|
}
|
||||||
|
return isActive;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isClosed() {
|
public boolean isClosed() {
|
||||||
return SavingsAccountStatusType.fromInt(this.status).isClosed();
|
return SavingsAccountStatusType.fromInt(this.status).isClosed();
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -396,7 +396,7 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr
|
|||||||
if (this.savingsAccountRepository.doNonClosedSavingAccountsExistForClient(client.getId())) {
|
if (this.savingsAccountRepository.doNonClosedSavingAccountsExistForClient(client.getId())) {
|
||||||
// get each individual saving account for the client
|
// get each individual saving account for the client
|
||||||
for (final SavingsAccount savingsAccount : this.savingsAccountRepository.findSavingAccountByClientId(client.getId())) {
|
for (final SavingsAccount savingsAccount : this.savingsAccountRepository.findSavingAccountByClientId(client.getId())) {
|
||||||
if (!savingsAccount.isClosed()) {
|
if (savingsAccount.isActivated() && !savingsAccount.isClosed()) {
|
||||||
switch (transferEventType) {
|
switch (transferEventType) {
|
||||||
case ACCEPTANCE:
|
case ACCEPTANCE:
|
||||||
this.savingsAccountWritePlatformService.acceptSavingsTransfer(savingsAccount.getId(),
|
this.savingsAccountWritePlatformService.acceptSavingsTransfer(savingsAccount.getId(),
|
||||||
|
|||||||
Reference in New Issue
Block a user