[FINERACT-1401]-double-posting-on-closing-fixed-deposit (#1885)
This commit is contained in:
+1
-2
@@ -248,6 +248,7 @@ public class DepositAccountDomainServiceJpa implements DepositAccountDomainServi
|
|||||||
isAccountTransfer, isExceptionForBalanceCheck);
|
isAccountTransfer, isExceptionForBalanceCheck);
|
||||||
this.accountTransfersWritePlatformService.transferFunds(accountTransferDTO);
|
this.accountTransfersWritePlatformService.transferFunds(accountTransferDTO);
|
||||||
updateAlreadyPostedTransactions(existingTransactionIds, account);
|
updateAlreadyPostedTransactions(existingTransactionIds, account);
|
||||||
|
postJournalEntries(account, existingTransactionIds, existingReversedTransactionIds, isAccountTransfer);
|
||||||
} else {
|
} else {
|
||||||
final SavingsAccountTransaction withdrawal = this.handleWithdrawal(account, fmt, closedDate, account.getAccountBalance(),
|
final SavingsAccountTransaction withdrawal = this.handleWithdrawal(account, fmt, closedDate, account.getAccountBalance(),
|
||||||
paymentDetail, false, isRegularTransaction);
|
paymentDetail, false, isRegularTransaction);
|
||||||
@@ -257,8 +258,6 @@ public class DepositAccountDomainServiceJpa implements DepositAccountDomainServi
|
|||||||
account.close(user, command, tenantsTodayDate, changes);
|
account.close(user, command, tenantsTodayDate, changes);
|
||||||
this.savingsAccountRepository.save(account);
|
this.savingsAccountRepository.save(account);
|
||||||
|
|
||||||
postJournalEntries(account, existingTransactionIds, existingReversedTransactionIds, isAccountTransfer);
|
|
||||||
|
|
||||||
return savingsTransactionId;
|
return savingsTransactionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -1487,6 +1487,8 @@ public class FixedDepositTest {
|
|||||||
principal += interestPerMonth;
|
principal += interestPerMonth;
|
||||||
LOG.info("principal = {}", principal);
|
LOG.info("principal = {}", principal);
|
||||||
|
|
||||||
|
Integer transactionIdForPostInterest = this.fixedDepositAccountHelper.postInterestForFixedDeposit(fixedDepositAccountId);
|
||||||
|
|
||||||
this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId, CLOSED_ON_DATE);
|
this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId, CLOSED_ON_DATE);
|
||||||
|
|
||||||
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(
|
||||||
|
|||||||
Reference in New Issue
Block a user