{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/cost_element/v2.json",
  "title": "cost_element contract v2",
  "type": "object",
  "required": [
    "amount",
    "currency",
    "entry_no",
    "financial_period",
    "occurred_at",
    "project"
  ],
  "properties": {
    "amount": {
      "type": "number",
      "description": "posted cost for the line (`Total_Cost_LCY`)",
      "x-demiton-requiredness": "required",
      "x-demiton-unit": "by coordinate (`currency`)",
      "x-demiton-type": "decimal"
    },
    "vendor": {
      "type": "string",
      "description": "supplier, where the source carries one",
      "x-demiton-requiredness": "optional",
      "x-demiton-reference": true
    },
    "project": {
      "type": "string",
      "description": "the job/project the cost was posted against",
      "x-demiton-requiredness": "required",
      "x-demiton-reference": true
    },
    "currency": {
      "type": "currency",
      "description": "denomination of every amount on the row",
      "x-demiton-requiredness": "required"
    },
    "entry_no": {
      "type": "number",
      "description": "the source's own row identity, used for episodic dedup and supersession",
      "x-demiton-requiredness": "required"
    },
    "quantity": {
      "type": "number",
      "description": "posted quantity (`Quantity_Base`)",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "dimensionless",
      "x-demiton-type": "decimal"
    },
    "cost_code": {
      "type": "string",
      "description": "the job task the cost was coded to (`Job_Task_No`)",
      "x-demiton-requiredness": "optional"
    },
    "cost_type": {
      "type": "string",
      "description": "the raw posting-group discriminator behind the cost classification (`Gen_Prod_Posting_Group`)",
      "x-demiton-requiredness": "optional"
    },
    "unit_cost": {
      "type": "number",
      "description": "posted unit cost (`Unit_Cost_LCY`)",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "by coordinate",
      "x-demiton-type": "decimal"
    },
    "document_no": {
      "type": "string",
      "description": "the source document reference",
      "x-demiton-requiredness": "optional"
    },
    "occurred_at": {
      "type": "string",
      "description": "posting date of the ledger entry",
      "x-demiton-requiredness": "required",
      "format": "date",
      "x-demiton-type": "date"
    },
    "source_code": {
      "type": "string",
      "description": "distinguishes cost postings from `SALES`/claim postings on the same ledger",
      "x-demiton-requiredness": "optional"
    },
    "legal_entity": {
      "type": "string",
      "description": "the BC company the posting belongs to",
      "x-demiton-requiredness": "optional",
      "x-demiton-reference": true
    },
    "price_amount": {
      "type": "number",
      "description": "the price/revenue side of a claim line (`Total_Price_LCY`), which the cost measure drops",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "by coordinate",
      "x-demiton-type": "decimal"
    },
    "work_activity": {
      "type": "string",
      "description": "level-1 canonical work activity",
      "x-demiton-requiredness": "optional",
      "x-demiton-reference": true
    },
    "dimension_set_id": {
      "type": "number",
      "description": "key into the BC dimension set that resolves EQUIPMENT for plant rate",
      "x-demiton-requiredness": "optional"
    },
    "financial_period": {
      "type": "string",
      "description": "the month the posting belongs to",
      "x-demiton-requiredness": "required"
    }
  },
  "x-demiton-register-type": "cost_element",
  "x-demiton-contract-version": "2.0.1",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [
    {
      "axis": "cost_code",
      "requirement": "optional",
      "role": "context"
    },
    {
      "axis": "vendor",
      "requirement": "optional",
      "role": "context"
    },
    {
      "axis": "currency",
      "requirement": "required",
      "role": "context"
    },
    {
      "axis": "financial_period",
      "requirement": "required",
      "role": "context"
    },
    {
      "axis": "project",
      "requirement": "required",
      "role": "subject"
    },
    {
      "axis": "work_activity",
      "requirement": "optional",
      "role": "context"
    },
    {
      "axis": "legal_entity",
      "requirement": "optional",
      "role": "context"
    }
  ],
  "x-demiton-measures": [
    {
      "key": "amount",
      "accumulation": "additive",
      "dtype": "decimal",
      "unit": "by_coordinate"
    },
    {
      "key": "quantity",
      "accumulation": "additive",
      "dtype": "float",
      "unit": "dimensionless"
    },
    {
      "key": "unit_cost",
      "accumulation": "instantaneous",
      "dtype": "decimal",
      "unit": "by_coordinate"
    }
  ],
  "x-demiton-provenance": {
    "standards": [
      {
        "code": "ATO record-keeping rules",
        "title": "ATO business record-keeping rules (ITAA 1936 s 262A; TAA 1953 Sch 1 s 382-5)",
        "access": "public_summary",
        "region": "Australia",
        "edition": "ATO page updated 2025-08-01",
        "checked_on": "2026-09-14"
      },
      {
        "code": "Commonwealth Procurement Rules",
        "title": "Commonwealth Procurement Rules (AU)",
        "access": "public_summary",
        "clause": "construction threshold defined GST-inclusive",
        "region": "Australia",
        "edition": "effective 17 Nov 2025",
        "checked_on": "2026-09-14"
      },
      {
        "code": "Corporations Act 2001 (Cth) s 286",
        "title": "Corporations Act 2001 (Cth) - obligation to keep financial records",
        "access": "full_text_verified",
        "clause": "s 286(1), 286(2) (7 years)",
        "region": "Australia",
        "edition": "current",
        "checked_on": "2026-09-14"
      },
      {
        "code": "SA SOP Act 2009",
        "title": "Building and Construction Industry Security of Payment Act 2009 (SA)",
        "access": "public_summary",
        "clause": "claimed amount must state GST treatment",
        "region": "Australia",
        "edition": "current",
        "checked_on": "2026-09-14"
      },
      {
        "code": "OCDS 1.1.5",
        "title": "Open Contracting Data Standard",
        "access": "full_text_verified",
        "region": "International",
        "edition": "1.1 schema, docs 1.1.5",
        "checked_on": "2026-09-14"
      },
      {
        "code": "Peppol BIS Billing 3.0",
        "title": "Peppol BIS Billing 3.0",
        "access": "full_text_verified",
        "region": "International",
        "edition": "3.0.21",
        "checked_on": "2026-09-14"
      },
      {
        "code": "Construction Contracts Act 2002 (NZ)",
        "title": "Construction Contracts Act 2002 (NZ), 2002 No 46",
        "access": "full_text_verified",
        "clause": "ss 20(2)(d), 21(2)(c)",
        "region": "New Zealand",
        "edition": "as at 5 Oct 2023 (incl. Retention Money Amendment Act 2023)",
        "checked_on": "2026-09-14"
      },
      {
        "code": "HGCRA 1996 Part II",
        "title": "Housing Grants, Construction and Regeneration Act 1996 (UK), Part II",
        "access": "full_text_verified",
        "clause": "s 110A",
        "region": "United Kingdom",
        "edition": "current",
        "checked_on": "2026-09-14"
      },
      {
        "code": "AIA G702/G703",
        "title": "AIA G702-1992 Application and Certificate for Payment / G703-1992 Continuation Sheet",
        "access": "public_summary",
        "region": "United States",
        "edition": "1992 base editions",
        "checked_on": "2026-09-14"
      }
    ]
  },
  "description": "Posted job cost lines from your ERP job ledger.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/cost_element/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}