Skip to content

Inventory Model

Understanding how the system stores inventory helps you make sense of stock reports, counts, and adjustments.

A quant is a single record that says: “there are X units of item Y in bin Z (optionally under lot L)”.

Every piece of on-hand stock is represented by one or more quants. The system automatically creates, updates, and removes quants as stock moves — you never create a quant directly.

A quant is uniquely identified by the combination of:

  • Warehouse item — the specific item in a specific warehouse
  • Bin — where the stock physically is
  • Lot — for LOT-tracked items, which batch it belongs to (for BULK and SERIAL/RFID items, there is no lot)

If an item is stored in more than one bin, there will be one quant per bin. If it is a LOT-tracked item received in two different batches into the same bin, there will be one quant per lot.

Example:

ItemBinLotQuantity
Widget AA-01-01120
Widget AA-01-0280
Capsule BB-01-01LOT-240101500
Capsule BB-01-01LOT-240315300

Total on hand for Widget A: 200. Total for Capsule B: 800.


For SERIAL and RFID-tracked items, each physical unit has a serialized unit record in addition to the quant. The serialized unit holds the serial number or RFID tag and is linked to the quant that currently holds it.

  • When stock is received, one serialized unit record is created per unit
  • When stock is dispatched, the serialized unit record is deleted
  • When stock is transferred, the serialized unit record is updated to point to the new quant

The quant’s quantity for serial/RFID items always equals the number of serialized unit records linked to it.


Inventory transactions — the permanent ledger

Section titled “Inventory transactions — the permanent ledger”

Many stock changes are recorded as an inventory transaction. These records are never modified or deleted — they form an auditable ledger.

Today the standard workflows write a transaction in three cases: receiving an inbound line (goods_receipt), completing an internal transfer (bin_transfer), and applying a stock adjustment or stock-count reconciliation (system_correction). Outbound dispatch does not currently write a transaction, so the ledger is not yet a complete record of every movement — keep that in mind when reconciling outbound activity.

Each transaction records:

  • What changed (item, bin, quantity before and after)
  • Why it changed (receipt, issue, transfer, adjustment, etc.)
  • Which order or document caused it
  • Which user triggered it
  • Lot number, serial number, or RFID tag if applicable

You can view the transaction history for any item or bin at any time to see exactly how its quantity reached its current level.


TermMeaning
On handPhysical stock present in the warehouse right now (the sum of quant onHandQuantity values)
AvailableThe quantity free to be ordered
AllocatedThe quantity committed to a RESERVED outbound order

available and allocated are computed at read time, not stored. In the current implementation there is no separate reservation accounting: available always equals on hand and allocated is always 0.

Reservation does not subtract from an available figure — instead, reserving an outbound order physically moves the stock out of its source bins and into the staging/dispatch bin (it is still on hand, just in a different location). Because of this, an item’s reported available number does not drop when stock is reserved; the stock simply relocates. Plan around the physical location of stock, not around an available/allocated split.