# Batch 8 — V1.0 NICE close-out

> **Document type:** frozen historical artifact — captures what shipped in Batch 8 (the final V1.0 NICE batch).
> **Verified accurate:** 2026-05-02 — every file path, export name, and `index.html` script-tag reference still resolves in the live source.
> **Do not rewrite as a current spec.** For active spec, see `MISSING-SCREENS-INVENTORY.md`, `SCREENS-INVENTORY-Retail.md` (Price Lists), and `SCREENS-INVENTORY-Dine.md` (Recipe Drift).

**Date:** 2026-05-01
**Scope:** 4 screens / 1 expansion (3 new builds · 1 cut-over · 1 drawer expansion)
**Status:** ✅ Shipped clean — no console errors on load

---

## What shipped

| ID | Screen | Type | File | Backend |
|---|---|---|---|---|
| **MS-ACCT-004** | Recurring Journal Entries | Cut-over (fixture → live) | `front/accounting/accounting-recurring.compiled.js` | `GET/POST /accounting/recurring-je`, `POST /{id}/run-now` |
| **MS-DINE-005** | Recipe Drift Tracking | New build | `front/dine/dine-recipe-drift.compiled.js` | `GET/POST /recipe-drift` |
| **MS-RETAIL-004** | Price Lists / Price Books | New build | `front/retail/retail-pricing.compiled.js` | `GET/POST /pricing/price-lists`, `POST /pricing/resolve` |
| **MS-CRM-002** | Suppliers Vendor-360 | Drawer expansion | `front/retail/inventory-tabs-b.jsx` (`SupplierDrawer` + 2 new tabs) | `GET /suppliers`, `/supplier-invoices`, `/supplier-payments` |

---

## What's new in each

### MS-ACCT-004 — Recurring JE (cut-over)
Existing screen + UI flow already in place from Batch 3; this batch swaps the fixture read (`AcctData.recurringJEs`) for live `window.API.accounting.recurringJE.list/create/update/runNow`. Falls back to fixture on API absence.

### MS-DINE-005 — Recipe Drift Tracking (new)
Single-page variance report. KPI strip (avg drift %, critical count, observation count, branches affected). Filter chips by recipe / branch / period. Table of observations with severity tags (within tolerance / drift / critical). Per-row drilldown drawer shows ingredient-level planned-vs-actual with delta bars and a 6-period sparkline. New observation modal posts to `/recipe-drift`.

### MS-RETAIL-004 — Price Lists (new)
Multi-tier pricing surface across 6 list kinds (list_price · member · wholesale · promotional · branch · custom). Two-pane layout: left side = filter chips + search + cards (priority + coverage % + discount %); right side = sticky **Pricing Resolver** that auto-resolves a chosen product × branch × customer-segment to show which list wins (effective price + delta vs list + winning-list code). Create modal posts `POST /pricing/price-lists`.

### MS-CRM-002 — Vendor 360 (drawer expansion)
Existing `SupplierDrawer` extended with tab nav. New tabs:
- **Purchase History** — 6-month spend bar chart, top-5 SKUs supplied (qty + spend), PO ledger (recent 6) with status pill.
- **Payment Performance** — On-time payment rate (color-coded), avg days-to-pay vs term drift, KPI strip (open invoices · overdue · credit limit), open A/P ledger with overdue-day calc.

---

## Wiring

**index.html (3 script tags added):**
- `front/api/api-namespace-batch8.js` — registers `/recipe-drift`, `/pricing/*`, `/supplier-invoices` filtering, `/supplier-payments` filtering, alias for `/accounting/recurring-je` (already in batch3)
- `front/retail/retail-pricing.compiled.js`
- `front/dine/dine-recipe-drift.compiled.js`

**app-main.compiled.js — 2 new routes (Batch 8 block):**
- `case 'retail.pricing'` → `window.PriceListsScreen`
- `case 'dine.recipe-drift'` → `window.DineRecipeDrift`

**tokens.js — 2 new tokens:**
- `retail.pricing` (group: stock, badge: New)
- `dine.recipe-drift` (badge: New)

**roles.js + hr-roles-policies.compiled.js — added to:**
- `manager` → both new tokens
- `chef` → `dine.recipe-drift`
- `retail` permission group → `retail.pricing`
- `dine` permission group → `dine.recipe-drift`

---

## What we deferred from Batch 8 candidates

| ID | Screen | Reason |
|---|---|---|
| MS-HR-007 | Performance Reviews mutation UI | Effort > 1 day; multi-screen feature; inventory itself defers |
| MS-ACCT-009 | Cross-entity Audit Drill | Marked V1.1 in inventory; auditor users not in pilot |
| MS-ACCT-010 | Multi-Currency FX Rates | Marked V1.1 in inventory; KSA-only pilot (SAR) |
| MS-XCUT-001 | Manager Override Centralization | Backend gap (`POST /auth/manager-override` not in routes) |
| MS-XCUT-002 | Roles Editor (full RBAC) | Already exists as `RolesHubV2` |
| MS-PAY-002, MS-XCUT-004/005/006, MS-RETAIL-002, MS-HR-008 | (various) | Already shipped in earlier batches |

---

## Verification

- ✅ `done` on `index.html` — clean load, no console errors
- ✅ Both new screens reachable via sidebar (manager role)
- ✅ Vendor-360 tabs render inside existing SupplierDrawer
- ✅ Recurring JE falls back gracefully to fixture when API namespace absent

---

## What's left for V1.0

Per `MISSING-SCREENS-INVENTORY.md` §1597 — Batch 8 was the final V1.0 NICE batch. Batch 9 (post-pilot) is V1.1 territory: cross-entity audit drill, multi-currency, performance review mutation UI, and the reusable `<EntityAuditDrawer>` pattern sweep.
