# StockCardChange type


One real change of a stock card's figures. Requires the `stockCard.read` permission. A change that
no figure of a record shows, for example a reservation that moves between two orders of one
external source, is not a record.

## Fields

### id

`ID!`

The record's id: opaque and unique, increasing in the order the records were written. Resume
with a cursor, never with an id.

### warehouseId

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

The warehouse's MAX id.

### variantId

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

The product variant's MAX id.

### warehouse

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

The warehouse. Requires the `warehouse.read` permission. Without it, the field is null with a
`FORBIDDEN_ROLE` error at its path, and the rest of the record is returned.

### productVariant

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

The product variant. Requires the `item.read` permission. Without it, the field is null with a
`FORBIDDEN_ROLE` error at its path, and the rest of the record is returned.

### version

`Int!`

The record's version: 1, 2, 3 … per card, without gaps. Compare it with `StockCard.version`.

### occurredAt

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

When MAX recorded the change.

### origin

[`StockCardChangeOrigin!`](/chameleoon-max/type/stock-card-change-origin)

How MAX found the change.

### quantityChanged

`Boolean!`

Whether `quantity` changed.

### reservedChanged

`Boolean!`

Whether `reserved` changed.

### reservedBySourceChanged

`Boolean!`

Whether `reservedBySource` changed.

### availableChanged

`Boolean!`

Whether `available` changed.

### advisedChanged

`Boolean!`

Whether `advised` changed.

### onOrderChanged

`Boolean!`

Whether `onOrder` changed.

### waitingChanged

`Boolean!`

Whether `waiting` changed.

### waitingBySourceChanged

`Boolean!`

Whether `waitingBySource` changed.

### current

[`StockFigures!`](/chameleoon-max/type/stock-figures)

The figures after this change.

### previous

[`StockFigures`](/chameleoon-max/type/stock-figures)

The figures before this change. Null when no earlier figures were known.

## Used by

- [`StockCardChangeConnection`](/chameleoon-max/type/stock-card-change-connection)
- [`StockCardChangeEdge`](/chameleoon-max/type/stock-card-change-edge)
