ReceiptAdvice type
A receipt advice: an announcement of goods expected to arrive in one warehouse, such as a supplier's announced delivery. The advice itself moves no stock. The receipts that answer it do, and its progress is read off them.
Fields
id
The advice's MAX id.
number
String
The advice's number (PP-…), set when it opens. Null on a DRAFT.
kind
The kind of document the advice is based on.
status
The advice's stored status.
state
The advice's status and what arrived, combined. MAX computes it only when you select it.
supplierId
The supplier's MAX id.
supplier
The supplier. Requires the partner.read permission. Without it, null with FORBIDDEN_ROLE
at its path, and the rest of the response is returned.
warehouseId
The MAX id of the warehouse the goods are coming into.
warehouse
The warehouse the goods are coming into.
- Requires the
warehouse.readpermission. Without it, the field is null with aFORBIDDEN_ROLEerror at its path (extensions.permission). - Outside your API key's warehouse scope, the field is null with a
FORBIDDEN_SCOPEerror at its path (extensions.scopeWAREHOUSE). - In both cases the rest of the response is returned.
legalEntityId
The MAX id of the legal entity (the company) the advice is filed under. Null only on an older draft.
supplierReference
String
The supplier's delivery note number or invoice number.
advisedAt
The advice's own date.
expectedAt
When the goods are due.
currencyCode
String!
The ISO 4217 code of the advice's currency.
pricesIncludeVat
Boolean!
Whether the line prices include VAT.
note
String
A note for the people who receive the goods.
openedAt
When the advice was opened. Null on a DRAFT.
closedAt
When the advice was closed. Null unless it is closed.
cancelledAt
When the advice was cancelled. Null unless it is cancelled.
lines
Arguments:
first:Intafter:Stringlast:Intbefore:String
The announced lines, by line number.
- A connection, paged with
first/afterorlast/before, at most 250 a page. - Null, with an error at its path, when its page cannot be read, for example because of a cursor of another parent. The rest of the response is returned.
- A page costs 2 + first (or last) × the cost of one node.
parameters
Arguments:
first:Intafter:Stringlast:Intbefore:String
The advice's text parameters, in name order.
- A connection, paged with
first/afterorlast/before, at most 250 a page. - Null, with an error at its path, when its page cannot be read, for example because of a cursor of another parent. The rest of the response is returned.
- A page costs 2 + first (or last) × the cost of one node.
progress
How far the work on the advice is, read off its receipts. A line is done when it arrived within the tolerance or its difference is resolved. MAX reads it for every advice of the page at once.
receipts
Arguments:
first:Intafter:Stringlast:Intbefore:String
The receipts that answer the advice, newest effective first.
- A connection, paged with
first/afterorlast/before, at most 250 a page. - Draft receipts are never listed; they are counted in
progress. - Also requires the
receipt.readpermission. Without it, null withFORBIDDEN_ROLEat its path. - Null, with an error at its path, when its page cannot be read, for example because of a cursor of another parent. The rest of the response is returned.
- To filter them, use
receiptswithfilter: {receiptAdviceIds}. - A page costs 2 + first (or last) × the cost of one node.