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/09/06 09:02:07 UTC

[I] A progressive loan cannot be contract-terminated, so ending one early means using a closure command that means something else [fineract-backoffice-ui]

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

   ## What is missing
   
   Fineract accepts `contractTermination` and `undoContractTermination` on a loan. It is a distinct closure path for progressive, interest-recalculating loans — not the same thing as `close`, `writeoff` or `foreclosure`, all three of which this app already offers. Neither command appears anywhere in `src/app`.
   
   Confirmed against a running `apache/fineract`, using the #268 discriminator:
   
   | Probe | Result |
   |---|---|
   | `POST /loans/{id}?command=totallyNotACommand` | `error.msg.query.parameter.value.unsupported` — **unrecognised** (control) |
   | `POST /loans/{id}?command=contractTermination` | `error.msg.loan.contract.termination.is.only.supported.for.progressive.loan.schedule.type` — **recognised** |
   | `POST /loans/{id}?command=undoContractTermination` | `error.msg.loan.is.not.contract.terminated` — **recognised** |
   
   The platform's own error messages give the two conditions the UI needs: termination applies **only to progressive-schedule loans**, and the undo applies only to a loan already terminated. So both should be offered conditionally rather than unconditionally, the way #268 handled undo-last-disbursal.
   
   ## What the UI offers today
   
   The Actions menu on a real **progressive** Active loan — 17 entries, none of them contract termination:
   
   ![The Actions menu on a progressive Active loan](https://raw.githubusercontent.com/Aman-Mittal/fineract-backoffice-ui/assets/issue-screenshots/loan-actions-progressive.png)
   
   > Add Loan Charge · Add Collateral · Assign Loan Officer · Undo Disbursal · Waive Interest · Prepay Loan · Foreclosure · Close · Close as Rescheduled · Write Off · Charge Off · Merchant Issued Refund · Payout Refund · Goodwill Credit · Waive Interest Payment · Re-age Loan · Re-amortise Loan
   
   For contrast, a cumulative loan gets the first 14 — the three progressive-only entries are correctly withheld, which is the existing pattern this work should follow:
   
   ![The same menu on a cumulative Active loan](https://raw.githubusercontent.com/Aman-Mittal/fineract-backoffice-ui/assets/issue-screenshots/loan-actions-cumulative.png)
   
   ## Suggested scope
   
   Two entries on the loan Actions menu, both gated on the loan's schedule type being progressive, and the undo additionally gated on the loan already being contract-terminated. The generated client already has the call shape — `loansService.postLoansLoanId(loanId, request, 'contractTermination')` — which is the same shape `close` and `writeoff` already use, so this is a new form, not a new pattern.
   
   Request body follows `PostLoansLoanIdRequest`: a date plus `dateFormat`/`locale`, and an optional note.
   
   ## Why it is worth doing
   
   Without it, an institution ending a progressive contract early has to reach for `close` or `foreclosure` instead. Those are different events with different accounting consequences, so the loan's history ends up recording something that did not happen — and the distinction is exactly why the platform models termination separately.
   
   ## Environment
   
   `main` at `7c51d90b`. Probes against `apache/fineract` running locally via `deploy/docker-compose-e2e.yml`; screenshots from loans seeded with the repository's own `e2e/utils/seed-api.ts` helpers.
   


-- 
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] A progressive loan cannot be contract-terminated, so ending one early means using a closure command that means something else [fineract-backoffice-ui]

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

   Implemented, and closing on that basis.
   
   `src/app/features/loans/loan-view.component.ts` offers Contract Termination and its undo from the loan's Actions menu, gated on `CONTRACT_TERMINATION_LOAN` and `CONTRACT_TERMINATION_UNDO_LOAN`. The payload is built in `src/app/features/loans/loan-contract-termination.ts`, and both commands are mapped in `src/app/core/guards/command-permissions.ts`.
   
   So ending a progressive loan early no longer means reaching for a closure command that means something else.
   
   Covered by `loan-contract-termination-command.test.ts` and `e2e/contract-termination.spec.ts`.
   
   Commit `d2e6dfc5` "feat(loans): support contract termination" (#633).
   


-- 
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] A progressive loan cannot be contract-terminated, so ending one early means using a closure command that means something else [fineract-backoffice-ui]

Posted by "Aman-Mittal (via GitHub) via issues" <is...@fineract.apache.org>.
Aman-Mittal closed issue #504: A progressive loan cannot be contract-terminated, so ending one early means using a closure command that means something else
URL: https://github.com/apache/fineract-backoffice-ui/issues/504


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