M5 — Completeness layer
The tax + valuation + ops + revenue-accuracy layer. Turns the ledger from a bookkeeping spine into an India-product-ready system.
The 13 use cases shipped
| ID | Feature |
|---|---|
| A1 | Capital-gains lots (FIFO STCG/LTCG) |
| A2 | Actual TCS captured from the GlomoPay quote |
| A3 | Per-event dividends + NRA WHT (via the Daily Ledger CSV) |
| A4 | Schedule FA foreign-asset statement |
| B1 | NAV / mark-to-market |
| B2 | Share-count (custody) reconciliation |
| C1 | Remittance exception dashboard |
| C2 | Refund / cancellation reversal |
| C3 | LRS purpose-code report |
| C4 | Settlement-lag + UTR audit |
| D1 | Realized vs assumed FX margin |
| D2 | Broker-fee reconciliation (with Daily Ledger actuals) |
| E1 | GlomoPay webhook receiver (HMAC-verified) |
Each has a dedicated page in the India book section.
Design principles kept throughout
- Omnibus custody ⇒ tax reports are SUB-LEDGERS, not new GL accounts. Capital gains, dividends, and Schedule FA all report on top of the balanced ledger without touching the trial balance.
- Read-side first; GL true-ups deferred. Same call M4 made for the 1500 GL — read-side recon shipped instead of the ingest-time variant.
- Every new check degrades to
okon the UAE DB. - No upstream-blocker scope creep. Items the docs flag as blocked stay best-effort (A3 went from blocked → unblocked during M5 via the Daily Ledger CSV).
What M5 tends to surface on real data
- D2 flags fractional trades because the flat-bps cost assumption doesn't survive small tickets.
- B2 finds occasional real custody drift (missed sells, corp actions).
- C4 surfaces credited remittances with missing UTRs and uncoded purpose codes.
- B1 shows a small tail of customers failing live valuation (entitlement issues).
- D1 shows the realised FX margin the assumed accrual doesn't capture.
Frontend pages added
/nav— NAV / MTM/capital-gains/dividends/schedule-fa/fx-margin/ops-audit— Settlement + Broker fees + Refund reversal (bundled)
Plus a share-count recon panel on /reconciliation.
Cross-team / genuine open items
- The api-global public-facing webhook receiver (their team).
- The ViewTrade historical-orders endpoint (their team).
- GlomoPay
total_taxsemantics +purpose_codepopulation (spike with them). - Daily NAV snapshot writer (small internal follow-up).
- India prod deploy + CI (ops task).
- Interest events (upstream doesn't expose them).