# ReceiptLine type


One product received.

## Fields

### id

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

The line's MAX id.

### lineNo

`Int!`

The line's number within the receipt.

### productVariantId

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

The MAX id of the product variant.

### productVariant

[`ProductVariant`](/chameleoon-max/type/product-variant)

The product variant the line moves. Requires the `item.read` permission. Without it, the
field is null with a `FORBIDDEN_ROLE` error at its path (`extensions.permission`), and the rest
of the response is returned.

### product

[`Product`](/chameleoon-max/type/product)

The variant's parent product. Requires the `item.read` permission. Without it, the field is
null with a `FORBIDDEN_ROLE` error at its path (`extensions.permission`), and the rest of the
response is returned.

### quantity

[`Decimal!`](/chameleoon-max/type/decimal)

The quantity in `unit`, as entered.

### unit

`String!`

The unit code of `quantity`.

### baseQuantity

[`Decimal!`](/chameleoon-max/type/decimal)

The quantity in `baseUnit`.

### baseUnit

`String!`

The code of the product's base unit ([`Product`](/chameleoon-max/type/product)).

### unitCost

[`Decimal`](/chameleoon-max/type/decimal)

The cost per base unit at which the goods entered stock, without VAT. It is the line's price,
or the valuation area's average cost when the line carries no price. For a `STOCKTAKE` receipt
(see `origin.kind`) it is always the area's average.

Null in these cases:

- While costing is pending.
- On an exploded set line. Its value is its components' value, and they have no single price
  per set.
- On the lines of a cancelled receipt.

When the receipt's company does not value its stock in MAX it is 0, never pending, and means
nothing; read `unitPrice` instead.

### unitPrice

[`Decimal`](/chameleoon-max/type/decimal)

The purchase price recorded on the line, per `unit` (as entered), in the receipt's
`pricesCurrencyCode`, with or without VAT as the receipt's `pricesIncludeVat` says: the receipt
advice's price, or one set in MAX. Only a company that records purchase prices and does not
value its stock in MAX has one; MAX computes nothing from it. Null when none is recorded.

### vatPercent

[`Decimal`](/chameleoon-max/type/decimal)

The VAT rate of `unitPrice`, in percent. Null when none is recorded.

### value

[`Decimal`](/chameleoon-max/type/decimal)

The line's value, without VAT. Null while costing is pending. A completed receipt can still be
pending, so read it again later. 0, never pending, when the receipt's company does not value
its stock in MAX.

A line of an `OPEN` receipt that is not yet applied to stock has `value` null and
`costingPending` `false`, and is not counted in `totalValue`.

### costingPending

`Boolean!`

`true` while any of the line's stock movements waits to be costed. A completed receipt can
still be pending, so read it again later. `false` for a line of an `OPEN` receipt that is not
yet applied to stock; its `value` is null and it is not counted in `totalValue`. Always `false`
when the receipt's company does not value its stock in MAX.

### lot

[`Lot`](/chameleoon-max/type/lot)

The batch or serial number received, when the product tracks one.

### locationCode

`String`

The location the goods were put to, when the warehouse tracks locations.

### receiptAdviceLineId

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

The MAX id of the receipt advice line this line answers. Requires the `advice.read`
permission. Without it, null with `FORBIDDEN_ROLE` at its path. Null, without an error, when
the advice is outside your API key's scope.

### receiptAdviceLine

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

The receipt advice line this line answers.

- Requires the `advice.read` permission. Without it, null with `FORBIDDEN_ROLE` at its path.
- Null, without an error, when the advice is outside your API key's scope.
- The rest of the response is returned.

## Used by

- [`AdviceReceiptLineConnection`](/chameleoon-max/type/advice-receipt-line-connection)
- [`AdviceReceiptLineEdge`](/chameleoon-max/type/advice-receipt-line-edge)
- [`ReceiptLineConnection`](/chameleoon-max/type/receipt-line-connection)
- [`ReceiptLineEdge`](/chameleoon-max/type/receipt-line-edge)
