# GetManufacturingCostSummary

## Overview

GetManufacturingCostSummary returns one production order's cost baseline, actual accumulation, variance breakdown, and settlement-review status for supervisors or finance reviewers.

## Business Rules

- Cost-summary or production-order reference is required.
- The query returns collecting, pending-review, reviewed, or settled summaries.
- The response includes planned versus actual totals and variance lines by category.
- Reviewed and settled summaries include reviewer or acknowledgment traceability.
- Each variance line retains its mapped downstream variance-account reference.

## Process Flow

```mermaid
flowchart TD
    A[Receive summary or production-order reference] --> B[Load cost summary and variance lines]
    B --> C{Summary found?}
    C -->|No| D[Return COST_SUMMARY_NOT_FOUND]
    C -->|Yes| E[Return cost summary detail]
```

## External Dependencies

- None

## Error Scenarios

- **COST_SUMMARY_NOT_FOUND**: Referenced cost summary does not exist

## Test Cases

- returns a collecting cost summary with planned and actual totals
- returns a reviewed cost summary with variance lines
- returns a settled cost summary with acknowledgment traceability
- returns variance lines with downstream account references
- returns error when the cost summary does not exist
