/merit-aktiva-workspace:merit-vat-kmdfrom merit-aktiva-workspace
Explains how VAT and the Estonian KMD (käibedeklaratsioon) work in Merit Aktiva, covering tax-code model, KMD line mapping, time-of-supply, and reconciliation from the elnora-merit CLI.
Ships in merit-aktiva-workspace. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
Get the VAT codes (TaxId guids + rates) from the company profile (
elnora-merit profile sync→company-profile.json;profile show --section taxes). Filing cadence and standing VAT rules come from your prose books reference if you keep one. Load what applies 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), and Merit does post a GL entry for
it: the purchase invoice debits the reverse-charge VAT account and credits the sales-VAT
account for the self-assessed amount, and the monthly KMD closing entry clears the pair. (The
account codes are whatever your own chart of accounts uses — read them from accounts list,
don't assume.) So the GL VAT accounts and the KMD are expected to agree; a gap between them
is a real break to investigate, not a by-product of reverse charge.
Merit zeroes the invoice's payable VAT, so a reverse-charge purchase reports
TaxAmount = 0 on the invoice header. That header value is not the test. To confirm
reverse charge actually applied, read the posted GL batch (gl get <GLBId>) and look for the
self-assessed debit/credit VAT pair. TaxAmount = 0 on a foreign-vendor purchase that
carries a standard-rate line is correct, not missing VAT — do not "fix" it.
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, or
the next working day when the 20th falls on a public holiday or weekend (MKS § 50 lg 1
applies TsÜS § 136 lg 8). Take the due date EMTA itself shows rather than assuming the 20th.
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.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
vat, kmd, estonia, merit-aktiva, tax-return, käibedeklaratsioon
npx claudepluginhub elnora-ai/elnora-merit-aktiva --plugin merit-aktiva-workspace18 skills in this plugin
/merit-aktiva-workspaceMerit Aktiva accounting — routes work to the elnora-merit CLI, slash commands, and agents. Use when: looking up or creating invoices, recording payments, checking financial reports, managing customers/vendors, or any Merit Aktiva accounting task. TRIGGERS: "merit", "merit aktiva", "aktiva", "invoice", "sales invoice", "purchase invoice", "create invoice", "unpaid invoices", "record payment", "customer balance", "vendor", "income statement", "profit and loss", "balance sheet", "VAT", "accounting", "bookkeeping", "chart of accounts", "general ledger", "reconcile stripe", "book stripe payouts", "card sales".
/merit-business-tripsHow to record Estonian foreign business trips (välislähetus) in Merit Aktiva correctly: tax-free daily allowance (välislähetuse päevaraha), the VAT treatment of flights and hotels (which is NOT reverse charge), paying a non-employee's travel via a käsundusleping, and client/partner meals (vastuvõtukulud). All figures are the current statutory limits — verify against Riigi Teataja, since the 2025 reform raised several of them and older blog figures are stale. Use when: booking per diem, a trip expense report, a foreign flight/hotel invoice, a contractor's covered travel, or a business-partner dinner. TRIGGERS: "lähetus", "välislähetus", "päevaraha", "daily allowance", "per diem", "business trip", "trip expenses", "kuluaruanne", "aruandev isik", "reporting person expense", "vastuvõtukulud", "representation costs", "client dinner", "äripartnerite toitlustamine", "TÖR", "töötamise register", "tasuta töötamine", "käsundusleping travel".
/merit-company-lookupLook up Estonian companies in the Business Register (äriregister) using the two FREE live services via `elnora-merit ariregister`: invoicing requisites (legal name, VAT number, status, address) by registry code, and e-invoice capability. Use to fill or verify customer/invoice details from the authoritative source, or to check whether a company can receive e-invoices before sending one. Use when: looking up a company's registry data, getting a VAT number or address by registry code, verifying customer details before invoicing, or checking e-invoice capability. TRIGGERS: "äriregister lookup", "business register", "registrikood", "look up company", "company requisites", "VAT number for", "registry data", "verify customer", "e-invoice check", "can they receive e-invoices", "e-arve check", "kmkr number".
/merit-documentsKeep every Merit Aktiva transaction backed by its source document (receipt / supplier invoice). Audits Merit for invoices missing an attachment, searches configured sources (local folders, or Gmail/Drive/etc. via a command adapter) for the matching PDF, stages or attaches it, and reports what it cannot find to a Slack-compatible webhook. Runs on a schedule. Use when: "missing receipts", "which invoices have no document", "attach receipts", "receipt audit", "documents without invoices", "find missing invoices", "auto-attach receipts", "receipt reminder", "document compliance". TRIGGERS: "missing receipt", "missing invoice", "no attachment", "receipt audit", "document sync", "attach receipt", "which transactions lack a receipt", "unattached invoice", "receipt reminder", "merit documents".
/merit-lhvHow to pull an LHV bank statement straight into Merit Aktiva without touching a file export — LHV's own MCP server returns camt.053 XML, which is exactly what Merit's bank-statement import accepts. Covers connecting LHV (OAuth2 + Smart-ID, read-only), the 31-day window, the multi-currency trap, and where the statement stops being the agent's job and becomes a match-and-confirm in the Merit UI. Use when: importing an LHV statement, reconciling the LHV bank in Merit, pulling transactions or balances from LHV, connecting LHV to Claude, or backfilling several months of LHV history. TRIGGERS: "lhv", "lhv.ai", "lhv pank", "lhv statement", "lhv bank", "import lhv", "pull from lhv", "lhv transactions", "lhv balance", "connect lhv", "bank statement from lhv", "reconcile lhv", "lhv to merit", "camt from lhv", "lhv backfill".
/merit-palk-employeesHow to onboard employees and maintain contracts, contacts, and base salary agreements in Merit Palk via `elnora-merit palk`. Covers the sendemployees-vs-sendpayterms distinction, required import codes, and reading the employee / agreement lists. Use when: adding a new employee, creating a first contract, setting or updating a base salary agreement, adding an employee's bank/contact details, or listing employees/agreements. TRIGGERS: "add employee", "onboard employee", "new hire", "create contract", "tööleping", "base salary agreement", "palgakokkulepe", "change salary", "update salary agreement", "employee bank account", "employee contact", "list employees", "employee list".
Other plugins' skills for the same job