Issue credit note
issue_credit_noteCreates a credit note for an already delivered invoice or partial discount, returning the PDF path and refund amounts.
Instructions
Issue a credit note (opravný daňový doklad / dobropis) for an issued invoice: PDF/A-3 with ISDOC (DocumentType 2), no QR code, with the next number in the regular series. Returns the PDF path and the reduction (base, VAT, total to refund).
Use it instead of cancel_invoice when the invoice was already delivered, or for a partial discount. Amounts on the document are positive; overviews and the VAT return subtract them in the period of the credit-note date. Side effects: writes ~/Documents/Účetnictví/Vydané faktury/<YY_MM_vydane>/dobropis_.pdf and a ledger record. Not idempotent: each call creates another credit note, but the total credited can never exceed the original's base. Fails if the original is unknown, cancelled or itself a credit note. Currency and exchange rate are taken from the original (no network). Confirm with the user first; then draft_invoice_email can send it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"original_number": "<original_number>",
"reason": "<reason>"
},
"name": "issue_credit_note"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | Partial credit only: the reductions as POSITIVE amounts (vat_rate omitted = the original's first-line rate). Omitted = credit the whole invoice. | |
| reason | Yes | Reason for the correction, printed on the document, e.g. 'sleva za zpoždění dodávky'. | |
| issue_date | No | Credit note date = correction date and its DUZP, YYYY-MM-DD; not before the original's issue date. Omitted = today. | |
| original_number | Yes | Number of the issued invoice being corrected, e.g. '2610001'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |