You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Aman-Mittal (via GitHub)" <gi...@apache.org> on 2026/10/16 07:57:38 UTC

[I] Working Capital loan charges: add charge adjustment, a charge detail view, and discount-fee transactions [fineract-backoffice-ui]

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: issues-unsubscribe@fineract.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Working Capital loan charges: add charge adjustment, a charge detail view, and discount-fee transactions [fineract-backoffice-ui]

Posted by "Aman-Mittal (via GitHub)" <gi...@apache.org>.
Aman-Mittal commented on issue #774:
URL: https://github.com/apache/fineract-backoffice-ui/issues/774#issuecomment-6211175515

   ## Business process flow
   
   ```mermaid
   flowchart TD
       A["Charges tab<br/>READ_WORKINGCAPITALLOAN"] --> B{"Action"}
       B -- "Add charge" --> C1{"CREATE_WORKINGCAPITALLOANCHARGE?"}
       B -- "Waive" --> C2{"WAIVE_WORKINGCAPITALLOANCHARGE?"}
       B -- "Adjust" --> C3{"ADJUSTMENT_WORKINGCAPITALLOANCHARGE?"}
       B -- "Open row" --> V["GET …/charges/:chargeId<br/>paid, waived, outstanding"]
       C1 -- Yes --> P1["POST …/charges"]
       C2 -- Yes --> P2["POST …/charges/:chargeId?command=waive"]
       C3 -- Yes --> P3["POST …/charges/:chargeId?command=adjustment"]
       C1 & C2 & C3 -- No --> N["Hidden or disabled"]
       D["Discount fee"] --> D0{"Loan state"}
       D0 -- "Before disbursal" --> D1{"UPDATEDISCOUNT_WORKINGCAPITALLOAN?"} --> D2["PUT …/discount"]
       D0 -- "After disbursal" --> D3{"DISCOUNTFEE_WORKINGCAPITALLOAN?"} --> D4["POST …/transactions?command=discountFee"]
       D4 --> D5{"Correction needed?"} -- Yes --> D6{"DISCOUNTFEEADJUSTMENT_WORKINGCAPITALLOAN?"} --> D7["POST …/transactions/:txnId?command=discountFeeAdjustment"]
   ```
   
   ## UI mockup
   
   ```text
   ┌ Charges ─────────────────────────────────────────────── [+ Add charge] ──┐
   │ Charge            Due         Amount   Paid    Waived  Outstanding       │
   │ Origination fee   2026-09-20  500.00   500.00  0.00    0.00      [⋮]     │
   │ Late fee          2026-10-10   50.00     0.00  0.00   50.00      [⋮]     │
   │                                                        ├ View detail     │
   │                                                        ├ Waive           │ ← WAIVE_…CHARGE
   │                                                        └ Adjust          │ ← ADJUSTMENT_…CHARGE
   └──────────────────────────────────────────────────────────────────────────┘
   
   ┌ Adjust charge · Late fee ────────────────────────────────────────────────┐
   │ Current outstanding   50.00                                              │
   │ Adjustment amount *   [ 20.00 ]                                          │
   │ Transaction date *    [ 2026-10-16 📅 ]                                  │
   │ Note *                [ Fee reduced per policy 7.3      ]                │
   │                                          [Cancel]  [Post adjustment]     │
   └──────────────────────────────────────────────────────────────────────────┘
   ```
   


-- 
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: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Working Capital loan charges: add charge adjustment, a charge detail view, and discount-fee transactions [fineract-backoffice-ui]

Posted by "Aman-Mittal (via GitHub)" <gi...@apache.org>.
Aman-Mittal closed issue #774: Working Capital loan charges: add charge adjustment, a charge detail view, and discount-fee transactions
URL: https://github.com/apache/fineract-backoffice-ui/issues/774


-- 
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: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org