[FINERACT-1401]-double-posting-on-closing-fixed-deposit (#1885)

This commit is contained in:
Manoj
2021-10-02 21:38:35 +05:30
committed by GitHub
parent 56240f71d1
commit d0cadc6ac9
2 changed files with 3 additions and 2 deletions
@@ -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;
} }
@@ -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(