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 08:01:38 UTC

[I] Term deposits: set maturity instructions and linked savings, close with transfer or reinvest, and add charges [fineract-backoffice-ui]

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

   ## Summary
   
   Fixed and recurring deposit accounts can be opened, approved, activated and closed. Closing has two restrictions:
   
   - It can only *withdraw* the proceeds.
   - Nothing captures what should happen at maturity.
   
   So an institution can't offer the usual term-deposit options: auto-renew, transfer to the customer's savings account, or pay interest to savings. It also can't add a charge to a deposit account.
   
   This continues the term-deposit servicing epic #295, where close / premature close (#297) and transactions (#298) are done. #764 covers the view not *showing* maturity data.
   
   ## Evidence (`main` @ `8da1086f`)
   
   - `src/app/features/products/fixed-deposits/fixed-deposit-form.component.ts` has 0 references to `maturityInstruction`, `linkAccount`, `transferInterest` or `charges`.
   - `src/app/features/products/deposit-closure-dialog.component.ts` loads `onAccountClosureOptions` from the close template, then keeps only **Withdraw Deposit (100)** (`loadOptions`, ~line 160). Transfer to savings (200) and the reinvest options (300 / 400) are deliberately filtered out because the dialog can't collect their extra fields.
   - No deposit screen calls `postSavingsaccountsSavingsAccountIdCharges`.
   
   ## Platform support
   
   - **Account create / update:**
     - `POST` / `PUT /v1/fixeddepositaccounts[/{id}]` and `/v1/recurringdepositaccounts` accept `maturityInstructionId`, `linkAccountId` (the customer's savings account) and `transferInterestToSavings`.
     - The account template returns `maturityInstructionOptions` and the client's eligible savings accounts.
   - **Close / premature close:** `onAccountClosureId` is one of `DepositAccountOnClosureType`:
     - `TRANSFER_TO_SAVINGS` (200) needs `toSavingsAccountId` and a transfer description.
     - `REINVEST_PRINCIPAL_AND_INTEREST` (300) and `REINVEST_PRINCIPAL_ONLY` (400) renew the deposit.
   - **Charges:** `POST /v1/savingsaccounts/{accountId}/charges`. Deposit accounts are savings-type accounts, and the template lists the charges valid for them.
   
   ## Proposed implementation
   
   1. **Account form:** add **Maturity instruction**, **Linked savings account** (filtered to the client's active savings) and **Transfer interest to savings**. Show them on the account view.
   2. **Closure dialog:** offer every option the template returns. For *Transfer to savings*, collect `toSavingsAccountId`, defaulting to the linked account. For *Reinvest*, show the resulting new deposit term before confirming.
   3. **Charges:** add a Charges tab on deposit accounts with **Add charge**. Pay and waive follow the outcome of #754.
   
   ## RBAC
   
   | Action | Permission code | Typically granted to |
   |---|---|---|
   | View deposit | `READ_FIXEDDEPOSITACCOUNT` / `READ_RECURRINGDEPOSITACCOUNT` | deposit officers, auditors |
   | Set maturity instruction / linked account (create) | `CREATE_FIXEDDEPOSITACCOUNT` / `CREATE_RECURRINGDEPOSITACCOUNT` | deposit officer |
   | Change them later | `UPDATE_FIXEDDEPOSITACCOUNT` / `UPDATE_RECURRINGDEPOSITACCOUNT` | deposit officer / branch manager |
   | Close at maturity | `CLOSE_FIXEDDEPOSITACCOUNT` / `CLOSE_RECURRINGDEPOSITACCOUNT` | branch manager / teller |
   | Premature close | `PREMATURECLOSE_FIXEDDEPOSITACCOUNT` / `PREMATURECLOSE_RECURRINGDEPOSITACCOUNT` | branch manager |
   | Add charge | `CREATE_SAVINGSACCOUNTCHARGE` | deposit officer |
   | Pick a linked savings account | `READ_SAVINGSACCOUNT` | — |
   
   All codes are in `scripts/permission-codes.json`.
   
   - Writes pass with the exact code **or** `ALL_FUNCTIONS`. With maker-checker on, closure commands are queued for `<CODE>_CHECKER`.
   - A transfer-to-savings closure moves money into another account, so the dialog must explain a missing `READ_SAVINGSACCOUNT` instead of showing an empty account list.
   
   ### UI expectations
   
   - Gate each new control with `[appRequiresPermission]`.
   - Gate Premature close and Close separately, since they use different codes.
   - A read-only user sees maturity details but no enabled controls.
   
   ## Acceptance criteria
   
   - [ ] An FD/RD account can be opened with a maturity instruction and a linked savings account, and both are shown on the view.
   - [ ] Close and premature close can transfer to savings or reinvest, and the resulting transfer or new deposit is visible.
   - [ ] A charge can be added to a deposit account.
   - [ ] Every action is gated on its own code.
   - [ ] Unit tests cover the payloads per closure type 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] Term deposits: set maturity instructions and linked savings, close with transfer or reinvest, and add charges [fineract-backoffice-ui]

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

   ## Business process flow
   
   ```mermaid
   flowchart TD
       A["Deposit officer opens FD or RD account<br/>CREATE_FIXEDDEPOSITACCOUNT"] --> B["Choose maturity instruction"]
       B --> B1["Optional linked savings account<br/>needs READ_SAVINGSACCOUNT"]
       B1 --> C["Approve and activate"]
       C --> D{"How does it end?"}
       D -- "At maturity" --> E{"CLOSE_FIXEDDEPOSITACCOUNT?"}
       D -- "Early" --> F{"PREMATURECLOSE_FIXEDDEPOSITACCOUNT?"}
       E & F -- Yes --> G{"On closure"}
       G -- "Withdraw (100)" --> G1["Pay out (exists today)"]
       G -- "Transfer to savings (200)" --> G2["Pick toSavingsAccountId, default linked account"]
       G -- "Reinvest principal and interest (300)" --> G3["New deposit term preview"]
       G -- "Reinvest principal only (400)" --> G4["Interest paid out, principal renewed"]
       E & F -- No --> N["Action hidden"]
       H["Add charge to deposit<br/>CREATE_SAVINGSACCOUNTCHARGE"] --> H1["POST /savingsaccounts/:id/charges"]
   ```
   
   Recurring deposits follow the same flow with the `*_RECURRINGDEPOSITACCOUNT` codes.
   
   ## UI mockup
   
   ```text
   ┌ New fixed deposit · Maturity ────────────────────────────────────────────┐
   │ Maturity instruction *    [ Transfer to linked savings ▾ ]               │
   │ Linked savings account    [ SA-00042 · Jane Doe · Active ▾ ]             │
   │ [✓] Transfer interest to linked savings                                  │
   └──────────────────────────────────────────────────────────────────────────┘
   
   ┌ Close fixed deposit FD-00007 ────────────────────────────────────────────┐
   │ Maturity amount        10,612.50   (as of 2026-10-16)                    │
   │ On closure *           ( ) Withdraw deposit                              │
   │                        (•) Transfer to savings → [ SA-00042 ▾ ]          │
   │                        ( ) Reinvest principal and interest               │
   │                        ( ) Reinvest principal only                       │
   │ Note                   [                                    ]            │
   │                                      [Cancel]   [Close deposit]          │
   └──────────────────────────────────────────────────────────────────────────┘
   ```
   


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