← ALL PLUGINS

Estonia plugin · artifi-ee-vat-declaration

Estonian VAT Declaration.

V1.0.0MIT2 COMMANDS

A complete Estonian VAT return workflow. A pre-close validation gate runs first — flagging payments without a document, cut-off issues, tax-code/jurisdiction mismatches, GL tie-out differences, and INF-threshold inconsistencies — and blocks generation until they are resolved. It then produces the KMD2 machine CSV (the format e-MTA accepts for upload) plus an XSD-validated vatDeclaration XML carrying the KMD main form and the KMD INF A/B annexes. The EC Sales List (Form VD) for intra-community B2B supplies is a separate filing. Tax codes are dynamically discovered and classified — never hardcoded — so the plugin adapts to your specific setup, including reverse-charge and intra-community acquisition handling and VAT GL reconciliation.

Open on GitHub

01 / Commands · 2

Two commands.
One procedure.

Both run inside Claude against the governed ledger.

01

/prepare-vat-declaration — Run the full monthly VAT return. Discovers and classifies tax codes dynamically, fetches posted transactions, then runs a pre-close validation gate (payments without a document, cut-off, tax-code jurisdiction, GL tie-out, INF threshold) that blocks generation until issues are fixed. Generates the KMD2 machine CSV (e-MTA upload format) plus an XSD-validated vatDeclaration XML with KMD INF A/B annexes. Add "validate" to run the gate only, without generating.

02

/prepare-ec-sales-list — Prepare the EC Sales List (Form VD) for intra-community B2B supplies — a separate e-MTA filing. Discovers tax codes indicating IC supply, fetches AR invoices, groups by purchaser VAT number (one row per purchaser, full euros), classifies goods / services / triangular per the official form columns, validates EU VAT numbers via VIES, and reconciles goods with KMD line 3.1.1 and services with line 3.1 − 3.1.1.

HIGHLIGHTS

Pre-close validation gate blocks errors before filing. KMD2 machine CSV + XSD-validated XML for e-MTA. KMD INF annex + EC Sales List, reverse-charge handling. Dynamic tax code discovery (never hardcoded).

02 / How a run behaves

How a run behaves.
Full VAT Declaration Workflow.

01
Discover and classify tax codes dynamically — map each to the appropriate KMD line
02
Fetch all posted AR invoices, AP invoices, credit notes, and journal entries with VAT impact
03
Verify tax code coverage — flag any transaction lines with missing or inactive tax codes
04
Run the pre-close validation gate (BLOCK/WARN): payments without a document, cut-off, tax-code jurisdiction, GL tie-out, INF threshold — refuse to generate while any BLOCK is open
05
Compute the KMD main form: taxable bases by rate, input VAT, reverse charge (lines 6/7), IC acquisitions, adjustments (e-MTA derives total VAT and net payable)
06
Prepare KMD INF Annex: group sales (Part A) and purchase (Part B) partners above EUR 1,000 threshold
07
Reconcile the KMD to the GL VAT accounts (trial-balance tie-out)
08
Generate the KMD2 machine CSV (primary) and XSD-validated vatDeclaration XML with INF A/B annexes — ready for e-MTA upload
09
Hand off the EC Sales List (Form VD) when intra-community supplies exist; provide filing guidance — deadline is the 20th of the following month

VALIDATION GATE · 5 CHECKS

All transactions for the period are posted (no drafts remain). All transaction lines have tax codes assigned. KMD calculations balance: output VAT minus input VAT equals net VAT. KMD INF totals reconcile with KMD output VAT lines. EC Sales List reconciles with KMD Lines 3.1 (goods) and 3.2 (services).

REFERENCE DATA · 7 FILES

tax-codes-ee.mdkmd-form-structure.mdkmd-inf-annex.mdec-sales-list.mdvat-rates-ee.mdvalidation-checklist.mdemta-filing-guide.md

Fork it

Your procedures,
written down.

Swap the reference files for your policies and run it in Claude. Writes still go through the governed gateway.

hello@ar-ti-fi.com