AshharAhmadKhan opened a new pull request, #5732:
URL: https://github.com/apache/fineract/pull/5732
## 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]