Purchase orders: make, approve, receive
purchase_orderPurchase orders, as the card on Prices. Read: action=list (limit), view (number). action=make (supplier, lines: BAR-1 x 100 @ 0.80, CUP-1 x 10 @ 2.50, day, warehouse: where it is delivered, note): where the company's switch holds it stands as Awaiting approval for the named approver: no PDF, no goods in, no bill until then. action=approve (number): the named approver's own connection only. action=reject (number, reason). action=receive (number, day, best_before, batch, rate): the goods go in on release, in the books' currency: an order in another currency at rate (1 unit of the order's currency in the books' currency) or the day's rate on file. action=close (number, reason). action=pdf_link (number): the page to download it. Round 860: a line names a product or says in words what is ordered (Design work x 5 @ 80; only a product's line goes into stock); round 1097: a product with a purchase unit is ordered in it at the price of one (CHOC x 5 cases @ 30: 5 cases of 12 receive 60 units at 2.50; CHOC x 60 each @ 2.50 orders units); currency (three letters) on make, else the books' own; action=send (number, email optional: else the supplier's remittance email; again=true mails it once more): the PDF by mail. Round 913: action=landed (number, freight, duty in the order's currency, spread value or quantity) sets the expected freight and duty before the goods arrive; view and list give each product line expected_landed_unit (the price plus its share) and, once received, landed_unit (the batch's actual landed cost: unit cost plus freight or duty bills put on it). Round 1096: action=receive takes quantities {line: pieces} for a part receipt (the rest stays open; left out: all that is open). Each receipt posts the goods to stock against goods received not invoiced; the order's bill clears it, a bill at another price puts the difference on the stock still on hand and on purchase price variance for goods sold. action=receipts (number): each receipt with its id, pieces, value, billed. action=undo_receipt (receipt: the id) proposes the undo, released as the owner's switches say: the pieces leave stock from their batch and the posting is reversed (refused once a bill covers it or the pieces have left stock). action=ship (number, day, arrives, reference): the supplier dispatched the goods, in transit until received; action=unship takes it back; action=in_transit lists them with their value. action=not_invoiced (day: as at, left out today): goods received not invoiced per receipt, the total and the account's balance. Round 1105, landed cost lines (Unleashed's order costs): action=cost_add (number, supplier: who bills it, any part of the name or code, amount, currency, rate: 1 unit in the books' currency, left out the day's, reference, spread value or quantity, note: the cost type, Freight, Duty, Handling or Insurance) keeps a line kept at once; costs (number) lists them with their bill; cost_remove (number, receipt: the line number) takes a line off while it has no bill; cost_bill (number, receipt: a line, left out all) makes each line its supplier's bill, awaiting approval as every bill. The receipt of the goods does the same for every line without a bill. Once the bill is posted its net in the books' currency is spread over the order's batches. action=suppliers (supplier: any part of the name or code, may be empty): the suppliers on file with their currency and the day's rate, as the order form suggests them. Round 1106, supplier returns: action=returnable (number): each receipt with what is left of its batch; action=return (number, return_lines [{receipt or batch or product, quantity}], reason (one of action=return_reasons), note, day, warehouse, idempotency_key): the goods leave stock from their batch at its cost, Dr goods received not invoiced, Cr stock; billed goods wait for the supplier's credit note, which is matched to the return when it is posted against the order (action=return_credit with receipt: the return's id gives the credit note's body for bill_entry). Without the right to post the return is recorded and a person posts it (action=return_post). action=returns (number optional): every return with its state, earlier_credits: credit notes posted before the goods went back; action=return_match (receipt: the return's id, reference: the credit note's reference) matches one; action=return_undo (receipt: the return's id); action=return_reasons: the company's reasons (reasons: a list replaces them).
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": {
"action": "<action>"
},
"name": "purchase_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| day | No | ||
| duty | No | ||
| note | No | ||
| rate | No | ||
| again | No | ||
| batch | No | ||
| No | |||
| limit | No | ||
| lines | No | ||
| action | Yes | ||
| amount | No | ||
| number | No | ||
| reason | No | ||
| spread | No | ||
| arrives | No | ||
| company | No | ||
| freight | No | ||
| reasons | No | ||
| receipt | No | ||
| currency | No | ||
| supplier | No | ||
| reference | No | ||
| warehouse | No | ||
| quantities | No | ||
| best_before | No | ||
| return_lines | No | ||
| idempotency_key | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||