Aman-Mittal opened a new issue, #789:
URL: https://github.com/apache/fineract-backoffice-ui/issues/789
## Summary
Three pieces of accounting reference data can be created and listed, but not
corrected:
| Object | Missing | Consequence |
|---|---|---|
| GL account | **Delete** | An account created by mistake (wrong type, wrong
parent, duplicate code) stays in the chart and in every GL picker. It can only
be disabled through edit. |
| Accounting closure | **Edit** | A closure's comments can't be corrected.
Today the only remedy is to delete the closure, which reopens the period, and
recreate it. |
| Charge definition | **Delete** | Unused or mistyped charges stay
selectable on every product and account form. |
## Evidence (`main` @ `8da1086f`)
`src/app/core/adapters/api/api-surface.json`:
- **GL accounts:** `getGlaccounts` and `putGlaccountsGlAccountId`, but no
`deleteGlaccountsGlAccountId`.
- **Closures:** `AccountingClosureService` has
`deleteGlclosuresGlClosureId`, `getGlclosures` and `postGlclosures`, but no
`putGlclosuresGlClosureId`.
- **Charges:** `getChargesChargeId` and `putChargesChargeId`, but no
`deleteChargesChargeId`.
- **Screens:** `src/app/features/accounting/gl-account-form.component.ts`,
`accounting-closure-form.component.ts` /
`accounting-closures-list.component.ts`, and
`src/app/features/accounting/charges/`.
## Platform support
- `DELETE /v1/glaccounts/{glAccountId}`. Fineract refuses accounts that have
children, journal entries or product mappings, with a specific error code; show
it verbatim.
- `PUT /v1/glclosures/{glClosureId}` updates the closure's `comments`. The
closing date is immutable.
- `DELETE /v1/charges/{chargeId}`. Refused while the charge is attached to a
product or account.
## Proposed implementation
- Add **Delete** on the GL account view / list and the charge view / list,
each behind a destructive `DialogService.confirm` that states the refusal
conditions up front.
- Add **Edit comments** on a closure, using the existing form in edit mode
with the date read-only.
- Show Fineract's refusal reason (in use / has children / has entries)
instead of a generic error.
## RBAC
| Action | Permission code | Typically granted to |
|---|---|---|
| View chart / closures / charges | `READ_GLACCOUNT` / `READ_GLCLOSURE` /
`READ_CHARGE` | accountants, auditors |
| Delete GL account | `DELETE_GLACCOUNT` | chief accountant only |
| Edit closure | `UPDATE_GLCLOSURE` | chief accountant |
| Delete closure (existing) | `DELETE_GLCLOSURE` | chief accountant (reopens
a closed period) |
| Delete charge | `DELETE_CHARGE` | product manager / finance |
All codes are in `scripts/permission-codes.json`.
- Writes pass with the exact code **or** `ALL_FUNCTIONS`, and reads with
`ALL_FUNCTIONS_READ`.
- Chart-of-accounts and period-closure changes are classic maker-checker
candidates (`DELETE_GLACCOUNT_CHECKER`, `UPDATE_GLCLOSURE_CHECKER`). The UI
should report "submitted for approval" when they are queued.
- Holding `UPDATE_GLACCOUNT` must not reveal the Delete action.
### UI expectations
- Gate every new button with `[appRequiresPermission]`, and guard any new
route with `permissionGuard`.
- Read-only accountants and auditors see the data but no enabled controls.
## Acceptance criteria
- [ ] An unused GL account and an unused charge can be deleted. In-use ones
show Fineract's reason.
- [ ] A closure's comments can be edited, and its date can't.
- [ ] Each action is gated on its own code.
- [ ] Unit tests cover the payloads, the refusal paths 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]