Skip to content

FINERACT-2577: Allow adjust (modify) of Fixed Deposit transactions#5733

Open
AshharAhmadKhan wants to merge 1 commit intoapache:developfrom
AshharAhmadKhan:FINERACT-2577-allow-adjust-fixed-deposit
Open

FINERACT-2577: Allow adjust (modify) of Fixed Deposit transactions#5733
AshharAhmadKhan wants to merge 1 commit intoapache:developfrom
AshharAhmadKhan:FINERACT-2577-allow-adjust-fixed-deposit

Conversation

@AshharAhmadKhan
Copy link
Copy Markdown
Contributor

Description

Fixes a silently broken adjust (modify) transaction endpoint for Fixed Deposit accounts. The bug exists in the same 3-layer pattern as the undo bug fixed by PR #5590 (FINERACT-2463).

Layer 1 — Wrong command builder called:
FixedDepositAccountTransactionsApiResource.java was calling builder.adjustSavingsAccountTransaction(), routing every FD modify request to the SAVINGSACCOUNT command handler instead of FIXEDDEPOSITACCOUNT.

Layer 2 — Missing builder method:
adjustFixedDepositAccountTransaction() did not exist in CommandWrapperBuilder.java. Added with actionName = "ADJUSTTRANSACTION" and entityName = "FIXEDDEPOSITACCOUNT".

Layer 3 — Stub implementation replaced:
adjustFDTransaction() in DepositAccountWritePlatformServiceJpaRepositoryImpl.java was an unconditional stub that always threw DepositAccountTransactionNotAllowedException (both params were @SuppressWarnings("unused")). Replaced with full implementation modelled on the savings account equivalent, with FD-specific behaviour: FixedDepositAccount cast, updateMaturityDateAndAmount(), 7-param postInterest(), and no RD-only calls.

FixedDepositTransactionAdjustmentCommandHandler was already correctly annotated — no changes needed.

Files changed:

  • CommandWrapperBuilder.java — added adjustFixedDepositAccountTransaction()
  • FixedDepositAccountTransactionsApiResource.java — one-line fix, call FD-specific builder method
  • DepositAccountWritePlatformServiceJpaRepositoryImpl.java — full implementation replacing stub
  • FixedDepositAccountHelper.java — added adjustFixedDepositTransaction() using typed Feign client
  • FixedDepositTest.java — added testFixedDepositAccountAdjustTransaction() with CASH_BASED accounting, journal entry assertions, and reversal verification

No Swagger changes needed — PR #5590 already added the required annotations.

Closes: https://issues.apache.org/jira/browse/FINERACT-2577

@AshharAhmadKhan AshharAhmadKhan force-pushed the FINERACT-2577-allow-adjust-fixed-deposit branch from 355f132 to 22719df Compare April 3, 2026 06:18
@AshharAhmadKhan
Copy link
Copy Markdown
Contributor Author

Thanks for the review!

  1. Reverted all .gitignore changes.
  2. Added proper import for PostFixedDepositAccountsFixedDepositAccountIdTransactionsRequest and removed both inline fully-qualified usages (including the one in undoFixedDepositTransaction from FINERACT-2463: Allow undo of Fixed Deposit transactions #5590).

@AshharAhmadKhan AshharAhmadKhan force-pushed the FINERACT-2577-allow-adjust-fixed-deposit branch from 22719df to d4339e2 Compare April 3, 2026 07:25
@AshharAhmadKhan
Copy link
Copy Markdown
Contributor Author

Spotless applied, the remaining one check should also pass now.

@AshharAhmadKhan
Copy link
Copy Markdown
Contributor Author

@adamsaghy same flaky E2E shard pattern as #5590LoanCapitalizedIncome-Part2 assertion failure unrelated to this PR. Let me know if something needs to change.

Copy link
Copy Markdown
Contributor

@DeathGun44 DeathGun44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AshharAhmadKhan
Copy link
Copy Markdown
Contributor Author

@adamsaghy pinging you on this one as well , please take a look when you're free! Happy to make any changes if you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants