File a pending draft recording a supplier refund on a money-in bank line (a person approves in Taokeh)
create_supplier_refund_draftFiles a pending draft of Refund on a supplier debit note with credit left, or on an overpaid bill: the money the supplier already paid back, recorded on the money-in bank line it came in on. The refund is the line's amount, up to the credit left. Nothing is posted until an admin or bookkeeper approves in Taokeh; approval records it exactly as the Refund page does (Dr the bank, Cr A/P) and the credit left goes down by it; the line is matched. A line already posted to the supplier posts nothing new: approval only matches it to the document. The result carries the amount, the credit left before and after, the bank line and the journal lines. Refused at filing and approval in the page's words: no credit left, credit the bill already used, a line over the credit left, a money-out line, a line already matched, a line dated before the debit note, a line on a foreign-currency account, a date in a locked period. A line that looks like money already in the books is refused: the person confirms a separate payment on the Refund page. A line not from a bank statement of this company is answered as not found. One refund draft per bank line waits at a time.
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": {
"purchaseId": "<purchaseId>",
"bankTransactionId": "<bankTransactionId>"
},
"name": "create_supplier_refund_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | A short note for the reviewer: where the figures came from. | |
| purchaseId | Yes | The debit note with credit left, or the overpaid bill, from search_documents. | |
| needsReview | No | true flags the draft for the reviewer. | |
| bankTransactionId | Yes | The money-in bank line the refund came in on, from bank_review_queue. |