Acquisition, goodwill amortisation and disposal journals from submitted...
Open-source Excel-native EPM and consolidation for SAP & Dynamics
Brought to you by:
konsolid-at
Originally created by: grynn-in
Closes [#198]. Pairs with konsol PR [#202] (Business Combination / Business Disposal doctypes, Consolidation Policy on the group root).
What changes
epm_staging.business_combinations (+ consideration / acquired_balances / costs), business_disposals (+ proceeds); 17 policy and account columns on epm_gold.consolidation_groups. DDL pinned by tests/test_deal_tables_ddl.py, identical to konsol's write-through DDL.gold_business_combination_journal (ACQ): one balanced journal per submitted deal in its acquisition period — eliminate acquired equity, fair-value adjustments, goodwill (partial or full NCI per policy), NCI, investment, bargain-purchase gain (Recognise) or refused (Refuse), acquisition costs (Expense / Capitalise), pre-acquisition history opening balance. Every account comes from the group's declared policy; nothing defaults.gold_goodwill_amortisation_journal (GWA): when the policy says Amortise, straight-line per Regular period from the acquisition period, stops the period before a disposal.gold_business_disposal_journal (DSP): derecognises the entity's balance sheet, goodwill net of amortisation, FVA, CTA recycling, NCI, proceeds, gain/loss balancing.gold_fully_consolidated_tb layer 6 reads the three journals; gold_acquisition_adjustments keeps only proration; gold_disposal_adjustments deleted; the PRD-12 disposal tests and assert_goodwill_calculated read the journals.assert_{acquisition,goodwill_amortisation,disposal}_journal_balances (every journal sums to zero), assert_bargain_purchase_refused, assert_acquisition_accounts_declared (error: a submitted deal whose group lacks a needed account/policy field), assert_acquisition_measured_in_period (warn). Fixtures under dbt_project/test_fixtures/ (ZZ codes), one must-flag fixture per guard.docs/developer-guide/design/business-combinations.md, data dictionary, fixtures README.Verified
assert_end_to_end_bs_balances PASS (190 of 194), one pre-existing warning (equity rate coverage, a data item). The acquisition layer is empty until deals are submitted in konsol.After merge: fast-forward the deploy checkout, approve a full build. On the site (konsol [#202]): fill the group root's Consolidation Policy and accounts, review and submit the migrated Draft deals.
🤖 Generated with Claude Code
Originally posted by: grynn-in
Review round 1: eight points, all accepted, as rows J9–J12 — J9 a missing rate stops the deal (inner joins +
assert_deal_rate_resolved; header consideration translated at its own currency); J10 guards (disposal accounts declared, acquired balances complete, disposal has balances, one root row, and the policy CTE aggregates the root); J11 layer 6 sums each journal to one row per account/period so YTD is right; J12 refuses partial-share deals by name until [#204] (layer 1 carries a full-method subsidiary at the parent's share).Related
Tickets: #204
Originally posted by: grynn-in
Round 1 fixes pushed (J9 d3b6055, J10 9092fba, J11 84216ad, J12 6420b15 + fixture rows): inner-joined rates with
assert_deal_rate_resolved; guards for disposal accounts, acquired balances, disposal balances, root uniqueness; policy CTE aggregates the root; layer 6 one row per account/period withassert_journal_grain_unique; partial-share deals refused by name until [#204].Related
Tickets: #204
Originally posted by: grynn-in
Review round 2 (on 498c87a): all eight round-1 points resolved; two new, accepted as row J13 — the rate guard must gate the header check on consideration lines only (a header-only deal with a cost line could drop silently), and layer 6's grain must match the YTD window's partition (no
journal_idin the group key; the grain test keyed the same way).Originally posted by: grynn-in
Round 2 fixed (J13 443ecb9, J13b d746308): the rate guard gates the header check on consideration/proceeds rows only — a header-only unrated deal is now named; layer 6 groups the journals on the YTD window's partition (no
journal_id), and the grain test is keyed the same way.Ticket changed by: grynn-in