Aman-Mittal opened a new issue, #782:
URL: https://github.com/apache/fineract-backoffice-ui/issues/782
## Summary
The savings account screen can **undo** a transaction but can't **modify**
one (correct its amount or date) or **reverse** one, the auditable alternative
to undo. It also can't set an overdraft on an individual account.
Related: #762 covers overdraft and other settings at the *product* level;
#754 covers savings charge pay/waive/inactivate. This issue is about
account-level transactions and overdraft.
## Evidence (`main` @ `8da1086f`)
- `src/app/features/products/savings-account-view.component.ts:1146` only
ever calls `runTransactionCommand(id, 'undo')`.
- `src/app/features/**` has no `allowOverdraft` or `overdraftLimit`
reference.
## Platform support
`POST
/v1/savingsaccounts/{savingsId}/transactions/{transactionId}?command=…`, with
commands defined in `SavingsApiConstants`:
| Command | Purpose |
|---|---|
| `modify` | correct the transaction's amount, date or payment details.
Fineract posts a reversing entry plus a corrected one. |
| `reverse` | reverse with a full audit trail and a reversal transaction
(instead of the silent `undo`) |
| `undo` | existing |
`PUT /v1/savingsaccounts/{id}` accepts `allowOverdraft`, `overdraftLimit`,
`nominalAnnualInterestRateOverdraftBalance` and
`minOverdraftForInterestCalculation`, within the product's limits.
## Proposed implementation
- Add **Modify** and **Reverse** to the savings transaction row actions:
- **Modify** opens the deposit / withdrawal form prefilled with the
transaction.
- **Reverse** asks for confirmation and an optional note.
- Offer neither for already-reversed rows or for non-adjustable types such
as interest posting.
- Add an **Overdraft** section to the savings account edit form, shown when
the product allows overdraft, and display the limit on the account summary.
## RBAC
| Action | Permission code | Typically granted to |
|---|---|---|
| Undo transaction (existing) | `UNDOTRANSACTION_SAVINGSACCOUNT` |
operations supervisor |
| Modify transaction | `ADJUSTTRANSACTION_SAVINGSACCOUNT` | operations
supervisor (not the teller who posted it) |
| Reverse transaction | `REVERSETRANSACTION_SAVINGSACCOUNT` | operations
supervisor / finance |
| Set account overdraft | `UPDATE_SAVINGSACCOUNT` | branch manager / credit
officer |
All codes are in `scripts/permission-codes.json`.
- Writes pass with the exact code **or** `ALL_FUNCTIONS`. With maker-checker
on, the command is queued for `<CODE>_CHECKER`, and the UI should say
"submitted for approval".
- An overdraft is a credit facility, so institutions commonly restrict it to
a credit role even though Fineract uses the general `UPDATE_SAVINGSACCOUNT`
code. The UI should at least gate on that code, and the overdraft fields should
be clearly separated so a role-based policy is easy to apply.
### UI expectations
- Extend `SAVINGS_COMMAND_PERMISSIONS` in `command-permissions.ts` with
`modify` and `reverse`, after verifying them with the probe described in that
file.
- Gate row actions with `[appRequiresPermission]`.
- Read-only users see transactions but no enabled actions.
## Acceptance criteria
- [ ] A savings transaction can be modified (balance recalculated) and
reversed (marked reversed with a reversal entry).
- [ ] An overdraft limit can be set on an account within the product's
bounds.
- [ ] Each action is gated on its own code.
- [ ] Unit tests cover the payloads and the gating.
--
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]