Menu โ–พ โ–ด

#170 Consolidation report balance sheet: sparse quarter-end balances, no opening balance at acquisition, carry-forward after disposal

open
nobody
None
2026-09-17
2026-09-13
Anonymous
No

Originally created by: grynn-in

Follow-ups from the review of [#161] (PR [#167]). These predate that PR.

  1. The entity balance sheet is sparse. gold_balance_sheet only has a row where an account moved in that exact month (gold_balance_sheet.sql, around lines 18-22, a running balance built from gold_trial_balance rows). fetch_entity_bs then selects fiscal_period IN (3,6,9,12), so an account that moved only in P1 shows 0 at every quarter-end. On the live 2024 data, 35 of 70 (entity, account) pairs have no P12 row despite earlier activity. The report's NI plug and "BS residual" diagnostic inherit this.
  2. No opening or acquisition balance on the consolidated side. The consolidated balance sheet sums only the current year's movements from P1 (build_consolidation_report.py, around lines 396-410 and 466-478). It differs from the entity column for any entity with prior-year balances, and for an entity acquired mid-year, which has no balance at the acquisition date.
  3. Carry-forward after a disposal. After an entity leaves the group, the consolidated side keeps carrying its cumulative movements, while the entity column (since [#167]) shows 0.

Fix:

  • Take the latest balance at or before each quarter-end, or fill empty periods in gold_balance_sheet.
  • Bring in an opening or acquisition balance, via gold_acquisition_adjustments or an opening layer.
  • Stop the carry-forward after a disposal.

Related

Tickets: #161
Tickets: #167
Tickets: #169
Tickets: #179
Tickets: #180
Tickets: #185
Tickets: #210

Discussion

  • Anonymous

    Anonymous - 2026-09-13

    Originally posted by: grynn-in

    Items 2 and 3 now have warehouse-side issues: [#179] (acquisition opening balances) and [#180] (disposal derecognition). Both came out of the intercompany work in [#175].

     

    Related

    Tickets: #175
    Tickets: #179
    Tickets: #180

  • Anonymous

    Anonymous - 2026-09-15

    Originally posted by: grynn-in

    Verdict: LIVE as written. Same grouping as konsolidat#169 and [#185] โ€” three open issues against scripts/build_consolidation_report.py.

    Item 1 (the sparse balance sheet from gold_balance_sheet) is the one with reach beyond the script: it is a warehouse-model property, not a reporting one, so it would affect any other consumer of that model. Worth splitting from the script-specific items if the script is retired.

    ๐Ÿค– Triage against main โ€” Claude Code ยท https://claude.ai/code/session_01P3Pf9835FeLeXjRrYTTZ1M

     

    Related

    Tickets: #185

  • Anonymous

    Anonymous - 2026-09-17

    Originally posted by: grynn-in

    Blocked on the partial-period decision, now made: the treatment is declared per group (partial_period_treatment on the Consolidation Group root), not chosen by konsol. Decided by Deepak Pai, 18 September 2026 โ€” recorded on konsolidat#171. The opening-balance-at-acquisition and carry-forward-after-disposal behaviour here depends on which treatment a group elects.

     

Log in to post a comment.