Originally created by: grynn-in
The retained-earnings account declares its translation method, and the default is closing. Option 3 of a framework comparison: the product does not decide the policy, the customer does, and the default is visible rather than implicit.
That makes this gap load-bearing. Customers will now declare fx_method = historical on an account and be expected to supply Historical Equity Rates for it. If they do not, the balance falls back to the closing rate, which is a reasonable fallback — but today nobody is told which account, or for which period.
assert_equity_rate_coverage warns per entity node: an entity in consolidation_groups with no historical_equity_rates row at all. It does not answer the question a customer now has:
which account declares the historical rate, in which period, with no rate covering it?
The rate join is ASOF-dated on the period (gold_consolidated_trial_balance), so a rate can exist for an account and still not cover an earlier period — the tranche starts later. That case is invisible today: the balance silently translates at closing.
One row per (entity, account, period) where the chart declares uses_historical_rate = 1 and the ASOF lookup yields no rate for that period. Name the account, the period, and what happened instead.
Severity stays warn, matching the existing coverage test: a declared account with no rate has a defined fallback, and it is master data rather than a broken ledger. It must name the gap precisely enough to act on, which the entity-level warning does not.
The equity accounts on the loaded chart declare historical and no historical rate exists anywhere, so every one of them already falls back to closing. Under the old policy that was uniform and harmless. Under a declared policy it is a per-account question that the warehouse should answer out loud.
Related: grynn-in/konsol#239 (only equity may declare historical), grynn-in/konsolidat#92 finding 3 (the rate's keys are free text, so a typo misses the join the same silent way).
Ticket changed by: grynn-in