{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/overrun_risk_verdict/v2.json",
  "title": "overrun_risk_verdict contract v2",
  "type": "object",
  "required": [
    "basis",
    "budget",
    "cost_code",
    "detail",
    "variance"
  ],
  "properties": {
    "basis": {
      "type": "string",
      "description": "cost when the budget came from the plan's cost side, price when only the price side existed (job_budget.COST_BUDGET_BASIS against BUDGET_BASIS).",
      "x-demiton-requiredness": "required"
    },
    "actual": {
      "type": "number",
      "description": "Cost booked against the code.",
      "x-demiton-requiredness": "optional"
    },
    "budget": {
      "type": "number",
      "description": "The cost-side budget for that code, ex-GST.",
      "x-demiton-requiredness": "required"
    },
    "detail": {
      "type": "string",
      "description": "One line naming the code, the budget and the overrun.",
      "x-demiton-requiredness": "required"
    },
    "currency": {
      "type": "currency",
      "description": "the currency of every amount on this record (`budget`, `variance`, `committed` and `actual`), an ISO 4217 alpha-3 code as the source states it. A record with no currency has no usable amount.",
      "x-demiton-requiredness": "optional"
    },
    "variance": {
      "type": "number",
      "description": "Cost minus budget, positive when over.",
      "x-demiton-requiredness": "required"
    },
    "committed": {
      "type": "number",
      "description": "Open purchase order lines against the code that are not yet invoiced.",
      "x-demiton-requiredness": "optional"
    },
    "cost_code": {
      "type": "string",
      "description": "The job task number or cost code the variance sits on.",
      "x-demiton-requiredness": "required"
    },
    "cause_category": {
      "type": "string",
      "description": "The subcategory of the verdict's disease: the stage or control that failed. One of that disease's `causes[].key` in vocab/diseases.json, checked by `taxonomy.check_cause` before the write. Absent when the detector does not determine it.",
      "x-demiton-requiredness": "optional"
    },
    "variance_ratio": {
      "type": "number",
      "description": "variance divided by budget, the share overrun.",
      "x-demiton-requiredness": "optional"
    },
    "source_fact_ids": {
      "type": "array",
      "description": "The budget and cost facts the verdict cites.",
      "x-demiton-requiredness": "optional"
    }
  },
  "x-demiton-register-type": "overrun_risk_verdict",
  "x-demiton-contract-version": "2.1.0",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [],
  "x-demiton-measures": [],
  "x-demiton-provenance": {
    "standards": []
  },
  "description": "The Overrun risk verdict register contract, version 2. JSON Schema (draft 2020-12); x-demiton-* keywords carry Demiton's own meaning and standard validators ignore them.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/overrun_risk_verdict/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}