Aman-Mittal opened a new issue, #780:
URL: https://github.com/apache/fineract-backoffice-ui/issues/780
## Summary
The loan product form can't set four groups of product terms that Fineract
supports. Products that need them can't be configured from this UI, and editing
such a product here risks institutions believing the terms are absent.
1. **Guarantee requirements:** `holdGuaranteeFunds`, `mandatoryGuarantee`,
`minimumGuaranteeFromOwnFunds`, `minimumGuaranteeFromGuarantor`.
2. **Floating interest rate linkage:** `isLinkedToFloatingInterestRates`,
`floatingRatesId`, `interestRateDifferential`, `minDifferentialLendingRate` /
`defaultDifferentialLendingRate` / `maxDifferentialLendingRate`,
`isFloatingInterestRateCalculationAllowed`.
3. **Variable installments:** `allowVariableInstallments`, `minimumGap`,
`maximumGap`.
4. **Grace settings:** `graceOnPrincipalPayment`, `graceOnInterestPayment`,
`graceOnInterestCharged`, `graceOnArrearsAgeing`. Also the related
`principalThresholdForLastInstallment` where not already exposed.
## Evidence (`main` @ `8da1086f`)
- `src/app/features/products/loan-product-form.component.ts` has 0 matches
for `grace`, `Guarantee`, `isLinkedToFloating` and `VariableInstallments`
(case-insensitive). Multi-disbursal (`multiDisburseLoan`, `maxTrancheCount`) is
present.
- Floating rates themselves can be managed (`features/.../floating-rates`),
but a product can't be linked to one.
- The loan *application* form exposes some per-loan grace overrides, but the
product defaults they override can't be set.
## Platform support
`POST` / `PUT /v1/loanproducts[/{id}]` accept all of the fields above. `GET
/v1/loanproducts/template` returns the floating-rate options.
## Proposed implementation
- Add four collapsible sections: **Guarantees**, **Floating rate**,
**Variable installments** and **Grace**.
- Show dependent fields only when their toggle is on.
- Validate min ≤ default ≤ max.
- When floating-rate linkage is on, clear and disable the fixed nominal-rate
inputs, since Fineract rejects both being set.
- Show the values on the product view, and prefill them on edit.
## RBAC
| Action | Permission code | Typically granted to |
|---|---|---|
| View product | `READ_LOANPRODUCT` | lending roles, auditors |
| Create product | `CREATE_LOANPRODUCT` | product manager |
| Edit product terms | `UPDATE_LOANPRODUCT` | product manager (often under
maker-checker) |
| Pick a floating rate | listing rates needs `READ_FLOATINGRATE` | product
manager |
- If a user lacks `READ_FLOATINGRATE`, the floating-rate section must
explain why the list is empty, rather than showing an empty select.
- Writes pass with the exact code **or** `ALL_FUNCTIONS`. With maker-checker
on, the change is queued for `UPDATE_LOANPRODUCT_CHECKER`.
- The existing product routes are already guarded on `CREATE_` /
`UPDATE_LOANPRODUCT`, and the new sections inherit that.
## Acceptance criteria
- [ ] A product can be created and edited with each of the four groups, and
the values round-trip through the product view and edit.
- [ ] Floating-rate linkage and fixed-rate fields are mutually exclusive,
with validation.
- [ ] The missing-`READ_FLOATINGRATE` case is handled.
- [ ] Unit tests cover the payload for each section and the validation rules.
--
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]