Stock costing¶
A quantity alone does not say much. The module attaches a cost to every entry, then decides at which cost the exits leave: that is the costing method.
Two methods, and one absence¶
The module knows two methods:
- FIFO — first in, first out. An exit leaves at the cost of the batch it consumes. Two receptions bought at different prices go out at their respective prices, in the order they came in.
- WAC — weighted average cost. An exit leaves at the average cost of the item, recomputed on every entry.
A third value, None, only means that no method has been chosen at that level; it is not a method. The settings of the module refuse to save it, and a non-storable item carries no other.
Where the method is decided¶
The method is read from the most precise to the most general, and the first level that declares one wins:
- the item;
- its subfamily;
- its family;
- the settings of the module, under Settings › Stock costing method.
As long as nothing has been saved in the settings, the module answers FIFO.
One general setting, local exceptions
That ordering lets you set a rule for the whole organization and depart from it only where it is justified — a family of consumables in WAC, a family of serialized parts in FIFO — without having to visit every item.
What an entry does¶
When a reception is executed, the unit cost price of the line becomes the cost of the batch created, and the WAC of the item is recomputed:
new WAC = (previous WAC × quantity already in stock + quantity received × cost of the line) ÷ (quantity already in stock + quantity received)
The quantity taken into account is the one of the item as a whole, all locations together. The computation happens on every entry, whatever method is retained for the item: the module therefore always keeps an up-to-date average cost, even when it values the exits in FIFO.
A negative line cost is refused.
What an exit does¶
To value an exit, the module retains, in that order:
- the cost entered on the line, if there is one;
- otherwise the current WAC of the item, if its resolved method is WAC;
- otherwise the cost of the batch consumed.
An internal transfer does not change the value of the stock: it takes over the cost of the batch moved.
Current cost and history¶
Two figures are read on the record of an item:
- the last cost, the one of the most recently moved batch;
- the current WAC, the result of the last average computation.
Neither of them overwrites the past. Every change of WAC is kept in the WAC history tab of the item, with its date, the old cost, the new cost, the calculation that led to it, the inventory possibly at the origin of the change, and its author — the word System when the change comes from an execution and not from a hand.
The cost of a batch follows the same logic: it may be corrected, the correction asks for a confirmation because it weighs on the stock value, and it leaves a line in the cost history of the batch, with the previous cost, the new one, the author and the inventory concerned where applicable.
Correcting a cost does not recompute the past
A cost correction holds for what follows. The movements already recorded keep the cost they carried when they were executed — that is what makes the audit trail reliable.
Changelog¶
- 1.0 (August 18, 2026): document created.