# StandardCost

## Description

StandardCost holds the standard unit cost of an item as append-only, versioned generations: each publication inserts the item's next version, and the current standard is the generation with the greatest version. Standards are defined per item — not per valuation policy — so items sharing a policy each carry their own standard cost. Standards apply only to items whose assigned policy uses STANDARD.

Movements are always valued at the current standard, whatever their effective date — revaluation keeps inventory balance = quantity × current standard. Receipts recognize the actual-vs-standard difference as PPV; publishing a new generation revalues on-hand stock to the new standard. Already-issued cost of goods sold is never restated.

The unit cost is stored at full precision; movement values are exact products (standard × quantity), so standard costing introduces no rounding.

## Domain Model Definitions

### Model type

AppendOnly

### Command Definitions

- [publishStandardCost](../command/PublishStandardCost.md) - Publish a new standard cost generation for an item and revalue on-hand stock

### Query Definitions

- Standard costs are resolved internally by costing; no read query yet

### Models

- StandardCost

### Invariants

- Unit cost is zero or greater
- Generations are immutable after creation; corrections are made by publishing a new generation
- Versions are unique and 1-based per item; the current standard is the generation with the greatest version
- A publication takes effect immediately; future-effective generations are not supported

### Relationships

- **References Item**: Each standard cost generation belongs to an Item from the item-management module
