Products

Product Cost

What the system believes a product cost you — the number every profit figure is measured against.

Last updated 2026-10-13

DigitalKey ERP — Docs · digital-key.co/docs/products/costing

Overview

Each product carries one cost (shown as Purchase Price on the product form). It is a weighted average of everything you have bought, not the price on the last invoice. Three rules keep it honest:

  • Receiving stock blends the new cost into the average — it never overwrites it.
  • A sale freezes the cost of its lines at the moment of sale.
  • Stock that comes back returns at the cost it left at.

Receiving blends the cost

When goods arrive at a different cost from what is on the shelf:

new cost = (stock × cost + received × received cost) ÷ new stock
ParameterTypeRequiredDescription
On the shelf10 × 1,000OptionalTen units held at a cost of 1,000 each — 10,000 of stock.
Received10 × 1,200OptionalTen more arrive at 1,200 each — 12,000.
After20 × 1,100OptionalTwenty units worth 22,000, so the cost becomes 1,100.
NoteReceiving never touches your selling price. If a cost rise should raise the price, that is a decision you make on the product.

A receipt line can be told to treat the cost differently — typed by hand, or left alone — and customs or transport can be added on top. See Landed Costs & Cost Mode.

A sold line keeps its cost

When a sale is made, each line is stamped with the product's cost at that moment. For a sales order the stamp happens at completion, because that is when the stock moves; a draft carries no cost yet.

TipEditing a product's cost later, or receiving stock at a new price, never rewrites the profit of a sale already made. Last month's profit and loss reads the same today as it did then.

Stock coming back

What returning units are valued at
ParameterTypeRequiredDescription
Sale voidedcost it left atOptionalThe units come back at the cost stamped on the sale line.
Order voidedcost it left atOptionalThe same, for a completed sales order.
Customer returncost it left atOptionalReturned units come back at the cost of the line they are returned against.
Invoice editedby differenceOptionalUnits taken off come back at the cost they left at; extra units leave at today's average.

Using today's average instead would make a movement and its reversal disagree, and stock value would drift with every void.

Damaged stock

A damage write-off values the lost units at the product's current average cost. Inventory falls by quantity × average and the loss booked is the same number. The loss appears in profit and loss, but it is not cash going out — the stock left, not the money.

What reads which cost

ParameterTypeRequiredDescription
Cost of goods sold, profitfrozenOptionalThe cost stamped on each sold line.
Stock value, inventory valueliveOptionalToday's average cost of what you still own.
Below-cost price checkliveOptionalA typed price is compared with today's cost.

Who can see cost

Cost prices and profit are hidden from a staff member unless the owner leaves See purchase price & profit switched on for them. Without it the cost columns disappear, and a refused below-cost price does not reveal the cost.

Cost history

NoteEvery change to a product's cost is logged — a receipt, a landed cost, a cost typed by hand, a void unwinding one, a switch to selling by the piece — with the cost before and after and the document that caused it.

Related