File a pending draft recording a customer refund on a money-out bank line (a person approves in Taokeh)
create_customer_refund_draftFiles a pending draft of Refund on a credit note with credit left, or on an overpaid invoice: the money the company already paid back to the customer, recorded on the money-out bank line it went out on. It never pays anything: the line is already on an imported bank statement. 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 A/R, Cr the bank) and the credit left goes down by it; the line is matched. A line already posted to the customer 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 invoice already used, a line over the credit left, a money-in line, a line already matched, 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. A refund paid from the cash drawer has no bank line: it is recorded with Refund from Cash on the credit note's Refund page.
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": {
"saleId": "<saleId>",
"bankTransactionId": "<bankTransactionId>"
},
"name": "create_customer_refund_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | A short note for the reviewer: where the figures came from. | |
| saleId | Yes | The credit note with credit left, or the overpaid invoice, from search_documents. | |
| needsReview | No | true flags the draft for the reviewer. | |
| bankTransactionId | Yes | The money-out bank line the refund went out on, from bank_review_queue. |