Skip to main content

StockMovement

A movement of stock: a receipt, issue, transfer or adjustment.

type StockMovement {
availableQuantity: Float
balanceQuantity: Float
batchNumber: String
cost: Float!
costingMethod: String
createdAt: DateTime!
fromWarehouse: Warehouse
id: ID!
movementNumber: String!
notes: String
onHandQuantity: Float
performedAt: DateTime
performedBy: String!
performedByUser: User!
product: Product!
quantity: Float!
quantityAfter: Float
quantityBefore: Float
reason: String
referenceId: ID
referenceType: String
reservedQuantity: Float
serialNumber: String
status: MovementStatus!
toWarehouse: Warehouse
totalCost: Float!
type: MovementType!
unitCostAfter: Float
unitCostBefore: Float
uom: UnitOfMeasure!
updatedAt: DateTime!
valueChange: Float
variant: ProductVariant
}

Fields​

StockMovement.availableQuantity ● Float scalar​

Current AVAILABLE stock (on hand minus reserved) for this item at the movement's affected warehouse. Warehouse-scoped, summed across bins/batches/serials, reflects NOW.

StockMovement.balanceQuantity ● Float scalar​

Stock on hand at the movement's affected warehouse immediately AFTER this movement — a running ledger balance (anchored to current stock, walked back through newer movements). Null when the movement has no resolvable warehouse.

StockMovement.batchNumber ● String scalar​

The batch number of the stock.

StockMovement.cost ● Float! non-null scalar​

The cost of one unit the stock moved at.

StockMovement.costingMethod ● String scalar​

Costing method in force when this movement was costed (FIFO | LIFO | AVERAGE). Recorded per-movement so changing the org setting cannot restate history.

StockMovement.createdAt ● DateTime! non-null scalar​

When the record was created.

StockMovement.fromWarehouse ● Warehouse object​

The warehouse the stock leaves.

StockMovement.id ● ID! non-null scalar​

The unique ID of this record.

StockMovement.movementNumber ● String! non-null scalar​

The movement number, unique within the organization.

StockMovement.notes ● String scalar​

Notes about the movement.

StockMovement.onHandQuantity ● Float scalar​

Current stock on hand for this item at the movement's affected warehouse. Warehouse-scoped and summed across bins/batches/serials — reflects the level NOW, not the balance at the time of the movement.

StockMovement.performedAt ● DateTime scalar​

When the movement was done.

StockMovement.performedBy ● String! non-null scalar​

The ID of the user who did the movement.

StockMovement.performedByUser ● User! non-null object​

The user who did the movement.

StockMovement.product ● Product! non-null object​

The product moved.

StockMovement.quantity ● Float! non-null scalar​

The quantity moved.

StockMovement.quantityAfter ● Float scalar​

Stock on hand for this line immediately after the movement.

StockMovement.quantityBefore ● Float scalar​

Stock on hand for this line immediately before the movement.

StockMovement.reason ● String scalar​

Why the movement was made.

StockMovement.referenceId ● ID scalar​

The ID of that document.

StockMovement.referenceType ● String scalar​

The kind of document that caused the movement, for example a sales order.

StockMovement.reservedQuantity ● Float scalar​

Current RESERVED stock (committed to open orders) for this item at the movement's affected warehouse. Warehouse-scoped, summed across bins/batches/serials, reflects NOW. Reservations are not stock movements — this is why on-hand and available differ.

StockMovement.serialNumber ● String scalar​

The serial number of the stock.

StockMovement.status ● MovementStatus! non-null enum​

The status of the movement.

StockMovement.toWarehouse ● Warehouse object​

The warehouse the stock goes to.

StockMovement.totalCost ● Float! non-null scalar​

The cost of the whole movement.

StockMovement.type ● MovementType! non-null enum​

The kind of movement.

StockMovement.unitCostAfter ● Float scalar​

Unit cost the line carries after the movement. On a cost adjustment this is the entered New Cost.

StockMovement.unitCostBefore ● Float scalar​

Unit cost the line carried before the movement.

StockMovement.uom ● UnitOfMeasure! non-null object​

The unit of measure of the quantity.

StockMovement.updatedAt ● DateTime! non-null scalar​

When the record was last changed.

StockMovement.valueChange ● Float scalar​

Signed change in the line's total value. For an outbound movement this is the negated COGS the cost layers actually gave up — under FIFO/LIFO that is NOT quantity × average cost.

StockMovement.variant ● ProductVariant object​

The variant moved.

Returned By​

adjustInventory mutation ● createStockMovement mutation ● stockMovement query ● transferInventory mutation

Member Of​

Inventory object ● PaginatedStockMovements object