Postman collection
Stock Read

pixiGetStockMovementForOrderline

Returns all stock movements (bin item log entries) booked for a given order line, together with the bin they refer to.

Reads the stock movement log InvBinItemLog and returns every entry whose ForOrderline equals OrderlineKey.

  • Each log entry is joined to the bin table InvBin on the bin reference (BinKey = BinRef). The join is an inner join, so log entries whose bin no longer exists in InvBin are not returned.
  • For each movement the call returns the quantity, the item reference, the employee and date of the booking, the reason and the bin data (BinKey, LocID, BinName).
  • No sort order is defined; the rows come back in the order SQL Server delivers them.
  • There is no paging; all matching rows are returned.

Notes

  • If no movement exists for the order line (or the key does not exist), an empty result set is returned; no error is raised.
  • The header comment of the procedure is a generic template text and does not describe this call.
  • The query uses no NOLOCK hints. The column types are not declared in the code and depend on the table definitions of InvBinItemLog and InvBin.
  • The sign convention of Qty (e.g. negative for outgoing stock) is not visible in the code.

Tables used

InvBinItemLog · Read InvBin · Read
SQL object:
dbo.pipiGetStockMovementForOrderline
Updated at 2026-10-30