Rails 24:00 Orvane Home & Outdoor

← Definitions

Stock on hand stock_on_hand

Units in the warehouses. The canonical answer is what can be sold (on hand minus reserved for open orders); the physical count is the other definition.

Parameters: none

Test results

meaningtestpassedobservedexpected
availablevalue_betweenpassed2001068between 100000.0 and 10000000.0
physicalvalue_betweenpassed2208116between 100000.0 and 10000000.0

available · v1 · head of fulfilment

On hand minus reserved, per product and warehouse, where positive.

Changed 2026-10-12: Agreed with the owner.

SELECT product_id, warehouse_id, on_hand - reserved AS units FROM stock_levels WHERE on_hand - reserved > 0

Tests: value_between

physical · v1 · head of fulfilment

The physical count on the shelves, per product and warehouse.

Changed 2026-10-12: Agreed with the owner.

SELECT product_id, warehouse_id, on_hand AS units FROM stock_levels WHERE on_hand > 0

Tests: value_between