Originally created by: pyy3
Phase 6.1 cash flow statement (indirect method), entity + consolidated, rebuilt on the signed trial balance.
gold_cash_flow_indirectSources gold_trial_balance using the natural double-entry movement period_debit − period_credit (previously used gold_bs_movement.period_movement × seed.sign, but period_movement is a positive magnitude — see [#64]). cash_flow_amount = −signed_movement for every non-cash account; P&L accounts collapse into one Operating Net Income line (net income lives in the P&L accounts, not the retained-earnings movement, in these books). Ties to the cash account's signed movement by the identity Σ(debit−credit)=0.
gold_consolidated_cash_flowBuilt off the signed gold_fully_consolidated_tb as cash_flow_amount = −amount over every non-cash account; P&L collapsed into "Net Income (Consolidated)", everything else (goodwill/CTA/IC/reclass) into a catch-all so nothing is dropped.
assert_cf_categories_equal_net_change — entity cash tie. PASS, non-vacuous: 651 rows, 7 entities, periods 1–12.assert_consolidated_cf_reconciles — group cash tie, gated on the consolidated TB balancing. 26 balanced group-periods asserted; the AMG group (12) is gated out because its consolidated TB does not balance upstream (FX/CTA bug, #66) — it re-enters automatically once that is fixed, no loss of test strength. The model itself is proven correct (residual = TB imbalance exactly).dev CH.cash_flow_categories.csv: account 3100 relabeled Operating "Net Income" → Financing "Retained Earnings Movement" (net income now comes from the P&L collapse). seed.sign documented as legacy — both models derive sign from signed movements.
period_net_amount sums magnitudes (worked around here via signed debit−credit).🤖 Generated with Claude Code
Ticket changed by: grynn-in