# 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

[`UUID!`](/chameleoon-max/type/uuid)

The advice's MAX id.

### number

`String`

The advice's number (`PP-…`), set when it opens. Null on a `DRAFT`.

### kind

[`ReceiptAdviceKind!`](/chameleoon-max/type/receipt-advice-kind)

The kind of document the advice is based on.

### status

[`ReceiptAdviceStatus!`](/chameleoon-max/type/receipt-advice-status)

The advice's stored status.

### state

[`ReceiptAdviceState!`](/chameleoon-max/type/receipt-advice-state)

The advice's status and what arrived, combined. MAX computes it only when you select it.

### supplierId

[`UUID!`](/chameleoon-max/type/uuid)

The supplier's MAX id.

### supplier

[`Partner`](/chameleoon-max/type/partner)

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

[`UUID!`](/chameleoon-max/type/uuid)

The MAX id of the warehouse the goods are coming into.

### warehouse

[`Warehouse`](/chameleoon-max/type/warehouse)

The warehouse the goods are coming into.

- Requires the `warehouse.read` permission. Without it, the field is null with a
  `FORBIDDEN_ROLE` error at its path (`extensions.permission`).
- Outside your API key's warehouse scope, the field is null with a `FORBIDDEN_SCOPE` error at
  its path (`extensions.scope` `WAREHOUSE`).
- In both cases the rest of the response is returned.

### legalEntityId

[`UUID`](/chameleoon-max/type/uuid)

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

[`Time!`](/chameleoon-max/type/time)

The advice's own date.

### expectedAt

[`Time`](/chameleoon-max/type/time)

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

[`Time`](/chameleoon-max/type/time)

When the advice was opened. Null on a `DRAFT`.

### closedAt

[`Time`](/chameleoon-max/type/time)

When the advice was closed. Null unless it is closed.

### cancelledAt

[`Time`](/chameleoon-max/type/time)

When the advice was cancelled. Null unless it is cancelled.

### lines

[`ReceiptAdviceLineConnection`](/chameleoon-max/type/receipt-advice-line-connection)

Arguments:

- `first`: `Int`
- `after`: `String`
- `last`: `Int`
- `before`: `String`

The announced lines, by line number.

- A connection, paged with `first`/`after` or `last`/`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

[`ParameterConnection`](/chameleoon-max/type/parameter-connection)

Arguments:

- `first`: `Int`
- `after`: `String`
- `last`: `Int`
- `before`: `String`

The advice's text parameters, in name order.

- A connection, paged with `first`/`after` or `last`/`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

[`InstructionProgress!`](/chameleoon-max/type/instruction-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

[`AdviceReceiptConnection`](/chameleoon-max/type/advice-receipt-connection)

Arguments:

- `first`: `Int`
- `after`: `String`
- `last`: `Int`
- `before`: `String`

The receipts that answer the advice, newest effective first.

- A connection, paged with `first`/`after` or `last`/`before`, at most 250 a page.
- Draft receipts are never listed; they are counted in `progress`.
- Also requires the `receipt.read` permission. Without it, null with `FORBIDDEN_ROLE` at 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 [`receipts`](/chameleoon-max/query/receipts) with `filter: {receiptAdviceIds}`.
- A page costs 2 + first (or last) × the cost of one node.

## Used by

- [`cancelReceiptAdvice`](/chameleoon-max/mutation/cancel-receipt-advice) (mutation)
- [`receiptAdvice`](/chameleoon-max/query/receipt-advice) (query)
- [`CreateReceiptAdviceResult`](/chameleoon-max/type/create-receipt-advice-result)
- [`Receipt`](/chameleoon-max/type/receipt)
- [`ReceiptAdviceConnection`](/chameleoon-max/type/receipt-advice-connection)
- [`ReceiptAdviceEdge`](/chameleoon-max/type/receipt-advice-edge)
- [`UpdateReceiptAdviceResult`](/chameleoon-max/type/update-receipt-advice-result)
