SCENARIOS / ERP GENERAL LEDGER
Finance

ERP General Ledger

A multi-subsidiary, multi-currency general ledger, generated by simulating ERP postings.

Async Tick FSM
ENTITIES USD GBP EUR JPY CAD DRAFT APPR POST GENERAL LEDGER DR CR debits = credits
SCHEMATICFinance
Clock tick · 1 day/turn
Update Asynchronous
Subsidiaries 6 across 5 currencies
Accounts 14
Posting balanced double-entry
OVERVIEW

A general ledger generated by simulating the postings of an ERP suite. Each legal entity books transactions across Order-to-Cash, Procure-to-Pay and period-end journals; a transaction is approved, then posts one debit and one credit line whose amount is broadcast from the document so the two legs always offset. The journal lines carry their account role, currency, subsidiary and cost centre, so a reporting layer can fold them into a trial balance, income statement, balance sheet, and a currency consolidation.

Financial reporting needs a clean, balanced, dimensioned stream of journal lines — and an ERP is the system that produces it. This models that source: double entry that balances at the point of posting, multiple legal entities in multiple currencies, and a chart of accounts split across the balance sheet and income statement. Run it longer or add subsidiaries and the same ledger structure holds at any scale, so it is a faithful generator for testing reporting, consolidation and close workflows.

TRAITS
Async
Independent, event-driven timelines
Tick
Discrete fixed-step time
FSM
Entities are finite-state machines
SCHEMA

Linked tables with guaranteed referential integrity.

TABLECOLUMNSDESCRIPTION
subsidiary ID, name, country, currency, fx_rate_to_base, parent_id, txns_booked One row per legal entity: its reporting currency, the rate to the group base currency, and the parent link up the consolidation tree.
account ID, account_no, account_name, account_class, statement, account_role The chart of accounts: each account classified Asset/Liability/Equity/Revenue/Expense and mapped to the balance sheet or income statement.
department ID, name, cost_center, region The cost-centre dimension used to segment the income statement.
transaction ID, txn_type, currency, amount, subsidiary_id, department_id, created_at, posted_at, current_state One row per journal entry header: its type, amount and currency, the booking entity and cost centre, and where it reached in the Draft→Approved→Posted→Booked lifecycle.
journaldebit ID, txn_type, currency, debit_role, amount, transaction_id, subsidiary_id, department_id, posted_at The debit leg of each posting: the account role it hits, its amount and currency, and references to the transaction, entity and department.
journalcredit ID, txn_type, currency, credit_role, amount, transaction_id, subsidiary_id, department_id, posted_at The offsetting credit leg. UNION debit and credit to get the canonical journal_lines fact table.
LIVE API

Generated REST endpoints. Also exposed as MCP tools.

POST /scenarios/erp-general-ledger/experiments Seed a new ledger across the six entities
POST /scenarios/erp-general-ledger/experiments/{eid}/run Advance N turns, or request an event
GET /scenarios/erp-general-ledger/experiments/{eid}/entities/journaldebit Query GL lines by account role, currency or entity
GET /scenarios/erp-general-ledger/experiments/{eid}/events Append-only event log
GET /scenarios/erp-general-ledger/experiments/{eid}/dataset Download the exported ledger
SEMANTIC LAYER

OSI-compatible definition, emitted with the dataset.

# erp-general-ledger.osi.yaml — emitted automatically
semantic_model:
  name: "erp-general-ledger"
  source: "duckdb://erp-general-ledger.db"
  entities:
    - name: subsidiary
      primary_key: id
  dimensions:
    - name: state
      type: categorical
    - name: t
      type: time
  measures:
    - name: row_count
      agg: count
    - name: active
      agg: sum
      filter: "state = 'ACTIVE'"