{
  "$defs": {
    "IsoCountry": {
      "description": "ISO 3166-1 alpha-2 country code.",
      "pattern": "^[A-Z]{2}$",
      "type": "string"
    },
    "IsoCurrency": {
      "description": "ISO 4217 currency code.",
      "pattern": "^[A-Z]{3}$",
      "type": "string"
    },
    "IsoDate": {
      "description": "ISO 8601 date (YYYY-MM-DD).",
      "format": "date",
      "type": "string"
    },
    "LiabilityStatus": {
      "description": "Lifecycle.",
      "oneOf": [
        {
          "const": "estimated",
          "description": "Estimated (pre-close).",
          "type": "string"
        },
        {
          "const": "accrued",
          "description": "Accrued (post-close monthly).",
          "type": "string"
        },
        {
          "const": "partially_paid",
          "description": "Provisionally paid (Vorauszahlung).",
          "type": "string"
        },
        {
          "const": "paid",
          "description": "Fully paid.",
          "type": "string"
        },
        {
          "const": "settled",
          "description": "Settled (assessment vs accrual reconciled).",
          "type": "string"
        },
        {
          "const": "refunded",
          "description": "Refund expected / received.",
          "type": "string"
        }
      ]
    },
    "PathRef": {
      "description": "Path-based cross-reference relative to .corpospec/ root.\nPattern: `^[a-z0-9_-]+(/[a-z0-9_.-]+)+$`",
      "pattern": "^[a-z0-9_-]+(/[a-z0-9_.-]+)+$",
      "type": "string"
    },
    "TaxBucket": {
      "description": "Tax bucket per IAS 12 / ASC 740.",
      "oneOf": [
        {
          "const": "current",
          "description": "Current (payable within 12 months).",
          "type": "string"
        },
        {
          "const": "deferred_liability",
          "description": "Deferred tax liability (future tax payable from temp diff).",
          "type": "string"
        },
        {
          "const": "deferred_asset",
          "description": "Deferred tax asset (future tax saving from temp diff).",
          "type": "string"
        },
        {
          "const": "uncertain_position",
          "description": "Uncertain tax position (FIN 48 / IFRIC 23 reserve).",
          "type": "string"
        }
      ]
    },
    "TaxKind": {
      "description": "Tax kind.",
      "oneOf": [
        {
          "enum": [
            "other"
          ],
          "type": "string"
        },
        {
          "const": "de_koerperschaftsteuer",
          "description": "DE Körperschaftsteuer (corporate income).",
          "type": "string"
        },
        {
          "const": "de_gewerbesteuer",
          "description": "DE Gewerbesteuer (trade tax).",
          "type": "string"
        },
        {
          "const": "de_umsatzsteuer",
          "description": "DE Umsatzsteuer / Mehrwertsteuer (VAT).",
          "type": "string"
        },
        {
          "const": "de_lohnsteuer",
          "description": "DE Lohnsteuer (payroll withholding).",
          "type": "string"
        },
        {
          "const": "de_kapitalertragsteuer",
          "description": "DE Kapitalertragsteuer (capital-yields withholding).",
          "type": "string"
        },
        {
          "const": "us_federal_cit",
          "description": "US Federal Corporate Income Tax (Form 1120).",
          "type": "string"
        },
        {
          "const": "us_state_cit",
          "description": "US State Corporate Income Tax.",
          "type": "string"
        },
        {
          "const": "us_sales_and_use_tax",
          "description": "US Sales & Use Tax.",
          "type": "string"
        },
        {
          "const": "us_form1099",
          "description": "US Form 1099 series.",
          "type": "string"
        },
        {
          "const": "uk_corporation_tax",
          "description": "UK Corporation Tax (CT600).",
          "type": "string"
        },
        {
          "const": "uk_vat",
          "description": "UK VAT.",
          "type": "string"
        },
        {
          "const": "fr_is",
          "description": "FR Impôt sur les sociétés.",
          "type": "string"
        },
        {
          "const": "fr_tva",
          "description": "FR TVA.",
          "type": "string"
        },
        {
          "const": "eu_oss_vat",
          "description": "EU OSS VAT (One-Stop-Shop).",
          "type": "string"
        },
        {
          "const": "eu_ioss_vat",
          "description": "EU IOSS VAT (Import One-Stop-Shop).",
          "type": "string"
        },
        {
          "const": "beps_master_file",
          "description": "OECD BEPS A.13 Master File.",
          "type": "string"
        },
        {
          "const": "beps_local_file",
          "description": "OECD BEPS A.13 Local File.",
          "type": "string"
        },
        {
          "const": "beps_cbc_report",
          "description": "OECD BEPS A.13 Country-by-Country Report.",
          "type": "string"
        },
        {
          "const": "pillar2_glo_be",
          "description": "OECD Pillar Two GloBE Information Return.",
          "type": "string"
        },
        {
          "const": "eu_csrd",
          "description": "EU CSRD / ESRS reporting.",
          "type": "string"
        }
      ]
    }
  },
  "$id": "https://corpospec.com/schemas/v0.16.0/tax-liability.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Tax-liability record (per period × jurisdiction × kind).",
  "properties": {
    "accrued_amount": {
      "description": "Accrued amount at period end.",
      "format": "double",
      "type": "number"
    },
    "bucket": {
      "$ref": "#/$defs/TaxBucket"
    },
    "currency": {
      "$ref": "#/$defs/IsoCurrency"
    },
    "effective_rate_pct": {
      "description": "Effective tax rate pct (computed).",
      "format": "double",
      "type": "number"
    },
    "entity": {
      "$ref": "#/$defs/PathRef"
    },
    "id": {
      "$ref": "#/$defs/PathRef"
    },
    "journal_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "PathRef to the GL journal recognising the accrual."
    },
    "jurisdiction": {
      "$ref": "#/$defs/IsoCountry"
    },
    "outstanding_balance": {
      "description": "Net outstanding balance (accrued − prepayments − paid).",
      "format": "double",
      "type": "number"
    },
    "owner": {
      "$ref": "#/$defs/PathRef"
    },
    "paid_amount": {
      "description": "Cash paid against this period.",
      "format": "double",
      "type": "number"
    },
    "period_end": {
      "$ref": "#/$defs/IsoDate"
    },
    "period_start": {
      "$ref": "#/$defs/IsoDate"
    },
    "prepayments": {
      "description": "Pre-payments / withholding credits.",
      "format": "double",
      "type": "number"
    },
    "recognised_on": {
      "$ref": "#/$defs/IsoDate",
      "description": "Recognised in the GL on this date."
    },
    "status": {
      "$ref": "#/$defs/LiabilityStatus"
    },
    "tax_kind": {
      "$ref": "#/$defs/TaxKind"
    },
    "tax_return_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "PathRef to the matching tax_return.rs record (when filed)."
    }
  },
  "required": [
    "id",
    "entity",
    "jurisdiction",
    "tax_kind",
    "bucket",
    "period_start",
    "period_end",
    "status",
    "currency",
    "accrued_amount",
    "prepayments",
    "paid_amount",
    "outstanding_balance",
    "effective_rate_pct",
    "recognised_on",
    "owner"
  ],
  "title": "TaxLiability",
  "type": "object",
  "x-corpospec-pillar": "financials"
}