List discharge candidates
list-discharge-candidatesThe open invoices or bills a payment or bank line may settle, best match first.
WHEN TO USE:
Before committing a bank line that pays a bill or collects an invoice: a person picks the items it settles from these
"Which invoice does this deposit pay?"
PARAMETERS:
event_id (required): the payment or bank line
RETURNS:
event_id, kind (receivables for money in, payables for money out), amount_cents, classified_to_control (whether the line is classified to a receivables or payables account), and candidates: the open items of the line's own entity and counterparty at its date, an exact amount match first, then the oldest due date, each with its open_cents, due date and days past due.
NOTES:
Settling is a person's choice: record it on the commit with
discharge_allocations: [{obligation_event_id, amount}]onupdate-event-block, several for a split. A line with no pick commits as it is, and its bill stays open
RELATED TOOLS:
update-event-block — commit the line with its settlement
aged-balances — every open item, aged
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": {
"event_id": "<event_id>"
},
"name": "list-discharge-candidates"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_id | Yes | The payment or bank line (event id). |