Cancel invoice
Cancel (stornieren) a finalised invoice. The number stays blocked.
MCP tool lexware_office_write → cancel_invoice
Opens Weitere Aktionen > Stornieren on an open invoice. The original shows a Storno stamp and its booking is reversed, and the cancellation cannot be undone; the cancelled number stays blocked even if you change the number range. A paid invoice needs its payment deleted first, and the restricted role "Belege, Kontakte & Produkte" cannot cancel paid invoices. Use create_invoice for the corrected one. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| document_id string required | string | Document ID from list_documents or create_invoice. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lexware_office_write",
"arguments": {
"operation": "cancel_invoice",
"arguments": {
"document_id": "document_8c41d2"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"document_id": "d_9c31be",
"number": "RE1031",
"status": "voided"
},
"isError": false
}