Explains how VAT and the Estonian KMD (käibedeklaratsioon) work in Merit Aktiva, covering tax codes, KMD line mapping, time-of-supply, and reconciliation from the elnora-merit CLI.
How this skill is triggered — by the user, by Claude, or both
Slash command
/merit-aktiva-workspace:merit-vat-kmdThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **Scope:** this skill describes the **Estonian** VAT regime (KMS, EMTA, the KMD return,
Scope: this skill describes the Estonian VAT regime (KMS, EMTA, the KMD return, the 24% standard rate). On the Polish localization (
360 Księgowość) the VAT rules, rates, and return differ — use the CLI's tax/account mechanics here, but apply your local Polish VAT rules rather than the EE specifics below.
How Merit computes VAT and produces the monthly KMD, and how to support it from
elnora-merit. The API has no KMD endpoint — Merit builds and files the KMD in the
UI from the invoices you enter. The CLI's job is to get the per-line VAT right and to pull
the figures that verify it.
If your workspace provides a company books reference (VAT rate, filing cadence, standing VAT rules), load it before relying on this.
Merit auto-fills the KMD from every saved sales and purchase invoice. The VAT
code (TaxId) on each invoice line routes that line's amounts to the correct KMD row.
You never type figures into the KMD. So a correct KMD is entirely a function of:
TaxId on every invoice line (taxes list → the guid), andGet the line codes right and the declaration is right. Fix a wrong KMD by fixing the source invoice's code/date/amount, not the declaration.
elnora-merit taxes list # [{ Id (guid), Code "24%", Name, TaxPct }]
Id of the current standard-rate row on standard domestic supply.taxes create exists but is documented only for OSS codes (--tax-type 12). Adding
everyday rates is a UI task.Standard EMTA KMD form; Merit populates it from each line's tax code. The rows that matter:
| Line | Meaning | Fed by |
|---|---|---|
| 1 | Standard-rate (24%) taxable supply | Domestic sales at the standard code |
| 2 | Reduced-rate (9% / 5%) supply | Sales at a reduced code |
| 3 / 3.1 / 3.1.1 | 0% supply; intra-EU supply of goods+services / goods | EU sales to a customer with valid EU country + VAT no. |
| 4 | VAT due (computed) | — |
| 4.1 | Import VAT declared on KMD (KMS §38²) | GL via the §38² import-VAT account; mirrored to 5 & 5.1, net 0 |
| 5 / 5.1 | Input VAT deductible / on imports | Purchase invoices' deductible VAT; import VAT |
| 5.3 / 5.4 | VAT on a 100% / 50%-business car | The 100% auto / 50% auto codes |
| 6 / 6.1 / 7 | Reverse-charge acquisitions (intra-EU goods+services / goods / other) | Reverse-charge purchases — see merit-reverse-charge |
| 10 / 11 | Adjustment increasing / decreasing input VAT | Manual GL correction (e.g. proportional-VAT year-end) |
Reverse charge appears on 6/6.1/7 (and mirrored 4/5) but Merit posts no GL entry for
it — so the KMD's VAT totals differ from the GL VAT-account balances by exactly the
reverse-charge amount. Expected, not an error. Full procedure: merit-reverse-charge.
Merit routes each line to its period by the invoice's VAT/posting date; the taxable period is always the calendar month. Estonian KMS §11 tax-point rules (e.g. prepayments are a tax point at receipt) are not enforced by the UI — set the line/invoice dates so the amount lands in the correct month. Your books reference states any standing rule (e.g. prepaid items declared by payment month).
There is no pay-the-tax endpoint beyond the normal bank flow. When you pay the VAT, the KMD
liability appears in the bank-import Võlgnevused window as a KD-MM-YYYY debt against the
tax-authority vendor (Maksu- ja Tolliamet), due the 20th of the following month. Match
the payment there — Merit nets it against any standing tax-account prepayment credits
(Ettemaks KD-… rows), so the figure you actually paid can be less than the return total.
Do not book it as a GL / "Muud" entry; the UI blocks tax payments from the general ledger.
Full mechanics in merit-payments-bank.
Generating, the control report, the KMD INF annex (per-partner totals over €1000), and the XML filing to EMTA are all Merit UI actions (Finants → Käibedeklaratsioon). On save, Merit posts the VAT closing entry to the GL automatically.
To verify the figures from the CLI:
elnora-merit gl list --period-start 20260601 --period-end 20260630 # VAT closing + all entries
elnora-merit reports sales --data '{"ReportType":1,"StartDate":"20260601","EndDate":"20260630"}'
elnora-merit reports purchase --data '{"ReportType":1,"StartDate":"20260601","EndDate":"20260630"}'
The käibeandmik (VAT/turnover ledger by account) is a UI report; cross-check the GL VAT accounts against the KMD's output- and input-VAT totals there.
Merit can submit the KMD straight to EMTA over the X-tee machine-to-machine interface (no
manual XML upload) — but only after a one-time e-MTA authorization. Merit does not run
its own X-tee security server; it routes the submission through a hosted one owned by
SWEDBANK AS (registry code 10060701). Authorize it in e-MTA: Seaded → Pääsuõigused →
Esindajate pääsuõigused → Uus pääsuõigus, add Swedbank (10060701), and grant the right
"Käibedeklaratsiooni andmete saatmine masin-masin liidese kaudu" (individual-right code
XT_MM_KMD). The submitting user also needs declaration-filing rights for the company.
If the grant is missing, the Merit submit fails with:
"Käibemaksu deklaratsiooni saatmine ebaõnnestus. EMTA: Turvaserveri omanikul, kelle kaudu
deklaratsiooni esitate, puudub volitus 'Andmete saatmine masin-masin liidese kaudu' …" —
add the authorization above and resubmit (effective immediately). Granting only XT_MM_KMD
covers VAT returns; the broader XT_MM package also bundles TÖR (employment-register) M2M
submission — grant that only if needed.
merit-reverse-charge; for booking Stripe card sales,
merit-stripe.npx claudepluginhub elnora-ai/elnora-merit-aktiva --plugin merit-aktiva-workspaceProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.