# ManufacturingCostLine

## Description

ManufacturingCostLine stores one planned-versus-actual cost entry within a ManufacturingCostSummary. It owns the cost type category, planned amount frozen at release, and accumulated actual amount updated through execution evidence.

## Domain Model Definitions

### Model type

Standard

### Command Definitions

- [releaseProductionOrder](../command/ReleaseProductionOrder.md) - Initialize planned cost lines when the production order is released.
- [recordInventoryIssueOutcome](../command/RecordInventoryIssueOutcome.md) - Update actual material amounts on cost lines from inventory-valued outcomes.
- [reviewManufacturingCostSummary](../command/ReviewManufacturingCostSummary.md) - Recalculate and freeze variance context that references planned versus actual cost lines.

### Query Definitions

- [getManufacturingCostSummary](../query/GetManufacturingCostSummary.md) - Retrieve cost lines as part of the parent manufacturing cost summary.
- [listManufacturingCostSummariesByStatus](../query/ListManufacturingCostSummariesByStatus.md) - List summaries whose cost lines appear in review or settlement queues.

### Models

- ManufacturingCostLine

### Invariants

- Every ManufacturingCostLine belongs to exactly one ManufacturingCostSummary.
- `costType` identifies one cost category such as `MATERIAL`, `LABOR`, `MACHINE`, or `OVERHEAD`.
- `plannedAmount` is frozen at production-order release and never recomputed from later master-data changes.
- `actualAmount` accumulates from execution evidence only while the parent summary is in `COLLECTING`.

### Relationships

- **Belongs To ManufacturingCostSummary**: each line is subordinate to one [ManufacturingCostSummary](./ManufacturingCostSummary.md).
