Use this page for technical screen behavior, source references, and active Playwright coverage.
Inventory Summary Report supports inventory KPI summary, stock/value review, filters, report export.
| ID | Section | Action | Expected Outcome | Controls |
|---|---|---|---|---|
| UC-INVSUMM-001 | Page Load | Navigate to /inventory-summary-report | Loads inventory report | Container |
| UC-INVSUMM-002 | Auth | CustomerAdmin required | Authorized access | Authorize |
| UC-INVSUMM-003 | Business | No business selected | Shows info alert | Alert info |
| UC-INVSUMM-004 | Refresh | Click Refresh button | RefreshData + success toast | Button |
| UC-INVSUMM-005 | Export | Click Export CSV | Downloads CSV file | Button primary |
| UC-INVSUMM-006 | Summary Card | Total Products | totalProducts count | Card primary |
| UC-INVSUMM-007 | Summary Card | Total Stock Value | ₹N0 totalStockValue | Card success |
| UC-INVSUMM-008 | Summary Card | Low Stock Items | lowStockItems count | Card warning |
| UC-INVSUMM-009 | Summary Card | Average Cost | ₹N0 averageCost | Card info |
| UC-INVSUMM-010 | Chart | Stock Value by Category | Bar chart ApexChart | ApexChart |
| UC-INVSUMM-011 | Chart | Category data | Top 10 by value descending | categoryStockData |
| UC-INVSUMM-012 | Chart | Stock Status | Bar chart by status | ApexChart |
| UC-INVSUMM-013 | Chart | Status data | In Stock/Low/Out of Stock | stockStatusData |
| UC-INVSUMM-014 | Chart Empty | No category data | Icon + muted message | Div text-center |
| UC-INVSUMM-015 | Chart Empty | No status data | Icon + muted message | Div text-center |
| UC-INVSUMM-016 | Table | Product Code | Code format | td code |
| UC-INVSUMM-017 | Table | Product Name | Bold text | td strong |
| UC-INVSUMM-018 | Table | Category | Plain text | td |
| UC-INVSUMM-019 | Table | Current Stock | Right-aligned | td text-end |
| UC-INVSUMM-020 | Table | Min Stock | Right-aligned | td text-end |
| UC-INVSUMM-021 | Table | Unit Cost | C2 currency format | td text-end |
| UC-INVSUMM-022 | Table | Stock Value | C2 currency format | td text-end |
| UC-INVSUMM-023 | Table | Status badge | Colored by status | Badge |
| UC-INVSUMM-024 | Status Badge | In Stock | bg-success | Badge class |
| UC-INVSUMM-025 | Status Badge | Low Stock | bg-warning | Badge class |
| UC-INVSUMM-026 | Status Badge | Out of Stock | bg-danger | Badge class |
| UC-INVSUMM-027 | Status Logic | Stock = 0 | Out of Stock | Status calc |
| UC-INVSUMM-028 | Status Logic | Stock <= MinLevel | Low Stock | Status calc |
| UC-INVSUMM-029 | Status Logic | Stock > MinLevel | In Stock | Status calc |
| UC-INVSUMM-030 | Export CSV | Header | Report title + timestamp | CSV line |
| UC-INVSUMM-031 | Export CSV | Summary | 4 metrics with values | CSV section |
| UC-INVSUMM-032 | Export CSV | Details | All inventory rows | CSV rows |
| UC-INVSUMM-033 | Table Empty | No data | Icon + muted message | Div text-center |
| UC-INVSUMM-034 | Business Change | HandleBusinessChanged | Reloads data + StateHasChanged | Event handler |
| UC-INVSUMM-035 | Dispose | Component disposed | Unsubscribes from OnChanged | Dispose method |
| UC-INVSUMM-036 | Accessibility | Grid cleanup | initGridAccessibilityCleanup JS call | JS interop |
| UC-INVSUMM-037 | Stock Calc | From InventoryCostLayers | Sum RemainingQuantity by ProductId | Query |
| UC-INVSUMM-038 | Value Calc | Stock Value | CurrentStock × UnitPrice | Calculation |
| UC-INVSUMM-039 | Avg Cost | Calculation | Sum / count of items with cost | Calculation |
| UC-INVSUMM-040 | Breadcrumb | Reports link | Navigates to /reports | Link |
| UC-INVSUMM-041 | Page Title | Dynamic | Business name in title | PageTitle |
| UC-INVSUMM-042 | Data test | Table attribute | data-test="inventory-summary-table" | Attribute |
| UC-INVSUMM-043 | Toast Success | On refresh | showToast success message | JS interop |
| UC-INVSUMM-044 | Toast Error | On error | showToast error message | JS interop |
| UC-INVSUMM-045 | Error Handling | Export fail | errorMessage set + StateHasChanged | Error handling |