Aman-Mittal opened a new issue, #290:
URL: https://github.com/apache/fineract-backoffice-ui/issues/290

   Part of #288. Depends on #289 — wait for it to merge.
   
   ## Business value
   
   A loan product with an accounting rule but no account mappings still posts 
nothing. This is the sub-task that makes lending actually reach the general 
ledger: a disbursement debits the portfolio and credits the fund source, a 
repayment does the reverse, interest reaches an income account, and a write-off 
reaches a loss account.
   
   Without it an institution cannot produce a trial balance that includes its 
loan book — which is to say, cannot produce a trial balance.
   
   ## What to build
   
   Using the components from #289, the mapping fields a loan product needs.
   
   **Cash accounting** requires the core set: fund source, loan portfolio, 
transfers in suspense, interest on loans, income from fees, income from 
penalties, losses written off, and overpayment liability.
   
   **Accrual accounting** (periodic and upfront) requires all of the above plus 
the receivable accounts — interest receivable, fees receivable, penalties 
receivable.
   
   Do not take that list from this issue as gospel. **Read it off the product 
template response**, which tells you which slots the platform expects, and 
confirm against a live instance before finalising the form. `npm run e2e:stack` 
brings one up.
   
   Group the fields under headings that match the account type, so a user 
filling this in can follow it — an ungrouped wall of fifteen dropdowns is not 
usable, and this screen is already long.
   
   ## Two things to get right
   
   1. **Required-ness follows the rule.** Once a rule other than `NONE` is 
chosen, the platform rejects a product missing a mandatory mapping. Mark them 
required in the form so the user finds out before submitting, and let the 
platform's message handle anything you did not anticipate — do not reimplement 
its validation.
   2. **Editing must round-trip.** Open a configured product, change one 
unrelated field, save, and every mapping must still be there. Test this 
explicitly; it is the failure mode most likely to ship unnoticed.
   
   ## Testing
   
   - **Unit spec:** submitted body carries the right mapping keys for cash, and 
the extra receivable keys for accrual.
   - **Unit spec:** loading a configured product populates every mapping.
   - **Backend e2e** (add the file to `BACKEND_SPECS` in 
`playwright.config.ts`): create a loan product with cash accounting through the 
UI, disburse a loan against it, then open the journal entries screen and assert 
a balanced entry exists. **This is the test that proves the epic works** — 
everything before it only proves the form renders.
   
   Drive it entirely through the UI. No API seeding.
   
   ## Scope
   
   In scope: loan product mappings, cash and both accrual rules, create and 
edit.
   
   Out of scope: advanced mappings (payment channel to fund source, fee to 
specific income account, penalty to specific income account) — sub-task #294. 
Other product families.
   
   ## Getting started
   
   - `src/app/features/products/loan-product-form.component.ts`
   - Shared components from #289
   - `npm test`, `npm run lint:prune`, `npm run i18n:check`, `npm run build`
   


-- 
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]

Reply via email to