Skip to content

How stock is counted

Stock is never edited. Every receipt, issue, transfer, hold and release is a recorded movement, and the quantities on screen are what those movements add up to.

A stock position is identified by six things: product, location, lot, owner, restriction and reservation. Any difference in any of them is a different row — the same product in the same bin appears twice if half of it is on a quality hold, or if half of it belongs to a supplier.

  • Owner is always set: your own company for your goods, the consignor for consignment stock.
  • A lot belongs to one product, and only lot-tracked products have one.
  • A restriction describes the goods — a quality hold, a block.
  • A reservation is a claim on specific units, placed by a fulfillment order.
  • Location is where it sits. Only a storable location can hold stock.

On hand counts everything in scope. Available counts only stock that is neither restricted nor reserved.

Available is not “on hand minus restricted minus reserved”. A position can be both at once, and subtracting the two totals separately would count the overlap twice.

Quantities are in the product’s base unit, and there is no total across products.

Movement From To Effect
Receipt — a storable location adds at the destination
Issue a storable location — removes at the source
Transfer a storable location a different one removes at the source, adds at the destination

A transfer preserves every other dimension: the lot, the owner and the restriction move with the goods.

Restricted goods can be transferred and can be issued, and neither releases the restriction. Reserved goods can only be moved by the fulfillment order holding them.

Reserving writes a negative entry against the unreserved position and a positive entry carrying the reservation, at the same location. The two sum to zero: on hand does not change, only the claim. Available drops, if the goods were unrestricted to begin with.

Releasing reverses the pair. The claim lives in the balances, not in a document somebody edits.

Reserving more than is free, releasing more than is held, or issuing more than a position contains all fail the same way — the whole movement is rejected, and nothing partial is posted.

The check happens on save, against the stock as it is then. A booking can fail even though the figure on screen looked sufficient, because another movement consumed it first.

A posted movement cannot be edited, archived or deleted. Correcting a booking means posting its opposite, so both the error and the correction stay on the record.

That is also why three product settings lock once stock has moved: base unit, physical product and lot tracking. Changing any of them would reinterpret history that has already been written.

The ledger is append-only — one row per effect, naming the document that caused it. Each entry stands alone, so a filter or a page boundary can show one side of a transfer without the other.

A summary above a table always counts everything the filters select, never only the rows on screen.

Reading it is Stock and the ledger.