Originally created by: pyy3
Phase 6.1 (Cash Flow Statement, indirect method) shipped seeds/cash_flow_categories.csv as a static, hand-edited seed — the same class as allocation_rules.csv / ic_elimination_rules.csv. It maps each balance-sheet GL account → cash-flow category + sign:
| Column | Type | Meaning |
|---|---|---|
main_account |
String | GL account (matches gold_bs_movement.main_account) |
cf_category |
String | Operating / Investing / Financing |
cf_line_item |
String | Sub-line label (e.g. Change in Trade Receivables) |
is_cash |
UInt8 | 1 = the cash/cash-equivalent account (excluded from activity, defines reconciliation target) |
sign |
Int8 | +1 credit-natured (liabilities/equity/contra-assets), -1 debit-natured (assets/contra-equity) |
Consumed by gold_cash_flow_indirect and gold_consolidated_cash_flow.
Confirmed current state: there is no Main Account / Cash Flow Mapping doctype in konsol, and dbt_config.py does not generate this seed — it only regenerates dimension_mappings.csv (from published Dimension Mapping docs), the dbt_project.yml vars, and gold-model domains. So the seed is editable only by committing a CSV, not from the Frappe desk.
Onboarding a new GL account to the cash flow statement currently means a code change + PR. Every other account-level governance object (dimensions, account categories, scenarios, allocation rules) is — or is moving toward — desk-editable. Cash-flow mapping is the odd one out. The build will hard-fail (the relationships test on gold_bs_movement.main_account → cash_flow_categories) if any BS account is left uncategorized, so a finance user needs a non-developer path to add the mapping.
Mirror the existing dimension_mapping → regenerate_dimension_mappings_seed() pattern:
Cash Flow Category (module epm) with fields main_account, cf_category (Select: Operating/Investing/Financing), cf_line_item, is_cash (Check), sign (Select/Int -1/+1). Optionally a status (Draft/Published) like Dimension Mapping.regenerate_cash_flow_categories_seed() in konsol/dbt_config.py writing seeds/cash_flow_categories.csv from published docs.on_update) calling the regenerator + requesting a governed rebuild — copy epm/doctype/dimension_mapping/dimension_mapping.py.install.py hook to repopulate the seed after migrate (mirror _regenerate_dimension_mappings_seed()), seeded with the current 12-row demo default so behaviour is unchanged on a fresh deploy.docs/data-dictionary/seeds-reference.md (move cash_flow_categories.csv from "static" to "generated").=EPM() exposure of the cash flow lines.Cash Flow Category doctype exists; CRUD from desk regenerates seeds/cash_flow_categories.csv identically to the hand-authored file.bench migrate repopulates the seed with the 12-row demo default; existing Phase 6.1 dbt tests still pass unchanged.relationships test still catches an uncategorized BS account.Related: Phase 6.1 PRD docs/prd/PRD-CASH-FLOW-STATEMENT.md; pattern reference epm/doctype/dimension_mapping/.
Originally posted by: grynn-in
Resolved. The doctype-backed mapping is in place on
main:Cash Flow Categorydoctype exists (konsol/epm/doctype/cash_flow_category/) with a fixture + test.regenerate_cash_flow_categories_seed()(konsol/dbt_config.py:99) rewritesseeds/cash_flow_categories.csvfrom PublishedCash Flow Categorydocs, and is called from the doctype'spublish()/unpublish()/ validate (cash_flow_category.py:47/56/70) → governed rebuild.Cash-flow mapping is now desk-editable like the other governance objects — no code change/PR needed to onboard an account. Closing.
Related
Tickets:
#122Ticket changed by: grynn-in