Aman-Mittal opened a new issue, #774:
URL: https://github.com/apache/fineract-backoffice-ui/issues/774
## Summary
On a Working Capital loan, charges can be added and waived, but not
**adjusted** or opened for detail.
The discount fee can only be changed through `PUT /discount`. The
`discountFee` and `discountFeeAdjustment` transaction commands, which post it
as a transaction, are not available.
Related: #754 covers pay / waive / adjust for *regular* loan, savings and
client charges; this issue is the Working Capital counterpart.
## Evidence (`main` @ `8da1086f`)
- `wc-loan-view.component.ts` offers **Add charge** and a per-row **Waive**
(`onWaiveCharge`).
- `api-surface.json` has `postWorkingCapitalLoansLoanIdChargesLoanChargeId`,
used for waive only. It has no
`getWorkingCapitalLoansLoanIdChargesLoanChargeId`.
- `wc-loan-action-form.component.ts` handles `discount` through
`putWorkingCapitalLoansLoanIdDiscount` only.
## Platform support
- `POST
/v1/working-capital-loans/{loanId}/charges/{chargeId}?command=adjustment`
(amount, date, note).
- `GET /v1/working-capital-loans/{loanId}/charges/{chargeId}` returns the
charge with its paid, waived and outstanding amounts.
- `POST /v1/working-capital-loans/{loanId}/transactions?command=discountFee`
posts the discount fee.
- `POST
/v1/working-capital-loans/{loanId}/transactions/{transactionId}?command=discountFeeAdjustment`
adjusts it.
## Proposed implementation
- Add a charge detail view (row click) and an **Adjust** row action with a
small form.
- Add **Discount fee** and **Adjust discount fee** actions, defaulted from
the transaction template. Keep the existing `PUT /discount` for changing the
agreed discount before disbursement.
## RBAC
| Action | Permission code | Typically granted to |
|---|---|---|
| View charge | `READ_WORKINGCAPITALLOAN` | all lending roles, auditors |
| Add charge | `CREATE_WORKINGCAPITALLOANCHARGE` | loan officer |
| Waive charge | `WAIVE_WORKINGCAPITALLOANCHARGE` (`_CHECKER` for
maker-checker) | branch manager |
| Adjust charge | `ADJUSTMENT_WORKINGCAPITALLOANCHARGE` (`_CHECKER`) |
branch manager / operations |
| Discount fee | `DISCOUNTFEE_WORKINGCAPITALLOAN` | credit officer |
| Discount fee adjustment | `DISCOUNTFEEADJUSTMENT_WORKINGCAPITALLOAN` |
operations supervisor |
| Update agreed discount | `UPDATEDISCOUNT_WORKINGCAPITALLOAN` | credit
officer |
The existing **Add charge** route is guarded with
`UPDATE_WORKINGCAPITALLOAN`, and **Waive** is not gated at all. Both should
move to the specific codes above.
### How Fineract evaluates these permissions
- A write passes with the exact code **or** `ALL_FUNCTIONS`. Reads pass with
`ALL_FUNCTIONS_READ`.
- Maker-checker queues the command for a `_CHECKER` holder.
- All codes are in `scripts/permission-codes.json`.
### UI expectations
- Use per-action route guards and `[appRequiresPermission]` on each button.
- Read-only roles see the charges but no enabled actions.
## Acceptance criteria
- [ ] A charge can be opened and adjusted, and its outstanding amount
updates.
- [ ] Discount-fee transactions can be posted and adjusted, and appear in
the transactions tab.
- [ ] Every charge action is gated on its own code, including the existing
Add and Waive.
- [ ] 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]