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.
- 01System prompts cannot guarantee GİB
UBL-TR 1.2.1XSD andSchematroncompliance (TEMELFATURA/TICARIFATURArouting,601–627VAT withholding codes, zero-VAT exemption reasons); deterministic pre-flight gates are mandatory. - 02Once monthly
XBRL-GLgeneral ledgers are sealed viae-Defter Beratuploads, 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/658PPI restatements) withTFRS / TMS 29(IAS 29CPI purchasing-power restatements) inside unguarded SQL sums double-counts inventory and fixed-asset margins. - 04Türkiye's reformed
KVKK Art. 9cross-border data regime andİYScommercial-message law require deterministic PII pseudonymization before cloud LLM calls and liveONAYverification 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 activeKayıtlı Kullanıcılar Listesi, issuing anEARSIVFATURAis illegal; the gate must bind the buyer's registeredgib_pk_aliasand route toTEMELFATURAorTICARIFATURA. - Profile vs. InvoiceType Collisions: Submitting
cbc:InvoiceTypeCode = IADEunderProfileID = TICARIFATURA(which carries an 8-day Turkish Commercial Code Art. 21/2KABUL/REDobjection window) triggers immediate Schematron rejection. - VAT Withholding (
601–627) Pairing: WhenInvoiceTypeCode = TEVKIFAT, standard VAT (0015) incac:TaxTotalmust pair with exact statutory codes and fractions incac:WithholdingTaxTotal(e.g.,601construction4/10,612workforce supply9/10) in base-10DECIMALarithmetic. - Mandatory Zero-VAT Exemption Codes: Any line with
cbc:Percent = 0must populatecbc:TaxExemptionReasonCode(301goods export,350/351statutory 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).
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 withVERBİSand 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
İYSConsent Verification: Any autonomous email, SMS, or voice outreach tool checksİleti Yönetim Sistemi (İYS)consent state (status == "ONAY"for retailBIREYSELrecipients) before execution.
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
UPDATE/INSERT statements on ERP/CRM databases, requiring typed action proposals validated against preconditions and approved by a named human role.STAT = 4, SPEC_CODE = "B2") in operational tables to verified business states and calculation inclusion rules.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)