/merit-aktiva-workspace:merit-sales-invoicesfrom merit-aktiva-workspace
Creates, finds, credits, and sends sales invoices correctly in Merit Aktiva via the elnora-merit CLI. Covers VAT, invoice numbering, prepayment invoices, and credit notes.
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.
Read when SKILL.md points to them.
How to issue sales invoices correctly with elnora-merit sales-invoices. Every
endpoint is POST with a JSON body. Writes hit the live books and feed the VAT
return — confirm the payload before posting.
For real codes, load the company profile (
elnora-merit profile sync→company-profile.jsoninMERIT_REFERENCES_DIR): revenue accounts, VAT guids, customers. Conventions the codes don't capture (the next invoice number, customer specifics) come from your prose books reference if you keep one. Load what applies before building a payload.
InvoiceNo is required and must be unique; read your last
number (sales-invoices find --inv-no … or your books reference) and increment.
Never guess silently — confirm the number with the user.TaxId, not a percentage. Get the guid from
elnora-merit taxes list (each row: Id, Code like 24%, TaxPct). Put that
TaxId on every InvoiceRow, and repeat it in the top-level TaxAmount array
(grouped + summed per TaxId). TotalAmount is the net without VAT.delete <id> (requires the user's go-ahead) and create
it again. Do not conclude the change is impossible: the UI edits invoices in
place, keeping the number, dates and payment. Before proposing delete-and-recreate
for a field-level fix (wrong customer, typo in a line), say so and let the user
decide — the UI route is almost always the better one. See
reference/paid-invoices.md.Id; only
create a new one when none matches. customers list MUST be filtered.400, "Tasutud arvet ei
saa kustutada. Enne kustutage makse.") and, in the UI, any change of customer,
currency or currency rate ("Arve on juba tasutud. Ei saa muuta klienti, valuutat ja
valuutakurssi ega vähendada summat."). The payment must come off first. Full
procedure: reference/paid-invoices.md.# find (ALWAYS filter — unfiltered customers list returns a server error)
elnora-merit customers list --name "Acme" # broad match
elnora-merit customers list --reg-no 12345678 # exact
elnora-merit customers list --vat-reg-no EE123456789
If none matches, create one. Required: Name (unique), CountryCode (2-letter),
NotTDCustomer (lowercase "true"/"false" — true for private persons and foreign
companies, false for a domestic tax-registered company):
elnora-merit customers create --data '{"Name":"Acme OÜ","CountryCode":"EE",
"NotTDCustomer":"false","RegNo":"12345678","VatRegNo":"EE123456789",
"Email":"[email protected]","PaymentDeadLine":14,"SalesInvLang":"EN"}'
For an EU customer, set the real CountryCode and VatRegNo (Merit validates EU VAT
via VIES). The invoice language is a customer property (SalesInvLang), not a setting.
Two fields bite later, so get them right now:
Email is where send-email silently sends every future invoice. An address
someone typed in a message is not a verified address. If a send to it bounces, fix the
customer record — don't just work around it for one invoice, or the next invoice
bounces too and nobody notices. Never guess a variant of a bounced address: an invoice
is a financial document and the guess may belong to a stranger.PaymentDeadLine sets the due date on every invoice for this customer, and it
re-derives the due date if the invoice is later re-saved against them. See
reference/paid-invoices.md.Read the full field schema with elnora-merit sales-invoices create --help, or
reference/fields.md. Build the body and post:
elnora-merit sales-invoices create --file invoice.json
Minimum viable body (existing customer, one line, standard VAT):
{
"Customer": { "Id": "<customer-guid>" },
"InvoiceNo": "2026-014",
"DocDate": "20260606000000",
"DueDate": "20260620000000",
"InvoiceRow": [
{ "Item": { "Code": "CONSULT", "Description": "Consulting", "Type": 2 },
"Quantity": 1, "Price": 1000.00, "TaxId": "<taxid-from-gettaxes>" }
],
"TaxAmount": [ { "TaxId": "<same-taxid>", "Amount": 240.00 } ],
"TotalAmount": 1000.00
}
YYYYMMDDHHMMSS; query dates (list) are YYYYMMDD.Item.Type: 1 stock, 2 service, 3 item. Price is net per unit.create-v2 instead when you tag dimensions (cost centre / project / department
as a Dimensions array) or need a non-local CurrencyRate.{ CustomerId, InvoiceId, InvoiceNo, RefNo, NewCustomer }. RefNo
(viitenumber) is auto-derived from the number if you omit it.Standard/Pro have no dedicated prepayment document — bill prepayments through a prepayment service item mapped to a "prepayments received" revenue account, at the standard VAT rate (VAT is due at prepayment). On the final invoice, add the goods/service lines and a closing line for the same prepayment item at quantity −1 and price = the net prepayment, which nets it off. (Your books reference names the exact item + account.)
Use create-credit: re-send the original invoice's payload with negative Quantity
(and negative DiscountAmount/TotalAmount if discounted). TaxAmount.Amount stays
positive. For stock items, ItemCostAmount is required.
elnora-merit sales-invoices create-credit --file credit.json
elnora-merit sales-invoices find --inv-no 2026-014 # by number, no period
elnora-merit sales-invoices find --cust-name "Acme" # by customer
elnora-merit sales-invoices list --period-start 20260101 --period-end 20260331 # max 3 months
elnora-merit sales-invoices get <SIHId> # full header + lines + payments
elnora-merit sales-invoices get-pdf <SIHId> # { FileName, FileContent base64 }
Recording the receipt of a sales invoice (marking it paid) is a payments operation —
see the merit-payments-bank skill (payments create, which matches by customer name).
elnora-merit sales-invoices send-email <SIHId> # PDF invoice, e-mailed by Merit
elnora-merit sales-invoices send-einvoice <SIHId> # structured e-invoice; 'api-noeinv' if recipient can't receive
send-email sends a real e-mail to a real customer the moment it returns, and there is
no undo. Confirm with the user before calling it, exactly as you would before create.
send-email mails the invoice with the PDF attached and a covering message. Neither
is built here: both come from the mail template stored in Seadistused → Üldised
seadistused → E-posti seadistused. The stock Müügiarve template ships with PDF
attachment enabled and body text in ET/EN/FI/RU; Merit picks the language from the
customer's SalesInvLang. So "send the invoice with the PDF attached" is just
send-email <SIHId> — don't go looking for an option, and don't rebuild the PDF yourself.
--deliv-note is not a delivery option. It sends the document without prices as a
delivery note (saateleht). Never pass it when you mean "send the invoice".
send-email needs a default sender address saved under Seadistused → Üldised
seadistused → E-posti seadistused → "Saatja e-post" (plus the send method above it).
That setting is company-wide and lives only in the UI — no API or CLI writes it. Until
it's filled, the API rejects every send:
400 {"Message":"Müügiarve seadistustes saatja e-mail täitmata"}
Read that error literally: it is about your own sender address in settings, not about
the customer. It does not mean the customer's e-mail is missing, and adding a recipient
address will not fix it. Open the settings page and look before diagnosing — the field is
named Saatja e-post and is the only sender field in the whole settings app.
Recipient-side and id-side problems surface as different errors, so use them to tell the cases apart rather than guessing:
| Error | Cause |
|---|---|
Müügiarve seadistustes saatja e-mail täitmata | Your default sender is empty in settings |
Sellise id-ga dokument puudub | Bad SIHId — the id is checked before any mail config |
The recipient is always the customer's stored Email; the API takes no per-send
address. To send elsewhere, fix the customer record (see the Email warning above) — or
use the fallback.
get-pdf <SIHId> returns FileContent as base64 — decode it to
a file and attach it to a normal e-mail. Use this when the customer needs a different
address or a covering note the template can't express.customers list unfiltered — Merit returns a server stacktrace.TaxId guid from taxes list, and
mirror it in TaxAmount.merit-reverse-charge.create/create-credit/delete. Respect closed periods.delete <id> is irreversible — only on a record the user named.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sales-invoices, invoicing, merit-aktiva, elnora-merit, vat, credit-notes
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