ontoloji.orgOpen Reference Hub
Statutory & Financial Governance13 min read·Updated: 2026-12-03·Türkçe sürüm →

GİB UBL-TR 1.2.1, VUK Inflation Accounting (TMS 29 / IAS 29) & KVKK Ontology Governance

A compliance reference architecture for enterprises operating in Türkiye: enforcing e-Fatura Schematron invariants, e-Defter Berat immutability, dual VUK 298/A vs. IAS 29 inflation ledgers, KVKK Art. 9 egress masking, and İYS consent gates.

Executive Summary — Key Takeaways
  • 01System prompts cannot guarantee GİB UBL-TR 1.2.1 XSD and Schematron compliance (TEMELFATURA/TICARIFATURA routing, 601–627 VAT withholding codes, zero-VAT exemption reasons); deterministic pre-flight gates are mandatory.
  • 02Once monthly XBRL-GL general ledgers are sealed via e-Defter Berat uploads, retroactive ERP updates create statutory audit violations; the ontology must hard-lock sealed months and route adjustments to prior-period accounts (671/681) or return invoices.
  • 03Mixing VUK Repeated Art. 298/A (698/648/658 PPI restatements) with TFRS / TMS 29 (IAS 29 CPI purchasing-power restatements) inside unguarded SQL sums double-counts inventory and fixed-asset margins.
  • 04Türkiye's reformed KVKK Art. 9 cross-border data regime and İYS commercial-message law require deterministic PII pseudonymization before cloud LLM calls and live ONAY verification before outreach actions.

1. GİB UBL-TR 1.2.1 Schematron Invariants: Alias Routing, Withholding (601–627) & Exemptions

Every electronic invoice issued in Türkiye must pass both OASIS UBL 2.1 XML Schema validation and the Turkish Revenue Administration's UBL-TR_Main_Schematron.xsl ruleset before HSM fiscal signing. Flat-table AI agents routinely fail four statutory cross-field invariants:

  • Taxpayer Mailbox (PK) Alias Enforcement (VUK Art. 353): If a buyer's tax ID (VKN/TCKN) appears on GİB's active Kayıtlı Kullanıcılar Listesi, issuing an EARSIVFATURA is illegal; the gate must bind the buyer's registered gib_pk_alias and route to TEMELFATURA or TICARIFATURA.
  • Profile vs. InvoiceType Collisions: Submitting cbc:InvoiceTypeCode = IADE under ProfileID = TICARIFATURA (which carries an 8-day Turkish Commercial Code Art. 21/2 KABUL/RED objection window) triggers immediate Schematron rejection.
  • VAT Withholding (601–627) Pairing: When InvoiceTypeCode = TEVKIFAT, standard VAT (0015) in cac:TaxTotal must pair with exact statutory codes and fractions in cac:WithholdingTaxTotal (e.g., 601 construction 4/10, 612 workforce supply 9/10) in base-10 DECIMAL arithmetic.
  • Mandatory Zero-VAT Exemption Codes: Any line with cbc:Percent = 0 must populate cbc:TaxExemptionReasonCode (301 goods export, 350/351 statutory exemptions).

2. e-Defter Berat Period Locks & VUK 298/A vs. TMS 29 (IAS 29) Dual Inflation Ledgers

Finance agents operating over the Turkish Uniform Chart of Accounts (TDHP 100–799) must respect two structural ledger boundaries. First, once monthly journal (Yevmiye) and general ledger (Defter-i Kebir) files are signed in XBRL-GL format and sealed via edefter.gov.tr Berat receipts, backdated mutations are strictly prohibited.

Second, enterprises maintain parallel inflation-accounting representations: VUK Repeated Art. 298/A (adjusting non-monetary 150–157, 250–257, and 500 accounts via TÜİK Yİ-ÜFE producer-price coefficients into .02 sub-accounts and 698/648/658 ledgers) alongside TFRS / TMS 29 (IAS 29) (TÜFE consumer-price restatements for consolidated IFRS reporting).

Enforcing e-Defter Berat Immutability and VUK vs. TMS 29 Ledger Isolation in the Ontology
1. Read Invariant (Preventing Inflation Double-Counting):
   Prompt : "Compute Q1 gross margin and inventory turnover by plant."
   Filter : Bind explicit ledger_scope = 'VUK_NOMINAL' (or 'VUK_298A' / 'TFRS_TMS29').
            Never sum nominal TDHP 150/600 rows together with 698/648/658 restatement vouchers!

2. Write Gate (e-Defter Berat Hard Lock):
   Action : post_adjustment_voucher(document_date = '2026-01-28')
   Check  : EDefterPeriodBerat('2026-01').status == 'SEALED'
   Result : REJECT -> "January 2026 e-Defter Berat is sealed. Route corrections to
                       current-period 671/681 adjustment accounts or a formal return invoice."

3. KVKK Article 9 Cross-Border LLM Egress & İYS Commercial Consent Gates

Türkiye's Personal Data Protection Law (KVKK Law No. 6698, including the June 2024 Article 9 cross-border transfer reform) and Electronic Commerce Law (No. 6563 İYS) impose strict runtime obligations on AI pipelines:

  • Three-Tier LLM Egress Routing & Pseudonymization: Special-category data (KVKK Art. 6) and raw payroll ledgers (TDHP 335 / 360, LH_001_PNTCARD) remain on local infrastructure, while foreign cloud LLM calls apply reversible token pseudonymization (<PII_TCKN_01>) aligned with VERBİS and filed Standard Contractual Clauses (SCC).
  • Minimum Aggregation Thresholds (k >= 5): Compensation or HR queries over cohorts smaller than five employees automatically redact aggregates to block single-employee inference.
  • Pre-Action İYS Consent Verification: Any autonomous email, SMS, or voice outreach tool checks İleti Yönetim Sistemi (İYS) consent state (status == "ONAY" for retail BIREYSEL recipients) before execution.
Move Statutory Compliance Out of System Prompts and Into the Ontology

Tax authority schemas, sealed ledger periods, and data-residency laws cannot rely on LLM obedience. Encoding them as deterministic read views, field masks, and pre-flight action gates inside the ontology guarantees compliance across every connected AI client.

Glossary Concepts Referenced in This Guide

Open License (CC BY 4.0) · Cite This Page

Free to reference in engineering docs, ADRs, articles, and course syllabi with attribution.

[GİB UBL-TR 1.2.1, VUK Inflation Accounting (TMS 29 / IAS 29) & KVKK Ontology Governance — Ontoloji.org](https://ontoloji.org/en/guides/gib-ubl-tr-vuk-inflation-accounting-tms-29-and-kvkk-ontology)

More Guides in This Series

Core Architecture
How AI Uses an Ontology
9 min read
Agent Engineering
Agent Harness vs. Ontology
8 min read
Data Engineering
ERP, CRM & MES Patterns
10 min read
Strategy & Governance
30-Day Ontology Strategy
7 min read
ERP Integration
ERP Ontology Integration Guide
11 min read
ERP Data Engineering
Logo Tiger, Nebim V3 & Turkish Unicode Traps
14 min read
Agent Governance
Adversarial Verification, Permissions & Compaction
13 min read
Verification Engineering
Absence-Aware Gates & Ratio Reconstruction
13 min read
Provenance & Governance
Draft vs. Normative Provenance Hygiene
12 min read
SAP & Protocol Architecture
SAP BTP, Cloud Connector & ORD Ontology
11 min read
ERP Write-Safety
Logo REST, Nebim Integrator & UBL-TR Safety
12 min read
Platform Architecture Comparison
Cortex, Genie, dbt & Cube vs. Ontology
12 min read
Systems Engineering & Forensics
ERP Integrator Anti-Patterns & Forensics
13 min read
Platform Architecture Comparison
Fabric IQ, D365 MCP & SAP Joule vs. Ontology
12 min read
Retrieval & RAG Architecture
PageIndex Vectorless Tree RAG vs. Vector DBs
11 min read
Platform Architecture Comparison
Atlan, Stardog & Neo4j vs. Ontology
12 min read
Agent Memory & Ontology Architecture
Cognee & Zep Graphiti vs. Ontology
11 min read
Protocol & Multi-Agent Architecture
MCP vs. OpenAPI & Specialist Agents
12 min read
Protocols & Standards
MCP 2026-07-28: Tasks, Events & Apps
13 min read
Agent Architecture & Governance
Agent Harness Engineering Rubric
12 min read
Agent Architecture & Governance
Multi-Agent Task Boards & Mailboxes
12 min read
Verification & Security
Generate-Evaluate-Repair & Observers
12 min read
Verification & Security
NSA MCP Security & CIMD vs. DCR
13 min read
Agent Architecture & Governance
OpenTelemetry for AI Agents & MCP
11 min read