# MVP-SALES-001 — See today's commercial sales

## Story

As an operator, I want a persistent live ticker for today's in-system commercial sales so that I can
see service performance at a glance.

## Scenarios

### MVP-SALES-001-S01 — Gross sales increase on confirmed commercial order

- **Given** successful commercial checkout
- **When** today's local-day sales are shown
- **Then** gross total increases exactly once by the finalized gross amount
- **Evidence:** integration plus E2E.

### MVP-SALES-001-S02 — Product counts increase

- **Given** a confirmed commercial order with quantities
- **When** the ticker is calculated
- **Then** per-product counts increase by those quantities
- **Evidence:** integration plus E2E.

### MVP-SALES-001-S03 — Tablet product breakdown

- **Given** the expected roughly five-product menu
- **When** the target tablet layout renders
- **Then** per-product counts and gross total are visible in the persistent top region
- **Evidence:** tablet E2E.

### MVP-SALES-001-S04 — Kitchen labels are used

- **Given** products with explicit kitchen labels and products without them
- **When** breakdown renders
- **Then** labels are preferred and product names provide fallback
- **Evidence:** component/E2E.

### MVP-SALES-001-S05 — Non-commercial orders are excluded

- **Given** a non-commercial order finalizes
- **When** sales are recalculated
- **Then** gross total and product counts are unchanged
- **Evidence:** integration plus E2E.

### MVP-SALES-001-S06 — Fulfillment is sales-neutral

- **Given** a confirmed commercial order
- **When** it advances, reverses, or is delivered
- **Then** its sales contribution does not change
- **Evidence:** integration.

### MVP-SALES-001-S07 — Failed or unknown checkout is excluded

- **Given** checkout definitively fails or remains unknown
- **When** sales are calculated
- **Then** no gross amount or item count is added
- **Evidence:** integration plus failure-journey E2E.

### MVP-SALES-001-S08 — Rename preserves product identity

- **Given** one product has commercial sales today
- **When** it is renamed
- **Then** its underlying identity is not split into unrelated counters
- **Evidence:** integration plus failure-journey E2E.

### MVP-SALES-001-S09 — Restart does not reset today

- **Given** confirmed commercial sales today
- **When** browser session or application process restarts
- **Then** the same local-day figures are reconstructed from durable data
- **Evidence:** integration and Docker/E2E reload or restart evidence.

### MVP-SALES-001-S10 — Refunded orders excluded from commercial sales

- **Given** a commercial order that has been refunded
- **When** the refund is processed and the order status changes to Refunded
- **Then** the refunded order's amount is deducted from today's commercial sales
- **Evidence:** database/application integration test verifying refunded orders are excluded from
  sales figures

## Invariants and exclusions

This ensures commercial sales accurately reflect only unrefunded transactions.

## Implementation tasks

[MVP-TASK-033–034](../tasks/README.md#phase-8-provider-discovery-and-conditional-adapter).

- **Given** confirmed commercial sales today
- **When** browser session or application process restarts
- **Then** the same local-day figures are reconstructed from durable data
- **Evidence:** integration and Docker/E2E reload or restart evidence.

## Invariants and exclusions

This is not authoritative external accounting and has no reports/refund corrections. Responsive
total-quantity fallback is acceptable only when full breakdown is unreasonable outside the target.

## Implementation tasks

[MVP-TASK-025–027](../tasks/README.md#phase-6-live-sales).
