From 889583b600f7e9fd6b247899ded9f35abd81bb4a Mon Sep 17 00:00:00 2001 From: Naeem Ullah Date: Tue, 10 Mar 2026 12:10:11 +0500 Subject: [PATCH] Disable transaction log lookup and date check Commented out the TransactionLog repository lookup and the previous-day date validation in CancellationTransactionService. The changes affect processDepositCancellationTransaction and processGLCancellationTransaction, temporarily bypassing the transaction existence check and same-day cancellation enforcement by leaving the original code commented for potential reinstatement. --- .../CancellationTransactionService.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/aconnect/src/main/java/com/mfsys/aconnect/client/service/CancellationTransactionService.java b/aconnect/src/main/java/com/mfsys/aconnect/client/service/CancellationTransactionService.java index 65de76a..60c7443 100644 --- a/aconnect/src/main/java/com/mfsys/aconnect/client/service/CancellationTransactionService.java +++ b/aconnect/src/main/java/com/mfsys/aconnect/client/service/CancellationTransactionService.java @@ -35,13 +35,13 @@ public class CancellationTransactionService { public ResponseEntity processDepositCancellationTransaction(DepositCancellationDTO depositCancellationDTO, String tokenHeader) { String porOrgacode = depositCancellationDTO.getPorOrgacode(); - TransactionLog log = transactionLogRepository - .findByTransactionIDAndPorOrgacode(depositCancellationDTO.getNodeId()+depositCancellationDTO.getSgtGntrtranlink(), porOrgacode) - .orElseThrow(() -> new TransactionNotFoundException(porOrgacode)); +// TransactionLog log = transactionLogRepository +// .findByTransactionIDAndPorOrgacode(depositCancellationDTO.getNodeId()+depositCancellationDTO.getSgtGntrtranlink(), porOrgacode) +// .orElseThrow(() -> new TransactionNotFoundException(porOrgacode)); - if (!log.getSgtGntrdate().isEqual(LocalDate.now())) { - throw new PreviousDayCancellationException(porOrgacode); - } +// if (!log.getSgtGntrdate().isEqual(LocalDate.now())) { +// throw new PreviousDayCancellationException(porOrgacode); +// } String url = depositURI + "/deposit" + "/organizations/" + depositCancellationDTO.getPorOrgacode() + "/transactions" + ACONNECT + "/cancel/nodes/" + depositCancellationDTO.getNodeId() + @@ -64,13 +64,13 @@ public class CancellationTransactionService { public ResponseEntity processGLCancellationTransaction(GLCancellationDTO glCancellationDTO, String tokenHeader) { String porOrgacode = glCancellationDTO.getPorOrgacode(); - TransactionLog log = transactionLogRepository - .findByTransactionIDAndPorOrgacode(glCancellationDTO.getNodeId()+glCancellationDTO.getSgtGntrtranlink(), porOrgacode) - .orElseThrow(() -> new TransactionNotFoundException(porOrgacode)); - - if (!log.getSgtGntrdate().isEqual(LocalDate.now())) { - throw new PreviousDayCancellationException(porOrgacode); - } +// TransactionLog log = transactionLogRepository +// .findByTransactionIDAndPorOrgacode(glCancellationDTO.getNodeId()+glCancellationDTO.getSgtGntrtranlink(), porOrgacode) +// .orElseThrow(() -> new TransactionNotFoundException(porOrgacode)); +// +// if (!log.getSgtGntrdate().isEqual(LocalDate.now())) { +// throw new PreviousDayCancellationException(porOrgacode); +// } String url = generalledgerURI + GENERALLEDGER + "/organizations/" + glCancellationDTO.getPorOrgacode() + "/transactions" + ACONNECT + "/cancel/nodes/" + glCancellationDTO.getNodeId() +