[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);
this.accountTransfersWritePlatformService.transferFunds(accountTransferDTO);
updateAlreadyPostedTransactions(existingTransactionIds, account);
postJournalEntries(account, existingTransactionIds, existingReversedTransactionIds, isAccountTransfer);
} else {
final SavingsAccountTransaction withdrawal = this.handleWithdrawal(account, fmt, closedDate, account.getAccountBalance(),
paymentDetail, false, isRegularTransaction);
@@ -257,8 +258,6 @@ public class DepositAccountDomainServiceJpa implements DepositAccountDomainServi
account.close(user, command, tenantsTodayDate, changes);
this.savingsAccountRepository.save(account);
postJournalEntries(account, existingTransactionIds, existingReversedTransactionIds, isAccountTransfer);
return savingsTransactionId;
}
@@ -1487,6 +1487,8 @@ public class FixedDepositTest {
principal += interestPerMonth;
LOG.info("principal = {}", principal);
Integer transactionIdForPostInterest = this.fixedDepositAccountHelper.postInterestForFixedDeposit(fixedDepositAccountId);
this.fixedDepositAccountHelper.calculatePrematureAmountForFixedDeposit(fixedDepositAccountId, CLOSED_ON_DATE);
Integer prematureClosureTransactionId = (Integer) this.fixedDepositAccountHelper.prematureCloseForFixedDeposit(