### Summary
Adds Cash Flow drill-down support to the Group Memo view and replaces several BS-delta-derived CF line items with values sourced directly from the authoritative reporting systems Finance uses today. Introduces a CF-specific account classifier ([classify_account_for_cf](vscode-webview://15qdonnjjcq9q3pcmufmg5fa0asnqc6qnceup60m8cm6igoedkcj/klair-api/services/cash_flow_service.py)) so accounts can map to a CF line item that differs from their Balance Sheet classification, plus a new gl_detail drill-down panel (with grouped, expandable rows) for Other LTA, Loans, and Interest paid. End-of-period cash is now emitted as a first-class record sourced from the BS Cash & cash equivalents balance, so all three cash-position rows reconcile to the BS exactly.
### Business Value
Finance can now click into Group Memo Cash Flow cells and trace each headline number back to the underlying NetSuite accounts, BTIG transactions, EBITDA categories, and loan-amortization wires — closing a long-standing audit gap. Re-sourcing Other LTA, Mgmt Restructuring + Import, Loans Payments, and Interest Paid from the systems Finance treats as canonical means the table values now match the Book Value Report, EBITDA Reconciliation, and supporting NetSuite detail without manual reconciliation.
### Changes
- CF service ([services/cash_flow_service.py](vscode-webview://15qdonnjjcq9q3pcmufmg5fa0asnqc6qnceup60m8cm6igoedkcj/klair-api/services/cash_flow_service.py))
- New CF-specific classifier classify_account_for_cf with three override tiers (qualified prefix, exact account number, startswith pattern) plus BS fallthrough; supports CF_SKIP_ACCOUNTS, CF_EXPECTED_ACCOUNTS, and CF_CROSS_REFERENCE.
- Other long term assets sourced from Book Value GL detail (QTD-scoped).
- Management restructuring and import sourced from EBITDA Reconciliation (business_unit IN ('Import','Management Restructuring')).
- Payments of and proceeds from loans = BS-delta on 31350/32801 + BTIG distributions; drill-down splits the BS-delta into Amortization Source vs. residual.
- Interest paid = -(income_statement 71100 − MFD Amortization Destination accruals) for the QTD month-ends.
- Cash and cash equivalents, end of period emitted as a new record; transform layer derives Change as End − Start.
- Five operating working-capital line items (AR, Prepaid, AP, Deferred revenue, OCL) plus Capital contribution and Purchase business combinations marked non-derivable pending Finance source-account confirmation.
- Book Value service ([services/book_value_service.py](vscode-webview://15qdonnjjcq9q3pcmufmg5fa0asnqc6qnceup60m8cm6igoedkcj/klair-api/services/book_value_service.py)) — new helpers period_to_qtd_accounting_periods, fetch_other_lta_components_for_periods, fetch_btig_distributions_for_periods for QTD-scoped reuse from CF.
- Router ([finance_monthly_financial_reporting_router.py](vscode-webview://15qdonnjjcq9q3pcmufmg5fa0asnqc6qnceup60m8cm6igoedkcj/klair-api/routers/finance_monthly_financial_reporting_router.py)) — new CashFlowGlDetailRow model with required group field; CFLineItemDetailResponse.detail_type extended with gl_detail and optional source_label / source_table metadata.
- Frontend
- [GroupMemoView.tsx](vscode-webview://15qdonnjjcq9q3pcmufmg5fa0asnqc6qnceup60m8cm6igoedkcj/klair-client/src/features/monthly-financial-reporting/components/GroupMemoView.tsx) wires useCashFlowDetailPanel into the cell-click registry under key cash-flows.
- [CashFlowDetailPanel.tsx](vscode-webview://15qdonnjjcq9q3pcmufmg5fa0asnqc6qnceup60m8cm6igoedkcj/klair-client/src/features/monthly-financial-reporting/components/detail-panels/CashFlowDetailPanel.tsx) adds a new GlDetailPanel (collapsible group accordion) and makes the BS-delta table responsive (3 cols normal / 5 cols expanded); handles nullable amounts.
- [transformFinancialStatements.ts](vscode-webview://15qdonnjjcq9q3pcmufmg5fa0asnqc6qnceup60m8cm6igoedkcj/klair-client/src/features/monthly-financial-reporting/utils/transformFinancialStatements.ts) reads end-of-period cash directly from the new backend record; falls back to section-sum + FX only when absent.
- [monthlyFinancialApi.ts](vscode-webview://15qdonnjjcq9q3pcmufmg5fa0asnqc6qnceup60m8cm6igoedkcj/klair-client/src/features/monthly-financial-reporting/services/monthlyFinancialApi.ts) adds CashFlowGlDetailRow and the gl_detail discriminator.
- Tests — new TestFetchBtigDistributionsForPeriods in [test_book_value_service.py](vscode-webview://15qdonnjjcq9q3pcmufmg5fa0asnqc6qnceup60m8cm6igoedkcj/klair-api/tests/test_book_value_service.py); [test_cash_flow_service.py](vscode-webview://15qdonnjjcq9q3pcmufmg5fa0asnqc6qnceup60m8cm6igoedkcj/klair-api/tests/test_cash_flow_service.py) extended with _patch_cf_dependencies fixture, new TestClassifyAccountForCf, drill-down coverage for Loans/Interest, and updated assertions for the non-derivable items.
### Testing
- [ ] cd klair-api && pytest tests/test_cash_flow_service.py tests/test_book_value_service.py
- [ ] cd klair-api && uv run ruff format <changed files> && uv run ruff check <changed files>
- [ ] cd klair-api && uv run pyright services/cash_flow_service.py services/book_value_service.py
- [ ] cd klair-client && pnpm tsc --noEmit && pnpm lint:pr && pnpm test
- [ ] Manual: open Group Memo for the latest period, confirm Cash Flow cells are clickable; spot-check Other LTA, Mgmt Restructuring + Import, Loans, and Interest paid drill-downs reconcile (sum of rows = headline)
- [ ] Manual: confirm Cash and cash equivalents, end of period row matches BS Cash & cash equivalents at the same date and that Change in cash and cash equivalents = End − Start
- [ ] Manual: verify the five non-derivable working-capital rows render with - values and remain populatable via the CSV upload override layer
http://localhost:3001/monthly-financial-reporting
<img width="1880" height="813" alt="image" src="https://github.com/user-attachments/assets/18fd3f85-a80b-4fcd-b35d-769365effd95" />