Build e-Defter (XBRL-GL) Ledgers and Berat for GİB
Skill: Convert the general ledger into e-Defter XBRL-GL files plus GİB-approved berat
Region: Türkiye (Turkey) Category: Accounting — e-Defter (electronic books) Does: Takes the posted general ledger and produces the e-Defter electronic books — the yevmiye defteri (journal) and büyük defter (general ledger) — in the XBRL-GL (Global Ledger) XML format, each accompanied by its berat (certificate) file that is signed and approved (onay) by the GİB (Gelir İdaresi Başkanlığı). Standard: e-Defter — XBRL-GL (GİB e-Defter teknik kılavuzu)
e-Defter replaces the paper-bound, notarised journal and ledger. Each period (monthly, or quarterly for those who elect it) you generate two XBRL-GL documents (yevmiye + büyük defter), hash and sign each with the Mali Mühür / e-imza, then create the matching berat files. The berat are uploaded to the GİB e-Defter portal (or sent via özel entegratör) and returned with the GİB seal — the GİB-approved berat is the legally valid proof, not the ledger file alone. Upload deadlines run several months after the period; confirm the current calendar. Validate against the current e-Defter teknik kılavuzu before submission.
When this applies
- Taxpayers required to keep e-Defter (within the e-Fatura/e-Arşiv scope above the published turnover thresholds, and certain sectors) or who have opted in voluntarily.
- Both books must be produced every period: yevmiye defteri (chronological journal entries) and büyük defter (account-by-account postings).
- Periods are monthly by default; small taxpayers may elect quarterly. The berat for a period is created and GİB-approved by the deadline set in the e-Defter calendar.
Input data required
| Input | XBRL-GL element |
|---|---|
| Entity VKN/TCKN, title, period start/end | gl-cor:entityPhysicalLocation*, gl-bus entity data |
| Journal entry id (fiş no) and date | gl-cor:entryNumber, gl-cor:entryDate |
| Line: account code (hesap kodu), name | gl-cor:accountMainID, gl-cor:accountMainDescription |
| Debit / credit amounts (borç / alacak) | gl-cor:amount + gl-cor:debitCreditCode (D/C) |
| Document type and reference (belge türü / no) | gl-cor:documentType, gl-cor:documentNumber |
| Posting/entry comment (açıklama) | gl-cor:detailComment |
| Period totals (debit/credit control) | document gl-bus summation |
Account codes follow the Turkish uniform chart of accounts (Tek Düzen Hesap Planı). The berat references the ledger file's hash and the period.
Document structure (XBRL-GL + berat)
e-Defter package (per book, per period)
├── Yevmiye Defteri (xbrli:xbrl, XBRL-GL)
│ └── gl-cor:accountingEntries
│ └── gl-cor:entryHeader (entryNumber, entryDate, entryComment)
│ └── gl-cor:entryDetail (account, amount, debitCreditCode, document...)
├── Büyük Defter (xbrli:xbrl, XBRL-GL — same entries grouped by account)
├── Yevmiye Beratı (edefter:berat — period, file hash, signature)
└── Büyük Defter Beratı (edefter:berat)
Each book file is signed (Mali Mühür / e-imza); the berat wraps the book's parça (part) hash and identifiers and is what GİB seals on approval. Amounts are in TRY with the kuruş precision required by the kılavuz.
Calculation rules
- For every entry, sum of debits (borç) = sum of credits (alacak) — the journal must balance per fiş and per period.
debitCreditCode=Dfor borç,Cfor alacak; each line carries one amount.- The büyük defter is derived from the same entries, regrouped by
accountMainID; per-account opening/closing and period debit/credit totals must reconcile with the yevmiye. - Large periods are split into parça (parts); each part is signed and gets its own berat reference, all tied to the period.
- The berat is valid only once GİB-approved (onaylı); keep the approved berat with the signed book.
Worked example (yevmiye entry, XBRL-GL outline)
<?xml version="1.0" encoding="UTF-8"?>
<xbrli:xbrl xmlns:xbrli="http://www.xbrl.org/2003/instance"
xmlns:gl-cor="http://www.xbrl.org/int/gl/cor/2006-10-25"
xmlns:gl-bus="http://www.xbrl.org/int/gl/bus/2006-10-25">
<gl-cor:accountingEntries>
<gl-cor:documentInfo>
<gl-cor:entriesType>journal</gl-cor:entriesType>
<gl-cor:periodCoveredStart>2026-05-01</gl-cor:periodCoveredStart>
<gl-cor:periodCoveredEnd>2026-05-31</gl-cor:periodCoveredEnd>
</gl-cor:documentInfo>
<gl-cor:entityInformation>
<gl-cor:organizationIdentifiers>
<gl-cor:organizationIdentifier>1234567890</gl-cor:organizationIdentifier>
<gl-cor:organizationDescription>Örnek Teknoloji A.Ş.</gl-cor:organizationDescription>
</gl-cor:organizationIdentifiers>
</gl-cor:entityInformation>
<gl-cor:entryHeader>
<gl-cor:entryNumber>2026000512</gl-cor:entryNumber>
<gl-cor:enteredDate>2026-05-15</gl-cor:enteredDate>
<gl-cor:entryComment>Satış faturası ABC2026000000123</gl-cor:entryComment>
<gl-cor:entryDetail>
<gl-cor:account>
<gl-cor:accountMainID>120.01</gl-cor:accountMainID>
<gl-cor:accountMainDescription>Alıcılar</gl-cor:accountMainDescription>
</gl-cor:account>
<gl-cor:amount>12000.00</gl-cor:amount>
<gl-cor:debitCreditCode>D</gl-cor:debitCreditCode>
<gl-cor:documentType>fatura</gl-cor:documentType>
<gl-cor:documentNumber>ABC2026000000123</gl-cor:documentNumber>
</gl-cor:entryDetail>
<gl-cor:entryDetail>
<gl-cor:account>
<gl-cor:accountMainID>600.01</gl-cor:accountMainID>
<gl-cor:accountMainDescription>Yurtiçi Satışlar</gl-cor:accountMainDescription>
</gl-cor:account>
<gl-cor:amount>10000.00</gl-cor:amount>
<gl-cor:debitCreditCode>C</gl-cor:debitCreditCode>
</gl-cor:entryDetail>
<gl-cor:entryDetail>
<gl-cor:account>
<gl-cor:accountMainID>391.01</gl-cor:accountMainID>
<gl-cor:accountMainDescription>Hesaplanan KDV %20</gl-cor:accountMainDescription>
</gl-cor:account>
<gl-cor:amount>2000.00</gl-cor:amount>
<gl-cor:debitCreditCode>C</gl-cor:debitCreditCode>
</gl-cor:entryDetail>
</gl-cor:entryHeader>
</gl-cor:accountingEntries>
</xbrli:xbrl>
Entry balances: borç 12000.00 = alacak (10000.00 + 2000.00). Sign each book, build the berat, upload to GİB, and retain the GİB-onaylı berat.
Validation checklist
- Both books produced for the period: yevmiye defteri and büyük defter
- Entity VKN/TCKN, title, and period start/end correct in
documentInfo/ entity info - Every entry balances: sum of
Damounts = sum ofCamounts (borç = alacak) - Account codes follow the Tek Düzen Hesap Planı; descriptions present
- Büyük defter reconciles with yevmiye (per-account debit/credit totals)
- Each book (and each parça) signed with Mali Mühür / e-imza
- Berat created for each book, uploaded to GİB, and returned onaylı (approved)
- Berat created and approved within the e-Defter calendar deadline for the period
Last updated: 2026-06-04 — confirm the active schema version, field codes, and GİB requirements against the current Gelir İdaresi Başkanlığı (Revenue Administration) specifications before use.