{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/budget_vs_actual/v2.json",
  "title": "budget_vs_actual contract v2",
  "type": "object",
  "required": [
    "actual_amount",
    "budget_amount",
    "expense_category",
    "financial_period",
    "legal_entity_id"
  ],
  "properties": {
    "currency": {
      "type": "currency",
      "description": "the currency the two amounts are in, an ISO 4217 alpha-3 code as the source states it. A row with no currency has no usable amounts.",
      "x-demiton-requiredness": "optional"
    },
    "amount_basis": {
      "type": "string",
      "description": "whether `budget_amount` and `actual_amount` include GST",
      "x-demiton-requiredness": "optional"
    },
    "actual_amount": {
      "type": "number",
      "description": "net actual GL spend for the category in the period, debits less credits",
      "x-demiton-requiredness": "required",
      "x-demiton-type": "decimal"
    },
    "budget_amount": {
      "type": "number",
      "description": "budgeted spend for the category in the period",
      "x-demiton-requiredness": "required",
      "x-demiton-type": "decimal"
    },
    "legal_entity_id": {
      "type": "string",
      "description": "the legal entity whose GL the budget and the actuals belong to; the fact's subject anchor",
      "x-demiton-requiredness": "required",
      "x-demiton-reference": true
    },
    "variance_amount": {
      "type": "number",
      "description": "`budget_amount` − `actual_amount` for the category",
      "x-demiton-requiredness": "optional",
      "x-demiton-type": "decimal"
    },
    "expense_category": {
      "type": "string",
      "description": "the classification the budget line and the actual GL movement share, so the two are comparable",
      "x-demiton-requiredness": "required"
    },
    "financial_period": {
      "type": "string",
      "description": "the accounting period the budget and the actuals cover",
      "x-demiton-requiredness": "required",
      "x-demiton-reference": true
    },
    "budget_entry_count": {
      "type": "integer",
      "description": "number of source budget rows folded into the row",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "count"
    }
  },
  "x-demiton-register-type": "budget_vs_actual",
  "x-demiton-contract-version": "2.0.1",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [
    {
      "axis": "financial_period",
      "requirement": "optional",
      "role": "context"
    },
    {
      "axis": "legal_entity",
      "requirement": "optional",
      "role": "context"
    }
  ],
  "x-demiton-measures": [],
  "x-demiton-provenance": {
    "standards": [
      {
        "code": "GST Act 1999 (Cth)",
        "title": "A New Tax System (Goods and Services Tax) Act 1999 (Cth)",
        "access": "public_summary",
        "clause": "s 29-70 (tax invoices); ATO tax invoice guidance",
        "region": "Australia",
        "edition": "current (ATO guidance updated 25 Aug 2025)",
        "checked_on": "2026-09-14"
      }
    ]
  },
  "description": "Budget against actual spend for the organisation, by expense category.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/budget_vs_actual/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}