Operational Manual

Rabbit Accounts user guide, demo plan, and scenario test pack

This manual is meant to be read by real testers and simple business owners. Follow the screens in order, use the listed routes and controls, and compare the live app against the expected behaviors below.

Login and demo access

  • Shared login shown on the live sign-in screen: rajesh.techcorp / admin123.
  • System admins can review all current deterministic demo credentials from /admin/loginCredentials.
  • Manual entry point: /Account/Login.

Daily fresh demo data

  • Each active business gets one sensible daily refresh with current-looking orders, payments, inventory movement, reconciliation activity, and defect/wastage records.
  • Background refresh is idempotent by business and day.
  • Admin override lives on /admin/test-data.

How to test

  • Open one screen at a time, validate header, filters, tables, totals, create/edit/delete flows, and empty/error/success states.
  • Switch businesses and confirm data remains scoped to the selected business only.
  • For upload flows, test both an image file and a PDF where supported.

Business isolation rule

No cross-business leakage is acceptable. Every table, modal, import, export, background job, and quick-login flow must remain tenant-safe.

Core Access

Login Screen

Simple sign-in screen with one shared demo customer-admin credential and a direct link to this manual.

Route/Account/Login
AudienceAll users
  • Validate username and password fields, button loading state, error banner, and successful redirect to dashboard.
  • Confirm only one shared credential is displayed on screen: TechnoMart Electronics / rajesh.techcorp / admin123.
  • Use this page as the starting point for browser-driven smoke runs and friend-facing demos.
Core Access

Admin Login Credentials

Development-only credential directory with deterministic passwords, user IDs, role visibility, and one-click user switching.

Route/admin/loginCredentials
AudienceSystem Admin
  • Validate every active account row shows business, display name, username, email, role, user ID, password, and last login.
  • Confirm the Login As action re-authenticates into the selected user and enforces that user’s authorization boundaries.
  • Use this page to verify tenant-scoped demos without editing cookies or touching the database manually.
Core Access

Admin Test Data Management

Operations surface for comprehensive baseline seeding plus the once-per-day demo activity refresh for the current business.

Route/admin/test-data
AudienceCustomer Admin and System Admin
  • Validate summary cards, comprehensive data creation flow, refresh status timestamp, Run Today button, and Force Re-run button.
  • Confirm the daily refresh creates current-looking sales, payments, purchase orders, invoices, bank statements, stock movement, wastage, and FIFO consumption.
  • Verify rerunning without force on the same date returns a skipped result for the same business.
01

Dashboard

The Dashboard is the landing page after login, providing business health overview with KPIs, charts, and quick actions.

Route/
Menu1 (Dashboard)
Checks50 use cases / 9 sections
Open detailed screen guide

UC-DASH: Dashboard Use Cases

Page: Home.razor Route: / Menu Position: 1 (Dashboard)


Overview

The Dashboard is the landing page after login, providing business health overview with KPIs, charts, and quick actions.


Section: Page Header & Business Context

ID Section Action Expected Outcome Controls Affected
UC-DASH-001 Header Load Dashboard page Business name displays, "Dashboard Overview" subtitle shows, current date displays business-name, business-subtitle, date-info
UC-DASH-002 Header Business health indicator visible Shows "Business Healthy" with green check icon health-status

Section: Time Period Filter

ID Section Action Expected Outcome Controls Affected
UC-DASH-003 Filter Select "Today" from Time Period dropdown Data refreshes for today only: (1) Sales amount updates, (2) Sales growth % recalculates vs yesterday, (3) Payments amount updates, (4) Payment growth % recalculates, (5) Section title changes to "Today's Performance", (6) Sales card header changes to "Sales Today", (7) Sales Trend chart title changes to "Sales Trend (Today)", (8) Sales Trend chart shows hourly data points (6 points: 00:00, 04:00, 08:00, 12:00, 16:00, 20:00), (9) Top Products chart title changes to "Top Products (Today)", (10) Top Products chart data updates, (11) Profit Margin recalculates for today, (12) From date input updates to today, (13) To date input updates to today Time Period select=Today, section-title="Today's Performance", Sales card header="Sales Today", Sales h3 amount, Sales growth %, Payments h3 amount, Payment growth %, Profit Margin %, Gross Profit amount, Sales Trend chart title, Sales Trend chart canvas (hourly labels), Top Products chart title, Top Products chart canvas, From date input, To date input
UC-DASH-004 Filter Select "This Week" from Time Period dropdown Data refreshes for Mon-Sun: (1) Sales amount = sum of week's sales, (2) Sales growth % = vs last week, (3) Payments amount = sum of week's payments, (4) Payment growth % = vs last week, (5) Section title = "This Week's Performance", (6) Sales card header = "Sales This Week", (7) Sales Trend chart title = "Sales Trend (This Week)", (8) Sales Trend chart shows 7 daily data points (Mon-Sun labels), (9) Top Products title = "Top Products (This Week)", (10) From date = Monday of current week, (11) To date = Sunday of current week Time Period select=ThisWeek, section-title="This Week's Performance", Sales card header="Sales This Week", Sales h3 amount, Sales growth % (vs last week), Payments h3 amount, Payment growth %, Profit Margin %, Gross Profit amount, Sales Trend chart title, Sales Trend chart canvas (7 daily points), Top Products chart title, Top Products chart canvas, From date input, To date input
UC-DASH-005 Filter Select "This Month" from Time Period dropdown Data refreshes for current month: (1) Sales amount = sum of month's sales, (2) Sales growth % = vs last month, (3) Section title = "This Month's Performance", (4) Sales card header = "Sales This Month", (5) Sales Trend chart shows daily points for each day of month, (6) From date = 1st of month, (7) To date = last day of month Time Period select=ThisMonth, section-title="This Month's Performance", Sales card header="Sales This Month", Sales h3 amount, Sales growth %, Payments h3 amount, Payment growth %, Profit Margin %, Gross Profit amount, Sales Trend chart title="Sales Trend (This Month)", Sales Trend chart canvas (28-31 daily points), Top Products chart title="Top Products (This Month)", Top Products chart canvas, From date input, To date input
UC-DASH-006 Filter Select "Last 7 Days" from dropdown Data refreshes for rolling 7 days: (1) Sales = sum of last 7 days, (2) Growth % = vs previous 7 days, (3) Section title = "Last 7 Days Performance", (4) Sales card header = "Sales Last 7 Days", (5) Chart shows 7 data points with date labels, (6) From date = today - 6 days, (7) To date = today Time Period select=Last7Days, section-title="Last 7 Days Performance", Sales card header="Sales Last 7 Days", Sales h3 amount, Sales growth %, Payments h3 amount, Payment growth %, Profit Margin %, Gross Profit amount, Sales Trend chart title="Sales Trend (Last 7 Days)", Sales Trend chart canvas (7 points), Top Products chart title="Top Products (Last 7 Days)", Top Products chart canvas, From date input, To date input
UC-DASH-007 Filter Select "Last 30 Days" from dropdown Data refreshes for rolling 30 days: (1) Sales = sum of last 30 days, (2) Growth % = vs previous 30 days, (3) Section title = "Last 30 Days Performance", (4) Sales card header = "Sales Last 30 Days", (5) Chart shows 30 data points, (6) From date = today - 29 days, (7) To date = today Time Period select=Last30Days, section-title="Last 30 Days Performance", Sales card header="Sales Last 30 Days", Sales h3 amount, Sales growth %, Payments h3 amount, Payment growth %, Profit Margin %, Gross Profit amount, Sales Trend chart title="Sales Trend (Last 30 Days)", Sales Trend chart canvas (30 points), Top Products chart title="Top Products (Last 30 Days)", Top Products chart canvas, From date input, To date input
UC-DASH-008 Filter Select "This Year" from dropdown Data refreshes for year-to-date: (1) Sales = sum of YTD sales, (2) Section title updates, (3) From date = Jan 1 of current year, (4) To date = Dec 31 of current year Time Period select=ThisYear, section-title, Sales card header, Sales h3 amount, Sales growth %, Payments h3 amount, Payment growth %, Profit Margin %, Gross Profit amount, Sales Trend chart title, Sales Trend chart canvas, Top Products chart title, Top Products chart canvas, From date input=Jan 1, To date input=Dec 31
UC-DASH-009 Filter Enter custom From date (e.g., Dec 1) (1) Time Period dropdown changes to "Custom", (2) Data filters from Dec 1 to current To date, (3) Sales/Payments/Profit recalculate for custom range Time Period select=Custom, From date input=user value, Sales h3 amount, Sales growth %, Payments h3 amount, Payment growth %, Profit Margin %, Gross Profit amount, Sales Trend chart canvas, Top Products chart canvas
UC-DASH-010 Filter Enter custom To date (e.g., Dec 15) (1) Time Period dropdown changes to "Custom", (2) Data filters from current From date to Dec 15, (3) All metrics recalculate Time Period select=Custom, To date input=user value, Sales h3 amount, Sales growth %, Payments h3 amount, Payment growth %, Profit Margin %, Gross Profit amount, Sales Trend chart canvas, Top Products chart canvas
UC-DASH-011 Filter Enter From=Dec 1, To=Dec 10 (1) Preset = Custom, (2) Sales = sum for Dec 1-10, (3) Payments = sum for Dec 1-10, (4) Profit Margin = calculated for Dec 1-10, (5) Charts show 10 data points (Dec 1-10 labels) Time Period select=Custom, From date input=Dec 1, To date input=Dec 10, Sales h3 amount, Sales growth %, Payments h3 amount, Payment growth %, Profit Margin %, Gross Profit amount, Sales Trend chart canvas (10 points), Top Products chart canvas

Section: Key Metrics Cards (Row 1)

ID Section Action Expected Outcome Controls Affected
UC-DASH-012 Sales Card View Sales card Shows sales amount in ₹ format (e.g., ₹1,23,456), growth % vs previous period Sales card header, h3 amount, growth indicator
UC-DASH-013 Sales Card Sales growth positive Green "+" percentage displayed, upward trend growth indicator text-success class
UC-DASH-014 Sales Card Sales growth negative Red "-" percentage displayed growth indicator text-danger class
UC-DASH-015 Payments Card View Payments Received card Shows payment amount in ₹ format, growth % displayed Payments card
UC-DASH-016 Outstanding Card View Outstanding card Shows total outstanding amount, overdue count (e.g., "5 overdue") Outstanding card, overdue count badge
UC-DASH-017 Low Stock Card View Low Stock Items card Shows count of low stock items Low Stock card
UC-DASH-018 Low Stock Card Click on Low Stock card Navigates to /inventory page Navigation to Inventory
UC-DASH-019 Low Stock Card Low stock count > 0 Warning icon (yellow), "Needs attention" text in red icon, small text
UC-DASH-020 Low Stock Card Low stock count = 0 Success icon (green), "All good" text icon, small text

Section: Business Intelligence Metrics (Row 2)

ID Section Action Expected Outcome Controls Affected
UC-DASH-021 Profit Margin View Profit Margin card Shows profit margin %, gross profit amount (₹) Profit Margin card
UC-DASH-022 Profit Margin Margin > 30% Green icon profit margin icon
UC-DASH-023 Profit Margin Margin 15-30% Yellow/warning icon profit margin icon
UC-DASH-024 Profit Margin Margin < 15% Red/danger icon profit margin icon
UC-DASH-025 Cash Position View Cash Position card Shows net cash position in ₹, "Positive/Negative cash flow" text Cash Position card
UC-DASH-026 Cash Position Positive cash Green icon, "Positive cash flow" wallet icon, cash flow text
UC-DASH-027 Cash Position Negative cash Red icon, "Negative cash flow" wallet icon, cash flow text
UC-DASH-028 Overdue View Overdue Payments card Shows overdue amount (₹), invoice count, breakdown badges (30d, 60d, 90+d) Overdue card, badges
UC-DASH-029 Overdue Click "View Details" button Navigates to /vendor-payments page Navigation

Section: Business Insights Charts

ID Section Action Expected Outcome Controls Affected
UC-DASH-030 Sales Trend View Sales Trend chart ACTUAL CHART displays (not placeholder), shows line/bar chart with sales data for selected period Sales Trend chart canvas
UC-DASH-031 Sales Trend Change time period Chart updates with new data points matching period chart labels, chart data
UC-DASH-032 Sales Trend Hover on chart points Tooltip shows date and sales amount Chart tooltip
UC-DASH-033 Payment Collection View Payment Collection chart ACTUAL CHART displays showing On Time/Late/Overdue percentages as pie/donut Payment Collection chart
UC-DASH-034 Top Products View Top Products chart ACTUAL CHART displays horizontal bar chart with top 5 products by revenue Top Products chart
UC-DASH-035 Top Products Change time period Chart updates with top products for selected period Top Products chart data

Section: Recent Activity Feed

ID Section Action Expected Outcome Controls Affected
UC-DASH-036 Activity View Recent Activity Shows up to 5 recent activities with icon, title, details, time ago activity-feed list
UC-DASH-037 Activity Activity has amount Shows "+₹X" or "-₹X" with appropriate color activity-amount
UC-DASH-038 Activity No recent activities Shows "No recent activity" message with icon empty state message
UC-DASH-039 Activity Time display Shows "Just now", "X minutes ago", "X hours ago", "X days ago", or date activity-time

Section: Quick Actions

ID Section Action Expected Outcome Controls Affected
UC-DASH-040 Quick Actions Click "New Sale" button Navigates to /sales page Navigation
UC-DASH-041 Quick Actions Click "Payment" button Navigates to /payments page Navigation
UC-DASH-042 Quick Actions Click "Customer" button Navigates to /customers page Navigation
UC-DASH-043 Quick Actions Click "Product" button Navigates to /products page Navigation
UC-DASH-044 Quick Actions Click "Receipt" button Navigates to /receipts page Navigation

Section: Data Validation Requirements

ID Validation Requirement
UC-DASH-045 Sales Amount Must show non-zero value when sales exist for period
UC-DASH-046 Payments Amount Must show non-zero value when payments exist for period
UC-DASH-047 Chart Data Charts must render actual visualizations, NOT "Chart visualization" placeholder
UC-DASH-048 Currency Format All amounts must use Indian ₹ format with commas (₹1,23,456)
UC-DASH-049 Growth Calculation Growth % must be calculated vs previous equivalent period
UC-DASH-050 Period Labels Card headers and chart titles must reflect selected period

Section: Unit Test Coverage

Test Class Test Count Coverage Areas Related Use Cases
DashboardCalculationTests 25 Date calculations, growth %, profit margin thresholds, time formatting, period labels UC-DASH-003 to UC-DASH-050

Unit Tests Summary

Location: Rabbit.Accounts.Tests/Dashboard/DashboardCalculationTests.cs

Test Categories:

  1. GetStartOfWeek Tests (7 tests) - Week boundary calculations for "This Week" period filter
  2. GetEndOfWeek Tests (3 tests) - Sunday calculation for week endings
  3. SetDatesFromPreset Tests (9 tests) - All date range presets (Today, ThisWeek, ThisMonth, Last7Days, Last30Days, ThisYear, Custom)
  4. GetTimeAgo Tests (6 tests) - Time ago formatting ("Just now", "X minutes ago", "X hours ago", "X days ago")
  5. GetProfitMarginColor Tests (10 tests) - Threshold-based color coding (success/warning/danger)
  6. ConvertPresetToLegacyPeriod Tests (7 tests) - Enum to string conversion
  7. Growth Calculation Tests (5 tests) - Positive/negative/zero growth percentages
  8. Net Cash Position Tests (3 tests) - Cash flow calculations
  9. Gross Profit Tests (4 tests) - Revenue minus COGS calculations
  10. Period Label Tests (12 tests) - Dynamic section titles and sales labels

Note: Dashboard is primarily a UI/display page. Service layer tests (DashboardService) would require database mocking. The pure calculation logic tested here covers all date filtering, growth calculations, and threshold-based display logic used by the dashboard.


Total Use Cases: 50

02

Customers

Customer management with CRUD operations, filters, Excel import, and customer directory.

Route/customers
Menu2 (Customers)
Checks50 use cases / 9 sections
Open detailed screen guide

UC-Customers: Customer Management Page Use Cases

Page: Customers.razor Route: /customers Menu Position: 2 (Customers)


Overview

Customer management with CRUD operations, filters, Excel import, and customer directory.


Section: Page Header & Actions

ID Section Action Expected Outcome Controls Affected
UC-CUST-001 Header Load page Title "Customers - [BusinessName]", h2 shows "Customers" with icon, subtitle "Manage your customer database and relationships" PageTitle, h2, p subtitle
UC-CUST-002 Header No business selected Alert "Please select a business to view customers" alert alert-info
UC-CUST-003 Actions Click "Add Customer" Modal opens with title "Add New Customer", empty form fields customerModal, modal title
UC-CUST-004 Actions Click "Import Excel" Import modal opens with file upload field Import modal
UC-CUST-005 Actions Click "Download Template" Excel template file downloads Browser download

Section: Customer Filters

ID Section Action Expected Outcome Controls Affected
UC-CUST-006 Filter View filter section Shows 4 filters: Search Customers, Customer Type, Balance Status, City + Clear/Refresh buttons StandardFilterSection, 4 fields
UC-CUST-007 Filter Type in Search box Customers table filters in real-time matching name/code/contact Search textbox, table rows
UC-CUST-008 Filter Select "Individual" from Customer Type Shows only Individual type customers Customer Type select, table rows
UC-CUST-009 Filter Select "Business" from Customer Type Shows only Business type customers with building icon badge Customer Type select, table rows
UC-CUST-010 Filter Select "Clear" from Balance Status Shows customers with ₹0 balance Balance Status select, table rows
UC-CUST-011 Filter Select "Current" from Balance Status Shows customers with positive non-overdue balance Balance Status select, table rows
UC-CUST-012 Filter Select "Due" from Balance Status Shows customers with due but not overdue balance Balance Status select, table rows
UC-CUST-013 Filter Select "Overdue" from Balance Status Shows customers with overdue invoices Balance Status select, table rows
UC-CUST-014 Filter Select "Over Limit" from Balance Status Shows customers over their credit limit Balance Status select, table rows
UC-CUST-015 Filter Select city (e.g., "Mumbai") Shows only customers from Mumbai City select, table rows
UC-CUST-016 Filter City dropdown options Lists all unique cities from customer data City select options
UC-CUST-017 Filter Click "Clear" button All filters reset, full customer list shown Clear btn, all filters, table rows
UC-CUST-018 Filter Click "Refresh" button Reloads customer data from server Refresh btn, table rows
UC-CUST-019 Filter Combine filters Multiple filters AND together All filter controls, table rows

Section: Summary Cards

ID Section Action Expected Outcome Controls Affected
UC-CUST-020 Summary Total Customers card Blue border, shows total count, people icon card border-primary, h3 text-primary, icon
UC-CUST-021 Summary Active Customers card Green border, shows active count, person-check icon card border-success, h3 text-success, icon
UC-CUST-022 Summary Outstanding Balance card Yellow border, shows total outstanding ₹, currency icon card border-warning, h3 text-warning, icon
UC-CUST-023 Summary Overdue Customers card Red border, shows overdue count, warning icon card border-danger, h3 text-danger, icon
UC-CUST-024 Summary Apply filter Summary cards update to reflect filtered data All 4 summary card values

Section: Customer Directory Table

ID Section Action Expected Outcome Controls Affected
UC-CUST-025 Table View table header 9 columns: Customer Code, Customer Details, Contact Info, Location, Type, Balance, Credit Limit, Status, Actions thead th × 9
UC-CUST-026 Table View customer row Shows: code with hash icon, name+contact person, phone+email, city, type badge, balance (₹), credit limit (₹), status badge, 3 action buttons tr cells
UC-CUST-027 Table Customer Code column Shows hash icon + code in primary color customer-code text-primary
UC-CUST-028 Table Customer Details column Two lines: Customer Name (bold), Contact Person (muted with person icon) customer-details
UC-CUST-029 Table Contact Info column Two lines: Phone (green phone icon), Email (envelope icon, truncated) contact-info
UC-CUST-030 Table Location column City with geo-alt icon in info color bi-geo-alt text-info
UC-CUST-031 Table Type = Business Blue badge "Business" with building icon badge bg-primary
UC-CUST-032 Table Type = Individual Green badge "Individual" with person icon badge bg-success
UC-CUST-033 Table Balance column Right-aligned, format ₹X,XX,XXX.XX text-end
UC-CUST-034 Table Credit Limit column Right-aligned, format ₹X,XX,XXX text-end
UC-CUST-035 Table Status = Active Green badge "Active" with check-circle icon badge bg-success
UC-CUST-036 Table Status = Inactive Gray badge "Inactive" with pause-circle icon badge bg-secondary
UC-CUST-037 Table Max 20 rows Table shows first 20 customers tbody tr × 20 max
UC-CUST-038 Table No customers Empty state: people icon, "No customers found", "Add your first customer", Add Customer button Empty state UI

Section: Customer Actions

ID Section Action Expected Outcome Controls Affected
UC-CUST-039 Actions Click View (eye icon) Customer details modal/view opens View modal
UC-CUST-040 Actions Click Edit (pencil icon) Edit modal opens with customer data pre-filled Edit modal
UC-CUST-041 Actions Click Delete (trash icon) Confirmation prompt, then customer deleted Confirm dialog, table update

Section: Loading State

ID Section Action Expected Outcome Controls Affected
UC-CUST-042 Loading During load Spinner with "Loading customers..." text spinner, loading text

Section: Add/Edit Customer Modal

ID Section Action Expected Outcome Controls Affected
UC-CUST-043 Modal View modal fields Fields: Customer Code, Name*, Contact Person, Phone*, Email, Customer Type, Address, City, Credit Limit Modal form fields
UC-CUST-044 Modal Submit without required Validation messages for required fields ValidationMessage components
UC-CUST-045 Modal Save successfully Spinner, customer saved, modal closes, table refreshes Modal close, table update

Section: Data Validation

ID Validation Requirement
UC-CUST-046 Customer Count Must show customers when data exists
UC-CUST-047 Outstanding Total Sum of all customer balances
UC-CUST-048 Cities Available Dynamically populated from customer data
UC-CUST-049 Currency Format All ₹ amounts use Indian format (₹X,XX,XXX)
UC-CUST-050 Filter Consistency Summary cards and table always match

Section: Unit Test Coverage

Test Class Test Count Coverage Areas Related Use Cases
CustomerBalanceTests 41 Credit calculations, balance status thresholds, display formatting, customer types UC-CUST-010 to UC-CUST-014, UC-CUST-027, UC-CUST-030, UC-CUST-033, UC-CUST-034

Unit Tests Summary

Location: Rabbit.Accounts.Tests/Customers/CustomerBalanceTests.cs

Test Categories:

  1. AvailableCredit Tests (5 tests) - Credit limit minus balance calculations
  2. IsOverLimit Tests (5 tests) - Over credit limit detection including boundary cases
  3. DaysSinceLastPayment Tests (4 tests) - Payment aging calculations
  4. BalanceStatus Tests (13 tests) - Clear/Current/Due/Overdue/Long Overdue/Over Limit status determination with boundary tests
  5. DisplayName Tests (3 tests) - Customer code and name formatting
  6. FullAddress Tests (4 tests) - Address component joining with comma separation
  7. CustomerTypes Tests (7 tests) - Type validation (Retail/Wholesale/Distributor)

Business Logic Thresholds:

  • Clear: Balance ≤ 0
  • Over Limit: Balance > Credit Limit (takes precedence over age-based statuses)
  • Long Overdue: Last payment > 90 days ago
  • Overdue: Last payment > 60 days ago
  • Due: Last payment > 30 days ago
  • Current: Last payment ≤ 30 days ago

Note: Customer management is primarily CRUD operations. Service layer tests would require database mocking. These tests cover all computed properties used for display and status determination.


Total Use Cases: 50

03

Products

Product management with inventory view, batch view, filters, Excel import, and CRUD operations.

Route/products
Menu3 (Products)
Checks61 use cases / 12 sections
Open detailed screen guide

UC-PROD: Products Page Use Cases

Page: Products.razor Route: /products Menu Position: 3 (Products)


Overview

Product management with inventory view, batch view, filters, Excel import, and CRUD operations.


Section: Page Header & View Tabs

ID Section Action Expected Outcome Controls Affected
UC-PROD-001 Header Load Products page Page title "Products - [BusinessName]", h2 shows "Products", Products tab is active (btn-primary) PageTitle, h2 title, Products btn active
UC-PROD-002 Header No business selected Alert shows "Please select a business to view products" alert alert-info
UC-PROD-003 Tabs Click Products tab View switches to Products, header says "Products", Add Product/Import Excel/Download Template buttons show Products btn active, h2="Products", action buttons
UC-PROD-004 Tabs Click Inventory tab View switches to Inventory, header says "Products - Inventory View", Refresh Inventory/Adjust Stock buttons show Inventory btn active, h2="Products - Inventory View", action buttons
UC-PROD-005 Tabs Click Batches tab View switches to Batches, header says "Products - Batch View", Refresh Batches/Batch Details buttons show Batches btn active, h2="Products - Batch View", action buttons

Section: Products View - Action Buttons

ID Section Action Expected Outcome Controls Affected
UC-PROD-006 Actions Click "Add Product" Modal opens with title "Add New Product", empty form fields productModal opens, modal-title="Add New Product"
UC-PROD-007 Actions Click "Import Excel" Import modal opens with file upload field importModal opens
UC-PROD-008 Actions Click "Download Template" Excel template file downloads Browser download

Section: Product Filters

ID Section Action Expected Outcome Controls Affected
UC-PROD-009 Filter View filter section Shows 4 filters: Search Products, Category, Stock Level, Price Range StandardFilterSection, 4 filter fields
UC-PROD-010 Filter Type in Search box Products table filters in real-time (debounced) to match search term in product name/code Search textbox, products table rows
UC-PROD-011 Filter Select "Smartphones" from Category Products table shows only Smartphones category products, Filtered count updates Category select, summary-filtered, table rows
UC-PROD-012 Filter Select "Low Stock" from Stock Level Products table shows only products with stock <= 10, status badge = "Low Stock" Stock Level select, table rows, status badges
UC-PROD-013 Filter Select "Out of Stock" from Stock Level Products table shows only products with stock = 0, status badge = "Out of Stock" Stock Level select, table rows
UC-PROD-014 Filter Select "In Stock" from Stock Level Products table shows products with stock > 10 Stock Level select, table rows
UC-PROD-015 Filter Select "Under ₹5,000" from Price Range Products table shows only products with price < 5000 Price Range select, table rows
UC-PROD-016 Filter Select "₹5,000 - ₹10,000" Products with price 5000-10000 shown Price Range select, table rows
UC-PROD-017 Filter Select "₹10,000 - ₹20,000" Products with price 10000-20000 shown Price Range select, table rows
UC-PROD-018 Filter Select "Over ₹20,000" Products with price > 20000 shown Price Range select, table rows
UC-PROD-019 Filter Click "Clear" button All filters reset to defaults, full product list shown Clear btn, all filter controls, table rows
UC-PROD-020 Filter Combine filters Multiple filters AND together (e.g., Smartphones + Low Stock) All filter controls, table rows

Section: Products Summary Row

ID Section Action Expected Outcome Controls Affected
UC-PROD-021 Summary View summary Shows: (1) "Total: X items" = total products, (2) "Filtered: X items" = after filters, (3) "Stock: X units" = sum of filtered stock, (4) "Filtered Value: ₹X" = sum of (stock × price) summary-count, summary-filtered, summary-stock, summary-value
UC-PROD-022 Summary Apply filter Filtered count, Stock units, and Filtered Value recalculate for filtered products summary-filtered, summary-stock, summary-value

Section: Products Table

ID Section Action Expected Outcome Controls Affected
UC-PROD-023 Table View table headers 8 columns: Product Name, Code, Category, Price, Stock, Stock Value, Status, Actions thead th × 8
UC-PROD-024 Table View product row Shows: product name, code, category name, price (₹X,XX,XXX.XX), stock count, stock value (₹X), status badge, Edit/Delete buttons tr cells
UC-PROD-025 Table Stock <= 10 Stock number shows red bold text, Status = "Low Stock" yellow badge product-stock text-danger fw-bold, badge bg-warning
UC-PROD-026 Table Stock = 0 Status = "Out of Stock" red badge badge bg-danger
UC-PROD-027 Table Stock > 10 Stock shows green text, Status = "In Stock" green badge product-stock text-success, badge bg-success
UC-PROD-028 Table Stock 11-50 Stock shows yellow/warning text product-stock text-warning
UC-PROD-029 Table Price column Right-aligned, format ₹X,XX,XXX.XX product-price text-end
UC-PROD-030 Table Stock Value Right-aligned, green, format ₹X,XX,XXX product-stock-value text-end text-success
UC-PROD-031 Table Max rows Shows max 25 rows (pagination if more) tbody tr × 25 max
UC-PROD-032 Table No products Empty state: "No products found" heading, "Add some products to get started" products-empty-state

Section: Product Actions

ID Section Action Expected Outcome Controls Affected
UC-PROD-033 Actions Click Edit button Modal opens with title "Edit Product", form pre-filled with product data productModal, modal-title="Edit Product", all form fields populated
UC-PROD-034 Actions Click Delete button Confirmation prompt, then product deleted from list Confirmation dialog, product removed from table

Section: Add/Edit Product Modal

ID Section Action Expected Outcome Controls Affected
UC-PROD-035 Modal View modal fields Fields: Product Name*, Product Code*, Description, Unit Price*, Unit*, Current Stock, Minimum Stock Level, Category 8 form fields
UC-PROD-036 Modal Submit without required fields Validation messages show for Product Name, Product Code, Unit Price, Unit ValidationMessage components
UC-PROD-037 Modal Enter valid data and submit Spinner shows, product saved, modal closes, table refreshes with new/updated product spinner, modal closes, table updates
UC-PROD-038 Modal Click Cancel Modal closes, no changes saved Modal closes
UC-PROD-039 Modal Click X button Modal closes Modal closes

Section: Excel Import Modal

ID Section Action Expected Outcome Controls Affected
UC-PROD-040 Import View import modal File upload field, "Supported formats: .xlsx, .xls", Cancel/Import buttons InputFile, format text, buttons
UC-PROD-041 Import Select file File info shows: name, size in KB alert alert-info with file details
UC-PROD-042 Import Click Import Products Spinner shows, import processes spinner, processing
UC-PROD-043 Import Import success Shows 3 cards: Total Rows, Successful, Failed. If errors: warning list Summary cards, error list
UC-PROD-044 Import Import errors Orange warning shows first 10 errors with row numbers alert alert-warning, error list
UC-PROD-045 Import Click "Import Another File" Resets modal for new import Modal resets
UC-PROD-046 Import Click Close after import Modal closes, products table refreshes Modal closes, table refreshes

Section: Inventory View (UC-PROD-047 to UC-PROD-070)

ID Section Action Expected Outcome Controls Affected
UC-PROD-047 Inventory Click Inventory tab Switches to inventory view showing stock levels Inventory btn active
UC-PROD-048 Inventory View table headers Columns: Product, Current Stock, Reserved, Available, Reorder Level, Status thead
UC-PROD-049 Inventory Available calculation Available = Current Stock - Reserved Available column
UC-PROD-050 Inventory Below reorder Yellow warning badge "Reorder" badge bg-warning
UC-PROD-051 Inventory Click Adjust Stock Opens stock adjustment modal Adjust Stock btn
UC-PROD-052 Inventory Click Refresh Inventory Reloads inventory data Refresh Inventory btn

Section: Batches View (UC-PROD-053 to UC-PROD-070)

ID Section Action Expected Outcome Controls Affected
UC-PROD-053 Batches Click Batches tab Switches to batch view showing FIFO batches Batches btn active
UC-PROD-054 Batches View table headers Columns: Product, Batch #, Receipt Date, Qty Received, Qty Remaining, Unit Cost, Total Value thead
UC-PROD-055 Batches Sort order Batches ordered by Receipt Date (FIFO) Data ordering
UC-PROD-056 Batches Click Batch Details Opens batch detail modal Batch Details btn
UC-PROD-057 Batches Click Refresh Batches Reloads batch data Refresh Batches btn

Section: Data Validation Requirements

ID Validation Requirement
UC-PROD-058 Product Count Must show products when products exist in database
UC-PROD-059 Currency Format All ₹ amounts use Indian format (₹X,XX,XXX.XX)
UC-PROD-060 Stock Accuracy Stock values must match InventoryCostLayer remaining quantities
UC-PROD-061 FIFO Order Batch view must show oldest batches first

Section: Unit Test Coverage

Test Class Test Count Coverage Areas Related Use Cases
ProductInventoryTests 61 Price calculations, stock status, price range filtering, inventory levels, reorder logic UC-PROD-012 to UC-PROD-018, UC-PROD-025 to UC-PROD-030, UC-PROD-049, UC-PROD-050

Unit Tests Summary

Location: Rabbit.Accounts.Tests/Products/ProductInventoryTests.cs

Test Categories:

  1. PriceWithTax Tests (5 tests) - GST calculations (0%, 5%, 18%, 28%) with decimal precision
  2. DisplayName Tests (3 tests) - Product code and name formatting
  3. AvailableStock Tests (4 tests) - Current stock minus reserved calculations
  4. Stock Status Tests (10 tests) - Out of Stock/Low Stock/Adequate/In Stock categorization
  5. Price Range Filter Tests (15 tests) - Under ₹5K/₹5K-10K/₹10K-20K/Over ₹20K filtering
  6. Stock Value Tests (4 tests) - Stock × UnitPrice calculations
  7. IsLowStock Tests (4 tests) - Available stock vs minimum level comparison
  8. NeedsReorder Tests (3 tests) - Available stock vs reorder level comparison
  9. UnitsOfMeasurement Tests (8 tests) - Valid unit validation (Pieces/Dozens/Kilos/Liters/Meters/Pairs)

Stock Status Thresholds:

  • Out of Stock: Stock = 0
  • Low Stock: Stock ≤ 10
  • Adequate: Stock 11-50 (warning level)
  • In Stock: Stock > 50

Price Range Boundaries:

  • Under ₹5,000: price < 5000
  • ₹5,000 - ₹10,000: 5000 ≤ price ≤ 10000
  • ₹10,000 - ₹20,000: 10000 < price ≤ 20000
  • Over ₹20,000: price > 20000

Total Use Cases: 61

04

Batches

Inventory batches management showing FIFO cost layers with batch details and remaining quantities.

Route/batches
Menu4 (Batches)
Checks25 use cases / 7 sections
Open detailed screen guide

UC-BATMGT: Batches Page Use Cases

Page: Batches.razor Route: /batches Menu Position: 4 (Batches)


Overview

Inventory batches management showing FIFO cost layers with batch details and remaining quantities.


Section: Page Header

ID Section Action Expected Outcome Controls Affected
UC-BATMGT-001 Header Load Batches page Card header shows "Inventory Batches" with boxes icon, blue background card-header bg-primary, h4, fa-boxes icon

Section: Loading & Empty States

ID Section Action Expected Outcome Controls Affected
UC-BATMGT-002 Loading During load Spinner centered in card body spinner-border text-primary
UC-BATMGT-003 Empty State No batch data Info alert "No batch data available" with info icon alert alert-info

Section: Batches Table

ID Section Action Expected Outcome Controls Affected
UC-BATMGT-004 Table View table headers 7 columns: Batch Number, Product, Receipt Date, Unit Cost, Remaining Qty, Total Value, Action thead table-dark, 7 th
UC-BATMGT-005 Table View batch row Shows all columns with batch data tr row
UC-BATMGT-006 Table Batch Number column Bold batch number strong
UC-BATMGT-007 Table Product column Product name from GoodsReceiptItem.Product Product cell
UC-BATMGT-008 Table Receipt Date column Format: "dd-MMM-yyyy" (e.g., "19-Dec-2025") Date cell
UC-BATMGT-009 Table Unit Cost column Right-aligned ₹X,XX,XXX.XX text-end
UC-BATMGT-010 Table Remaining Qty column Right-aligned integer text-end
UC-BATMGT-011 Table Total Value column Bold, right-aligned ₹X,XX,XXX.XX (RemainingQty × UnitCost) text-end strong
UC-BATMGT-012 Table Table styling Striped and hover effects table-striped table-hover
UC-BATMGT-013 Table Only show active batches Only batches with RemainingQuantity > 0 shown Filtered data
UC-BATMGT-014 Table Sort order Sorted by Receipt Date ascending (FIFO order) Data order

Section: Batch Actions

ID Section Action Expected Outcome Controls Affected
UC-BATMGT-015 Actions Click "View Details" button Modal opens with batch details JS modal

Section: Batch Details Modal

ID Section Action Expected Outcome Controls Affected
UC-BATMGT-016 Modal View modal title "Batch [BatchNumber] Details" Modal title
UC-BATMGT-017 Modal Left column info Product, Product Code, Unit Cost, Original Quantity, Remaining Quantity Left column
UC-BATMGT-018 Modal Right column info Receipt Date, Receipt Number, Total Value, Allocated Quantity Right column
UC-BATMGT-019 Modal Allocated Quantity Original - Remaining = Allocated Calculated field
UC-BATMGT-020 Modal Total Value RemainingQuantity × UnitCost Calculated field

Section: Data Validation Requirements

ID Validation Requirement
UC-BATMGT-021 Batch Loading Must show batches when InventoryCostLayers exist for business
UC-BATMGT-022 FIFO Order Batches must be displayed in FIFO order (oldest first)
UC-BATMGT-023 Active Batches Only Only batches with RemainingQuantity > 0 displayed
UC-BATMGT-024 Currency Format All ₹ amounts use Indian format (₹X,XX,XXX.XX)
UC-BATMGT-025 Business Filter Only batches for current business shown

Section: Unit Test Coverage

Test Class Test Count Coverage Areas Related Use Cases
BatchCalculationTests 28 Total value, allocated quantity, FIFO ordering, active batch filtering, consumption logic UC-BATMGT-011, UC-BATMGT-019, UC-BATMGT-020, UC-BATMGT-022, UC-BATMGT-023

Unit Tests Summary

Location: Rabbit.Accounts.Tests/Batches/BatchCalculationTests.cs

Test Categories:

  1. Total Value Tests (5 tests) - RemainingQuantity × UnitCost calculations with edge cases
  2. Allocated Quantity Tests (4 tests) - OriginalQuantity - RemainingQuantity calculations
  3. FIFO Order Tests (2 tests) - Sorting by ReceiptDate ascending (oldest first)
  4. Active Batch Filter Tests (3 tests) - RemainingQuantity > 0 filtering
  5. Batch Consumption Tests (7 tests) - Single batch and multi-batch FIFO consumption with weighted average cost
  6. Date Formatting Tests (4 tests) - dd-MMM-yyyy format validation

FIFO Consumption Logic:

  • Batches sorted by ReceiptDate ascending
  • Oldest batches consumed first
  • Partial consumption supported
  • Weighted average cost calculated from consumed batches

Total Use Cases: 25

05

Vendors

Vendor management with CRUD operations, filters, ratings, and vendor directory.

Route/vendors
Menu5 (Vendors)
Checks55 use cases / 8 sections
Open detailed screen guide

UC-Vendors: Vendor Management Page Use Cases

Page: Vendors.razor Route: /vendors Menu Position: 5 (Vendors)


Overview

Vendor management with CRUD operations, filters, ratings, and vendor directory.


Section: Page Header & Actions

ID Section Action Expected Outcome Controls Affected
UC-VEND-001 Header Load page Title "Vendor Management - [BusinessName]", h2 shows "Vendor Management" with truck icon PageTitle, h2
UC-VEND-002 Header No business selected Alert "Please select a business to view vendors" alert alert-info
UC-VEND-003 Actions Click "Add Vendor" (top right) Modal opens with title "Add New Vendor", empty form vendorModal
UC-VEND-004 Actions Click "Add Vendor" (button bar) Same - modal opens vendorModal

Section: Vendor Filters

ID Section Action Expected Outcome Controls Affected
UC-VEND-005 Filter View filter row 4 dropdown filters: Type, Status, Rating, Location 4 select elements
UC-VEND-006 Filter Select "Supplier" from Type Shows only Supplier type vendors Type select, table rows
UC-VEND-007 Filter Select "Manufacturer" from Type Shows only Manufacturer type vendors Type select, table rows
UC-VEND-008 Filter Select "Distributor" from Type Shows only Distributor type vendors Type select, table rows
UC-VEND-009 Filter Select "Service Provider" from Type Shows only Service Provider type vendors Type select, table rows
UC-VEND-010 Filter Select "Active" from Status Shows only active vendors Status select, table rows
UC-VEND-011 Filter Select "Inactive" from Status Shows only inactive vendors Status select, table rows
UC-VEND-012 Filter Select "5 Star (Excellent)" Shows vendors with rating = 5.0 Rating select, table rows
UC-VEND-013 Filter Select "4+ Star (Very Good)" Shows vendors with rating >= 4.0 Rating select, table rows
UC-VEND-014 Filter Select "3+ Star (Good)" Shows vendors with rating >= 3.0 Rating select, table rows
UC-VEND-015 Filter Select "Below 3 Star" Shows vendors with rating < 3.0 Rating select, table rows
UC-VEND-016 Filter Select location (e.g., "Mumbai") Shows vendors from Mumbai only Location select, table rows
UC-VEND-017 Filter Location options Major Indian cities Location select options

Section: Summary Stats Row

ID Section Action Expected Outcome Controls Affected
UC-VEND-018 Summary Total count Shows "Total: X items" (total vendors) summary-count
UC-VEND-019 Summary Filtered count Shows "Filtered: X items" (after filter applied) summary-filtered
UC-VEND-020 Summary Average Rating Shows "Avg Rating: X.X" (average of all ratings) summary-rating
UC-VEND-021 Summary Active count Shows "Active: X vendors" (count of active) summary-active
UC-VEND-022 Summary Apply filter All summary stats recalculate for filtered data All 4 summary values

Section: Vendor Directory Table

ID Section Action Expected Outcome Controls Affected
UC-VEND-023 Table View table headers 8 columns: Code, Vendor Name, Contact, Phone, Type, Rating, Status, Actions thead th × 8
UC-VEND-024 Table View vendor row Shows: bold code, name+email, contact person, phone, type badge, star rating, status badge, 3 buttons tr cells
UC-VEND-025 Table Code column Bold vendor code strong
UC-VEND-026 Table Vendor Name column Two lines: Vendor Name, Email (muted) d-flex flex-column
UC-VEND-027 Table Contact column Contact person name, or "Not Specified" italic Cell text
UC-VEND-028 Table Phone column Phone number, or "Not Specified" italic Cell text
UC-VEND-029 Table Type = Supplier Info badge "Supplier" badge bg-info
UC-VEND-030 Table Type = Manufacturer Info badge "Manufacturer" badge bg-info
UC-VEND-031 Table Type = Distributor Info badge "Distributor" badge bg-info
UC-VEND-032 Table Type = Not Specified Italic "Not Specified" text text-muted fst-italic
UC-VEND-033 Table Rating display Star icons (★ filled, ☆ empty) + numeric Rating cell
UC-VEND-034 Table Rating 4+ stars Shows filled stars appropriately Star rating display
UC-VEND-035 Table Rating 0.0 Shows "☆☆☆☆☆ 0.0" all empty stars 5 empty stars
UC-VEND-036 Table Status = Active Green badge "Active" badge bg-success
UC-VEND-037 Table Status = Inactive Gray badge "Inactive" badge bg-secondary
UC-VEND-038 Table No vendors Empty state with search icon, "No vendors found", "Try adjusting your filters" Empty state UI

Section: Vendor Actions

ID Section Action Expected Outcome Controls Affected
UC-VEND-039 Actions Click "View" Vendor details view/modal opens View modal
UC-VEND-040 Actions Click "Edit" Edit modal opens with vendor data pre-filled Edit modal
UC-VEND-041 Actions Click "Delete" Confirmation prompt, then vendor deleted Confirm dialog, table update

Section: Add/Edit Vendor Modal

ID Section Action Expected Outcome Controls Affected
UC-VEND-042 Modal View modal fields Fields: Vendor Code (auto-gen), Vendor Name*, Contact Person, Phone, Email, Vendor Type 6 form fields
UC-VEND-043 Modal Vendor Code Auto-generated if empty, placeholder text vendor-code-input
UC-VEND-044 Modal Type dropdown Options: Supplier, Manufacturer, Distributor, Service Provider InputSelect
UC-VEND-045 Modal Submit without name Validation error for required Vendor Name ValidationMessage
UC-VEND-046 Modal Email validation Validates email format on blur vendor-email-input
UC-VEND-047 Modal Validation errors Red alert box with error list alert alert-danger
UC-VEND-048 Modal Validation warnings Yellow alert box with warning list alert alert-warning
UC-VEND-049 Modal Validating state Save button disabled, shows "Validating" with spinner Button state
UC-VEND-050 Modal Save successfully Spinner, vendor saved, modal closes, table refreshes Modal close, table update

Section: Data Validation

ID Validation Requirement
UC-VEND-051 Vendor Count Must show vendors when data exists
UC-VEND-052 Average Rating Average of all vendor ratings
UC-VEND-053 Active Count Count of active vendors
UC-VEND-054 Type Distribution Correct vendor type badges
UC-VEND-055 Rating Range 0.0 to 5.0 range

Section: Unit Test Coverage

Test Class Test Count Coverage Areas Related Use Cases
VendorCalculationTests 53 Rating filters, average calculations, star display, type validation, summary stats UC-VEND-006 to UC-VEND-015, UC-VEND-018 to UC-VEND-022, UC-VEND-029 to UC-VEND-037, UC-VEND-043

Unit Tests Summary

Location: Rabbit.Accounts.Tests/Vendors/VendorCalculationTests.cs

Test Categories:

  1. Rating Filter Tests (13 tests) - 5-star/4+/3+/Below 3 categorization with boundary tests
  2. Average Rating Tests (5 tests) - Average calculation with precision handling
  3. Star Display Tests (5 tests) - ★/☆ display formatting with clamping for out-of-range values
  4. Vendor Type Validation Tests (8 tests) - Supplier/Manufacturer/Distributor/Service Provider validation
  5. Vendor Code Generation Tests (5 tests) - VND-XXXX format generation
  6. Summary Statistics Tests (3 tests) - Total/Filtered/Active/AvgRating calculations
  7. Type Badge Tests (6 tests) - Badge class assignment by vendor type
  8. Status Tests (3 tests) - Active/Inactive filtering and badge classes

Rating Filter Categories:

  • 5 Star (Excellent): rating = 5.0
  • 4+ Star (Very Good): rating ≥ 4.0
  • 3+ Star (Good): rating ≥ 3.0
  • Below 3 Star: rating < 3.0

Total Use Cases: 55

06

Sales Orders

Sales order management with create, edit, view, filter, and payment tracking capabilities.

Route/sales
Menu6 (Sales)
Checks60 use cases / 9 sections
Open detailed screen guide

UC-SALESORD: Sales Orders Page Use Cases

Page: Sales.razor Route: /sales Menu Position: 6 (Sales)


Overview

Sales order management with create, edit, view, filter, and payment tracking capabilities.


Section: Page Header & Actions

ID Section Action Expected Outcome Controls Affected
UC-SALESORD-001 Header Load Sales Orders page Title "Sales Orders - [BusinessName]", h2 shows "Sales Orders" with cart icon PageTitle, h2, fa-shopping-cart icon
UC-SALESORD-002 Header No business selected Alert "Please select a business to view sales" alert alert-info
UC-SALESORD-003 Actions Click "New Sale" button Modal opens with title "New Sales Order", empty form fields salesOrderModal, modal-title
UC-SALESORD-004 Empty State No sales orders Shows cart icon, "No Sales Orders Found" heading, "Create First Sale" button Empty state UI
UC-SALESORD-005 Empty State Click "Create First Sale" Opens New Sales Order modal salesOrderModal

Section: Loading State

ID Section Action Expected Outcome Controls Affected
UC-SALESORD-006 Loading During load Spinner with "Loading sales orders..." text spinner-border, loading text

Section: Sales Filters

ID Section Action Expected Outcome Controls Affected
UC-SALESORD-007 Filter View filter section 4 filters: Customer search, Order Status, Date Range, Payment Status StandardFilterSection, 4 filter fields
UC-SALESORD-008 Filter Type in Customer search Table filters by customer name in real-time customer search input, table rows
UC-SALESORD-009 Filter Select "Pending" from Order Status Shows only Pending status orders Order Status select, table rows
UC-SALESORD-010 Filter Select "Completed" from Order Status Shows only Completed status orders Order Status select, table rows
UC-SALESORD-011 Filter Select "Cancelled" from Order Status Shows only Cancelled status orders Order Status select, table rows
UC-SALESORD-012 Filter Select date range using DateRangeFilter Orders filtered to selected date range DateRangeFilter, table rows
UC-SALESORD-013 Filter Select "Unpaid" from Payment Status Shows orders with ₹0 paid Payment Status select, table rows
UC-SALESORD-014 Filter Select "Partially Paid" from Payment Status Shows orders with partial payment Payment Status select, table rows
UC-SALESORD-015 Filter Select "Fully Paid" from Payment Status Shows orders fully paid Payment Status select, table rows
UC-SALESORD-016 Filter Select "Overdue" from Payment Status Shows orders past due date with balance Payment Status select, table rows
UC-SALESORD-017 Filter Click "Clear" in filter section All filters reset, full order list shown Clear btn, all filters, table rows
UC-SALESORD-018 Filter Combine multiple filters Filters AND together (e.g., Pending + Unpaid) All filter controls, table rows

Section: Summary Row

ID Section Action Expected Outcome Controls Affected
UC-SALESORD-019 Summary View summary row Shows: Total X orders, Filtered X orders, Total Value ₹X, Outstanding ₹X summary-count, summary-filtered, summary-value, summary-outstanding
UC-SALESORD-020 Summary Apply filter All 4 summary values recalculate for filtered orders All summary fields
UC-SALESORD-021 Summary Total Value calculation Sum of TotalAmount for filtered orders summary-value
UC-SALESORD-022 Summary Outstanding calculation Sum of BalanceAmount for filtered orders summary-outstanding

Section: Sales Orders Table

ID Section Action Expected Outcome Controls Affected
UC-SALESORD-023 Table View table headers 10 columns: Order #, Date, Customer, Items, Total Amount, Paid Amount, Balance, Status, Payment Status, Actions thead th × 10
UC-SALESORD-024 Table View order row Shows all columns with correct formatting tr cells
UC-SALESORD-025 Table Order # column Shows order number (bold), notes below if exists (muted) Order # td
UC-SALESORD-026 Table Date column Shows date "dd MMM yyyy", due date below if exists Date td
UC-SALESORD-027 Table Customer column Customer name, phone number below if exists Customer td
UC-SALESORD-028 Table Items column Badge showing "X items" count badge bg-info
UC-SALESORD-029 Table Total Amount column Green bold ₹X,XX,XXX.XX format text-success strong
UC-SALESORD-030 Table Paid Amount column Blue ₹X,XX,XXX.XX format text-primary
UC-SALESORD-031 Table Balance > 0 Red ₹X,XX,XXX.XX format text-danger
UC-SALESORD-032 Table Balance = 0 Green ₹0.00 format text-success
UC-SALESORD-033 Table Status = Pending Badge styling for Pending status Status badge
UC-SALESORD-034 Table Status = Completed Badge styling for Completed status Status badge
UC-SALESORD-035 Table Status = Cancelled Badge styling for Cancelled status Status badge
UC-SALESORD-036 Table Payment = Unpaid Badge for unpaid orders Payment badge
UC-SALESORD-037 Table Payment = Partial Badge for partially paid orders Payment badge
UC-SALESORD-038 Table Payment = Paid Badge for fully paid orders Payment badge
UC-SALESORD-039 Table Payment = Overdue Badge for overdue orders Payment badge
UC-SALESORD-040 Table No matching orders Empty state: search icon, "No sales orders found", "Try adjusting filters" Empty state in table

Section: Order Actions

ID Section Action Expected Outcome Controls Affected
UC-SALESORD-041 Actions Click "View" button Opens order detail view/modal View modal
UC-SALESORD-042 Actions Click "Edit" button Opens edit modal with order data pre-filled Edit modal
UC-SALESORD-043 Actions Click "Delete" button Confirmation prompt, then order deleted Confirm dialog, table update

Section: Add/Edit Sales Order Modal

ID Section Action Expected Outcome Controls Affected
UC-SALESORD-044 Modal View New Sales Order modal Title "New Sales Order", empty form fields Modal title, form
UC-SALESORD-045 Modal View Edit Sales Order modal Title "Edit Sales Order", pre-filled form Modal title, form
UC-SALESORD-046 Modal Order Number field Required field, text input Order Number input
UC-SALESORD-047 Modal Order Date field Required field, date picker Order Date input
UC-SALESORD-048 Modal Customer dropdown Lists all customers, required field Customer select
UC-SALESORD-049 Modal Customers loading Shows "Loading customers..." disabled Customer select disabled
UC-SALESORD-050 Modal Status dropdown Options: Pending, Confirmed, Shipped, Delivered, Cancelled Status select
UC-SALESORD-051 Modal Total Amount field Required field, number input with step 0.01 Total Amount input
UC-SALESORD-052 Modal Discount Amount field Optional field, number input Discount Amount input
UC-SALESORD-053 Modal Notes field Optional textarea, 3 rows Notes textarea
UC-SALESORD-054 Modal Submit without required Validation messages for Order Number, Order Date, Customer, Total Amount ValidationMessage components
UC-SALESORD-055 Modal Click "Save Order" Spinner shows, order saved, modal closes, table refreshes spinner, modal close, table refresh
UC-SALESORD-056 Modal Click "Update" (edit mode) Spinner shows, order updated, modal closes spinner, modal close, table refresh
UC-SALESORD-057 Modal Click "Cancel" Modal closes, no changes saved Modal closes
UC-SALESORD-058 Modal Saving state Save button disabled, spinner visible Button state

Section: Data Validation Requirements

ID Validation Requirement
UC-SALESORD-059 Order Count Must show orders when sales exist in database
UC-SALESORD-060 Currency Format All ₹ amounts use Indian format (₹X,XX,XXX.XX)

Section: Unit Test Coverage

Test Class Test Count Coverage Areas Related Use Cases
SalesOrderCalculationTests 42 Balance, payment status, order status badges, summary calculations, discounts, date filtering UC-SALESORD-013 to UC-SALESORD-016, UC-SALESORD-021, UC-SALESORD-022, UC-SALESORD-028 to UC-SALESORD-039

Unit Tests Summary

Location: Rabbit.Accounts.Tests/Sales/SalesOrderCalculationTests.cs

Test Categories:

  1. Balance Calculation Tests (4 tests) - TotalAmount minus PaidAmount with edge cases
  2. Payment Status Tests (7 tests) - Unpaid/PartiallyPaid/Paid/Overdue determination
  3. Order Status Badge Tests (13 tests) - Badge classes and status validation
  4. Payment Status Badge Tests (4 tests) - Badge class by payment status
  5. Summary Calculation Tests (3 tests) - Total value and outstanding balance sums
  6. Discount Calculation Tests (3 tests) - Final amount after discount
  7. Item Count Display Tests (5 tests) - "X items" pluralization
  8. Date Filtering Tests (3 tests) - Date range boundary testing

Payment Status Logic:

  • Paid: Balance ≤ 0
  • Overdue: Balance > 0 AND DueDate < Today
  • PartiallyPaid: Balance > 0 AND PaidAmount > 0
  • Unpaid: Balance > 0 AND PaidAmount = 0

Total Use Cases: 60

07

FIFO Sales

See the detailed use-case matrix below for expected behavior.

Routen/a
Menun/a
Checks69 use cases / 0 sections
Open detailed screen guide

FIFO Sales Use Cases (FifoSales.razor)

ID Section Action Expected Outcome Controls
UC-FIFO-001 Page Load Navigate to /fifo-sales Loads FIFO sales dashboard Container
UC-FIFO-002 Auth CustomerOperator required Authorized access Authorize
UC-FIFO-003 Header New FIFO Sale button ShowNewSaleModal opens modal Button primary
UC-FIFO-004 Loading Data loading Shows spinner with text Spinner
UC-FIFO-005 Summary Card Total Sales ₹N2 totalSalesAmount Card primary
UC-FIFO-006 Summary Card Total Profit ₹N2 totalProfit Card success
UC-FIFO-007 Summary Card Avg Profit Margin N1% averageProfitMargin Card info
UC-FIFO-008 Summary Card Sales Count salesAnalysis.Count Card warning
UC-FIFO-009 Table Date column dd/MM/yyyy HH:mm format td small
UC-FIFO-010 Table Product column Bold product name td strong
UC-FIFO-011 Table Quantity Badge bg-primary Badge
UC-FIFO-012 Table Batch Info BatchNumber + Date stacked td flex-column
UC-FIFO-013 Table Cost/Unit ₹N2 text-success Span
UC-FIFO-014 Table Sale Price ₹N2 text-primary Span
UC-FIFO-015 Table Profit/Unit ₹N2 conditional color Span
UC-FIFO-016 Table Total Profit ₹N2 conditional color Span
UC-FIFO-017 Table Margin % N1% conditional color Span
UC-FIFO-018 Empty State No sales Icon + message + create btn Div text-center
UC-FIFO-019 Table Limit Display Take(20) records Take
UC-FIFO-020 Modal Show modal showModal JS call Modal
UC-FIFO-021 Modal Customer select customers dropdown Select
UC-FIFO-022 Modal Product select products dropdown Select
UC-FIFO-023 Modal Quantity input saleQuantity min=1 Input number
UC-FIFO-024 Modal Unit Selling Price unitSellingPrice step=0.01 Input number
UC-FIFO-025 Batch Preview No product selected Info icon + message Div text-center
UC-FIFO-026 Batch Preview Invalid preview Alert danger with error Alert danger
UC-FIFO-027 Batch Preview Valid preview Summary + batch cards + profit Card
UC-FIFO-028 Preview Summary Requested qty RequestedQuantity Strong text-primary
UC-FIFO-029 Preview Summary Available qty TotalInventoryAvailable Strong text-success
UC-FIFO-030 Preview Summary Avg Cost ₹N2 WeightedAverageCost Strong text-info
UC-FIFO-031 Batch Card Batch number Strong header Card header
UC-FIFO-032 Batch Card Batch date dd/MM/yyyy format Small text-muted
UC-FIFO-033 Batch Card Consumed qty Badge bg-primary Badge
UC-FIFO-034 Batch Card Unit Cost ₹N2 text-success Strong
UC-FIFO-035 Batch Card Total Cost ₹N2 text-success Strong
UC-FIFO-036 Profit Analysis Total COGS ₹N2 text-success Strong
UC-FIFO-037 Profit Analysis Revenue ₹N2 text-primary Strong
UC-FIFO-038 Profit Analysis Profit ₹N2 conditional color Strong
UC-FIFO-039 Profit Analysis Margin % N1% conditional color Strong
UC-FIFO-040 CanProcessSale Validation All fields + valid preview Boolean
UC-FIFO-041 Process Sale Submit ProcessFifoSale service call Button primary
UC-FIFO-042 Process Sale Success hideModal + toast + reload JS interop
UC-FIFO-043 Process Sale Error Toast with error message JS interop
UC-FIFO-044 Product Change OnProductChanged Sets price + UpdateBatchPreview Event
UC-FIFO-045 Quantity Change OnQuantityChanged UpdateBatchPreview Event
UC-FIFO-046 Calculate Profit CalculateProfit COGS/Revenue/Profit/Margin Method
UC-FIFO-047 Modal Cancel Click Cancel data-bs-dismiss="modal" Button secondary
UC-FIFO-048 Data test New sale btn data-test="new-fifo-sale-btn" Attribute
UC-FIFO-049 Data test Table data-test="fifo-sales-table" Attribute
UC-FIFO-050 Data test Modal data-test="fifo-sale-modal" Attribute
UC-FIFO-051 Data test Customer select data-test="customer-select" Attribute
UC-FIFO-052 Data test Product select data-test="product-select" Attribute
UC-FIFO-053 Data test Quantity input data-test="quantity-input" Attribute
UC-FIFO-054 Data test Price input data-test="price-input" Attribute
UC-FIFO-055 Data test Process btn data-test="process-sale-btn" Attribute

Unit Test Coverage

Test Project: Rabbit.Accounts.Tests
Test Location: FifoSales/
Total Tests: 42
Status: ✅ All Passing

Unit Test Classes

Test Class Tests Description
FifoSalesAnalysisTests 18 Tests for profit calculations: ProfitPerUnit, TotalProfit, ProfitMargin
SaleBatchResultTests 6 Tests for per-batch profit calculations during FIFO sales
SalesBatchPreviewTests 10 Tests for FIFO preview: WAC, inventory availability, batch consumption order
FifoSaleResultTests 8 Tests for complete sale result: TotalProfit, OverallProfitMargin, batch aggregation

Unit Test Details by Use Case

Use Case Unit Test Coverage Test File
UC-FIFO-015 (Profit/Unit) ✅ 5 tests FifoSalesAnalysisTests.cs
UC-FIFO-016 (Total Profit) ✅ 4 tests FifoSalesAnalysisTests.cs
UC-FIFO-017 (Margin %) ✅ 6 tests FifoSalesAnalysisTests.cs
UC-FIFO-028 (Requested qty) ✅ 2 tests SalesBatchPreviewTests.cs
UC-FIFO-029 (Available qty) ✅ 2 tests SalesBatchPreviewTests.cs
UC-FIFO-030 (Avg Cost/WAC) ✅ 2 tests SalesBatchPreviewTests.cs
UC-FIFO-031-035 (Batch Cards) ✅ 4 tests SalesBatchPreviewTests.cs
UC-FIFO-036 (Total COGS) ✅ 2 tests FifoSaleResultTests.cs
UC-FIFO-037 (Revenue) ✅ 2 tests FifoSaleResultTests.cs
UC-FIFO-038 (Profit) ✅ 3 tests FifoSaleResultTests.cs
UC-FIFO-039 (Margin %) ✅ 4 tests FifoSaleResultTests.cs

Non-Unit-Testable Use Cases (UI/Integration)

Use Case Range Reason
UC-FIFO-001 to UC-FIFO-014 UI rendering, navigation, authentication - covered by Playwright E2E tests
UC-FIFO-018 to UC-FIFO-027 Modal interactions, JS interop - covered by Playwright E2E tests
UC-FIFO-040 to UC-FIFO-055 Form validation, event handlers, data attributes - covered by Playwright E2E tests

Running Unit Tests

# Run all FIFO Sales unit tests
dotnet test Rabbit.Accounts.Tests --filter "FullyQualifiedName~FifoSales"

# Run with detailed output
dotnet test Rabbit.Accounts.Tests --logger "console;verbosity=detailed"
08

Accounts Payable

Accounts payable management with outstanding balances, payment recording, and payment history.

Route/payments
Menu8 (Accounts Payable)
Checks40 use cases / 7 sections
Open detailed screen guide

UC-PAY: Accounts Payable Page Use Cases

Page: Payments.razor Route: /payments Menu Position: 8 (Accounts Payable)


Overview

Accounts payable management with outstanding balances, payment recording, and payment history.


Section: Page Header & Access Control

ID Section Action Expected Outcome Controls Affected
UC-PAY-001 Header Load page "Accounts Payable Management" title with credit-card icon Page title
UC-PAY-002 Header No business selected Info alert: "Please select a business to view and manage accounts payable" alert alert-info
UC-PAY-003 Header Business selected Page loads with data for selected business Business context
UC-PAY-004 Header Click "Record Payable" Opens modal to record new payable recordPaymentModal

Section: Tab Navigation

ID Section Action Expected Outcome Controls Affected
UC-PAY-005 Tabs View tabs 2 tabs: "Outstanding Payables", "Payable History" nav-tabs
UC-PAY-006 Tabs Default tab "Outstanding Payables" tab active on load #outstanding-tab active
UC-PAY-007 Tabs Click "Payable History" Switches to history tab, shows payment history table #history-tab active
UC-PAY-008 Tabs Click "Outstanding Payables" Returns to outstanding tab #outstanding-tab active

Section: Outstanding Payables Summary

ID Section Action Expected Outcome Controls Affected
UC-PAY-009 Summary View header "Outstanding Customer Balances" with Refresh button Card header
UC-PAY-010 Summary Click Refresh Calls LoadOutstandingBalances, refreshes data Refresh button
UC-PAY-011 Summary Outstanding total Shows ₹X.XX format for TotalOutstanding Summary row
UC-PAY-012 Summary Today collections Shows ₹X.XX for TodayCollections Summary row
UC-PAY-013 Summary Overdue customers Shows "X customers" count for overdue Summary row
UC-PAY-014 Summary Monthly collections Shows ₹X.XX for MonthlyCollections Summary row

Section: Outstanding Balances Table

ID Section Action Expected Outcome Controls Affected
UC-PAY-015 Table View headers 6 columns: Customer, Phone, Outstanding Amount, Credit Limit, Days Overdue, Actions thead
UC-PAY-016 Table Customer cell Name bold, ID substring below Customer column
UC-PAY-017 Table Outstanding > 0 Red bold text (text-danger) Amount cell
UC-PAY-018 Table Outstanding ≤ 0 Green text (text-success) Amount cell
UC-PAY-019 Table Days > 30 Row highlighted (table-warning), red badge Row, badge
UC-PAY-020 Table Days 16-30 Yellow warning badge Days badge
UC-PAY-021 Table Days ≤ 15 Green success badge Days badge
UC-PAY-022 Table Click Record Payment Calls RecordPayment(customerId) Money bill button
UC-PAY-023 Table Click View History Calls ViewCustomerHistory(customerId) History button
UC-PAY-024 Table Click Send Reminder Calls SendReminder(customerId) Bell button
UC-PAY-025 Table Empty state Check icon with "All customers are up to date" Empty message

Section: Payment History Table

ID Section Action Expected Outcome Controls Affected
UC-PAY-026 History View headers 7 columns: Date, Customer, Payable #, Amount, Method, Reference, Actions thead
UC-PAY-027 History Click Refresh Calls LoadPaymentHistory Refresh button
UC-PAY-028 History Date format DD/MM/YYYY on top, HH:mm below Date cell
UC-PAY-029 History Payment number Badge bg-secondary style Payable # cell
UC-PAY-030 History Amount Green text-success, ₹X.XX format Amount cell
UC-PAY-031 History Method badge Color varies by GetPaymentMethodBadgeClass Method cell
UC-PAY-032 History Click View Calls ViewPaymentDetails(paymentId) View button
UC-PAY-033 History Click Print Calls PrintReceipt(paymentId) Print button
UC-PAY-034 History Empty state History icon with "No Payment History" message Empty message

Section: Record Payable Modal

ID Section Action Expected Outcome Controls Affected
UC-PAY-035 Modal View modal Title "Record Payable", placeholder message Modal content
UC-PAY-036 Modal Click close Modal dismisses Close button

Section: Data Validation Requirements

ID Validation Requirement
UC-PAY-037 Currency Format All amounts in ₹X,XX,XXX.XX Indian format
UC-PAY-038 Date Format DD/MM/YYYY for dates
UC-PAY-039 Overdue Calc DaysSinceLastPayment calculated from last payment date
UC-PAY-040 Authorization Requires CustomerOperator policy

Total Use Cases: 40

09

Accounts Receivable

Accounts receivable management for tracking customer payments, outstanding invoices, and payment collection.

Route/accounts-receivable
Menu9 (Accounts Receivable)
Checks22 use cases / 6 sections
Open detailed screen guide

UC-AccountsReceivable: Accounts Receivable Page Use Cases

Page: AccountsReceivable.razor (if exists) or Sales.razor with AR view Route: /accounts-receivable Menu Position: 9 (Accounts Receivable)


Overview

Accounts receivable management for tracking customer payments, outstanding invoices, and payment collection.


Section: Page Header

ID Section Action Expected Outcome Controls Affected
UC-AR-001 Header Load page Title "Accounts Receivable - [BusinessName]" PageTitle, h2
UC-AR-002 Header No business selected Alert "Please select a business to view accounts receivable" alert alert-info

Section: Summary Cards

ID Section Action Expected Outcome Controls Affected
UC-AR-003 Summary Total Receivables Shows total outstanding amount (₹) Summary card
UC-AR-004 Summary Overdue Amount Shows overdue receivables (₹) Summary card danger
UC-AR-005 Summary Collected This Month Shows payments received this month (₹) Summary card success
UC-AR-006 Summary Pending Invoices Shows count of unpaid invoices Summary card warning

Section: Filters

ID Section Action Expected Outcome Controls Affected
UC-AR-007 Filter Customer filter Filter by customer name/code Customer select
UC-AR-008 Filter Date range Filter by invoice date range Date inputs
UC-AR-009 Filter Status filter Filter by payment status Status select
UC-AR-010 Filter Aging filter Filter by aging bucket (0-30, 31-60, 61-90, 90+) Aging select

Section: Receivables Table

ID Section Action Expected Outcome Controls Affected
UC-AR-011 Table View columns Invoice #, Customer, Date, Amount, Paid, Balance, Due Date, Age, Actions Table headers
UC-AR-012 Table Invoice row Shows invoice details with aging info Table row
UC-AR-013 Table Overdue row Red highlight for overdue invoices Row styling
UC-AR-014 Table Record payment Opens payment recording modal Action button
UC-AR-015 Table View details Opens invoice detail modal Action button

Section: Aging Analysis

ID Section Action Expected Outcome Controls Affected
UC-AR-016 Aging Current (0-30 days) Shows count and amount for current receivables Aging bucket
UC-AR-017 Aging 31-60 days Shows count and amount for 31-60 day receivables Aging bucket
UC-AR-018 Aging 61-90 days Shows count and amount for 61-90 day receivables Aging bucket
UC-AR-019 Aging Over 90 days Shows count and amount for 90+ day receivables Aging bucket

Section: Data Validation

ID Validation Requirement
UC-AR-020 Totals Match Summary totals match table sums
UC-AR-021 Aging Accuracy Aging buckets calculated correctly from due dates
UC-AR-022 Currency Format All amounts in ₹ Indian format

Total Use Cases: 22

Note: This page may share functionality with Sales/Receipts pages. Update use cases based on actual implementation.

10

Receipts

Receipt processing with OCR upload, AI-powered text extraction, and order creation from receipts.

Route/receipts
Menu10 (Receipts)
Checks45 use cases / 6 sections
Open detailed screen guide

UC-REC: Receipts Page Use Cases

Page: Receipts.razor Route: /receipts Menu Position: 10 (Receipts)


Overview

Receipt processing with OCR upload, AI-powered text extraction, and order creation from receipts.


Section: Page Header & Access Control

ID Section Action Expected Outcome Controls Affected
UC-REC-001 Header Load page "Receipt Processing" title with receipt icon Page title
UC-REC-002 Header No business selected Info alert: "Please select a business to view and upload receipts" alert alert-info
UC-REC-003 Header Click "Upload Receipt" Opens upload modal upload-receipt-btn, uploadModal
UC-REC-004 Auth Access control Requires CustomerAdmin policy (higher than Operator) Authorization

Section: Processing Status Alerts

ID Section Action Expected Outcome Controls Affected
UC-REC-005 Status Processing active Blue info alert with spinner, "Processing Receipt..." message alert alert-info
UC-REC-006 Status Error occurred Red danger alert with message, dismissible alert alert-danger
UC-REC-007 Status Success Green success alert with message, dismissible alert alert-success
UC-REC-008 Status Dismiss error Clears ErrorMessage on button click Close button
UC-REC-009 Status Dismiss success Clears SuccessMessage on button click Close button

Section: Recent Receipts Summary

ID Section Action Expected Outcome Controls Affected
UC-REC-010 Summary View header "Recent Receipts" with Refresh button Card header
UC-REC-011 Summary Click Refresh Calls LoadReceiptHistory Refresh button
UC-REC-012 Summary Total count Shows "X receipts" total Summary row
UC-REC-013 Summary Processed count Count where ProcessingStatus = "Completed" Summary row
UC-REC-014 Summary Failed count Count where ProcessingStatus = "Failed" Summary row
UC-REC-015 Summary Processing count Count where status not Completed/Failed Summary row

Section: Receipts Table

ID Section Action Expected Outcome Controls Affected
UC-REC-016 Table View headers 6 columns: Date, File Name, Status, Vendor, Amount, Actions thead
UC-REC-017 Table Date format DD/MM/YYYY HH:mm format receipt-date
UC-REC-018 Table File name cell Bold name, file size in KB below receipt-filename
UC-REC-019 Table Status Completed Green "Processed" badge receipt-status
UC-REC-020 Table Status Failed Red "Failed" badge receipt-status
UC-REC-021 Table Status other Yellow "Processing" badge receipt-status
UC-REC-022 Table Vendor extracted Shows vendor from ExtractedText receipt-vendor
UC-REC-023 Table No vendor Shows "-" muted receipt-vendor
UC-REC-024 Table Amount extracted Shows ₹X from ExtractedText receipt-amount
UC-REC-025 Table No amount Shows "-" muted receipt-amount
UC-REC-026 Table Click View Calls ViewReceipt(imageId) View button
UC-REC-027 Table Click Create Order Calls CreateSalesOrder(imageId), only if Completed and no SalesOrderId Create Order button
UC-REC-028 Table Click Delete Calls DeleteReceipt(imageId) Delete button
UC-REC-029 Table Max display Shows max 15 receipts (Take(15)) Pagination
UC-REC-030 Table Empty state Receipt icon with "No receipts uploaded yet" message Empty message

Section: Upload Modal

ID Section Action Expected Outcome Controls Affected
UC-REC-031 Modal View modal Title "Upload Receipt", file input, format info receipt-upload-modal
UC-REC-032 Modal File formats Accepts image/* (JPG, PNG, WebP), max 20MB receipt-file-input accept
UC-REC-033 Modal Select file OnFileSelected called, file preview shown InputFile
UC-REC-034 Modal File selected Blue info alert shows name, size, content type File info alert
UC-REC-035 Modal No file selected Upload button disabled Submit button disabled
UC-REC-036 Modal Processing active Upload button disabled with spinner Submit button
UC-REC-037 Modal Click Cancel Modal closes receipt-modal-cancel-btn
UC-REC-038 Modal Click Upload Calls HandleFileUpload, processes with AI receipt-upload-submit
UC-REC-039 Modal Click X Modal closes receipt-modal-close

Section: Data Validation Requirements

ID Validation Requirement
UC-REC-040 File Size Max 20MB per file
UC-REC-041 File Types image/* (JPG, PNG, WebP)
UC-REC-042 AI Processing ExtractedText populated by AI OCR
UC-REC-043 Order Link SalesOrderId links processed receipt to created order
UC-REC-044 Date Format DD/MM/YYYY HH:mm format
UC-REC-045 Authorization Requires CustomerAdmin policy

Total Use Cases: 45

11

Reports Index

Reports hub page providing navigation to 13 different report types across 4 categories: Sales, Customer, Inventory, and Financial reports. Each category has a card with clickable report tiles that navigate to specific report pages.

Route/reports
Menu11 (Main Navigation > Reports)
Checks61 use cases / 11 sections
Open detailed screen guide

UC-RPTIDX: Reports Index Page Use Cases

Page: ReportsIndex.razor Route: /reports Menu Position: 11 (Main Navigation > Reports)


Overview

Reports hub page providing navigation to 13 different report types across 4 categories: Sales, Customer, Inventory, and Financial reports. Each category has a card with clickable report tiles that navigate to specific report pages.


Section: Page Header & Actions

ID Section Action Expected Outcome Controls Affected
UC-RPTIDX-001 Header Load page "Reports & Analytics" title with chart-bar icon, page loads Page title
UC-RPTIDX-002 Header No business selected Info alert "Please select a business to view reports" Alert message
UC-RPTIDX-003 Header Click Refresh Calls LoadReportData(), refreshes KPI cards Refresh button
UC-RPTIDX-004 Header Click Export Report Downloads CSV with report summary data Export button

Section: KPI Summary Cards (4 cards)

ID Section Action Expected Outcome Controls Affected
UC-RPTIDX-005 KPI Total Sales Card Blue (bg-primary) card with ₹ total sales for this month Card 1
UC-RPTIDX-006 KPI Active Customers Card Green (bg-success) card with customer count this month Card 2
UC-RPTIDX-007 KPI Outstanding Card Yellow (bg-warning) card with ₹ total due Card 3
UC-RPTIDX-008 KPI Avg Order Value Card Info (bg-info) card with ₹ average order value Card 4
UC-RPTIDX-009 KPI Card icons chart-line, users, exclamation-triangle, shopping-cart Icons

Section: Sales Reports Card (Blue Header)

ID Section Action Expected Outcome Controls Affected
UC-RPTIDX-010 Sales View card header "Sales Reports" with chart-line icon, blue bg Card header
UC-RPTIDX-011 Sales Click Sales Summary Navigates to /sales-summary-report, shows toast "Opening Sales Summary Report..." Report tile 1
UC-RPTIDX-012 Sales Sales Summary status Shows badge from ReportConfigurationService (Enabled/Disabled) Status badge
UC-RPTIDX-013 Sales Sales Summary disabled Button disabled when IsReportEnabled("sales-summary") = false Disabled state
UC-RPTIDX-014 Sales Click Top Products Navigates to /fifo-sales Report tile 2
UC-RPTIDX-015 Sales Top Products description "Best performing products by sales volume" Description
UC-RPTIDX-016 Sales Click Sales Trends Navigates to /batch-profitability-analytics Report tile 3
UC-RPTIDX-017 Sales Sales Trends description "Daily, weekly, and monthly sales patterns" Description

Section: Customer Reports Card (Green Header)

ID Section Action Expected Outcome Controls Affected
UC-RPTIDX-018 Customer View card header "Customer Reports" with users icon, green bg Card header
UC-RPTIDX-019 Customer Click Customer Analysis Navigates to /customer-analysis-report Report tile 1
UC-RPTIDX-020 Customer Customer Analysis description "Customer lifetime value and purchase patterns" Description
UC-RPTIDX-021 Customer Click Outstanding Balances Navigates to /customer-analysis-report Report tile 2
UC-RPTIDX-022 Customer Outstanding description "Customer payment status and overdue amounts" Description
UC-RPTIDX-023 Customer Click Customer Activity Navigates to /customer-analysis-report Report tile 3
UC-RPTIDX-024 Customer Customer Activity description "Active vs inactive customer analysis" Description

Section: Inventory Reports Card (Yellow/Warning Header)

ID Section Action Expected Outcome Controls Affected
UC-RPTIDX-025 Inventory View card header "Inventory Reports" with boxes icon, yellow bg Card header
UC-RPTIDX-026 Inventory Click Stock Levels Navigates to /inventory-summary-report Report tile 1
UC-RPTIDX-027 Inventory Stock Levels description "Current inventory levels and stock alerts" Description
UC-RPTIDX-028 Inventory Click Inventory Valuation Navigates to /inventory-summary-report Report tile 2
UC-RPTIDX-029 Inventory Valuation description "Total inventory value and cost analysis" Description
UC-RPTIDX-030 Inventory Click Slow Moving Items Navigates to /inventory-summary-report Report tile 3
UC-RPTIDX-031 Inventory Slow Moving description "Products with low turnover rates" Description

Section: Financial Reports Card (Info/Cyan Header)

ID Section Action Expected Outcome Controls Affected
UC-RPTIDX-032 Financial View card header "Financial Reports" with calculator icon, info bg Card header
UC-RPTIDX-033 Financial Click Profit & Loss Navigates to /batch-profitability-analytics Report tile 1
UC-RPTIDX-034 Financial P&L description "Revenue, costs, and profitability analysis" Description
UC-RPTIDX-035 Financial Click Cash Flow Navigates to /vendor-payments Report tile 2
UC-RPTIDX-036 Financial Cash Flow description "Cash movement and liquidity analysis" Description
UC-RPTIDX-037 Financial Click Tax Summary Shows "Coming Soon" alert modal (not implemented) Report tile 3
UC-RPTIDX-038 Financial Tax Summary badge Yellow "Coming Soon" badge visible Warning badge
UC-RPTIDX-039 Financial Tax Summary message Alert: "The Tax Summary Report feature is coming soon!" Alert modal
UC-RPTIDX-040 Financial Click Cost Variance Navigates to /cost-variance-reporting Report tile 4
UC-RPTIDX-041 Financial Cost Variance badge Green "Available" badge visible Success badge
UC-RPTIDX-042 Financial Cost Variance description "Cost trend analysis and purchasing recommendations" Description

Section: Export Functionality

ID Section Action Expected Outcome Controls Affected
UC-RPTIDX-043 Export Click Export Generates CSV file with summary data Export button
UC-RPTIDX-044 Export CSV header "Report Type,Value,Description" CSV content
UC-RPTIDX-045 Export CSV filename reports_summary_YYYYMMDD_HHmmss.csv format Downloaded file
UC-RPTIDX-046 Export CSV contains Total Sales, Active Customers, Outstanding, Avg Order Value CSV rows
UC-RPTIDX-047 Export Export error Alert "Export failed. Please try again." Error handling

Section: Navigation Toast Feedback

ID Section Action Expected Outcome Controls Affected
UC-RPTIDX-048 Toast Navigate to report Toast "Opening [Report Name]..." appears Toast notification
UC-RPTIDX-049 Toast Brief delay 500ms delay for user feedback before navigation Transition
UC-RPTIDX-050 Toast Generation error Toast "Error generating report: [message]" Error toast

Section: Authorization & Business Context

ID Section Action Expected Outcome Controls Affected
UC-RPTIDX-051 Auth Policy requirement CustomerAdmin policy required Authorization
UC-RPTIDX-052 Context Business selection Data scoped to BusinessSelection.GetCurrentBusinessIdOrDefault() Business filter
UC-RPTIDX-053 Context Business change HandleBusinessChanged refreshes data Event handler
UC-RPTIDX-054 Context Dispose Unsubscribes from BusinessSelection.OnChanged Cleanup

Section: Report Tile States

ID Section Action Expected Outcome Controls Affected
UC-RPTIDX-055 Tile Enabled report Button clickable, navigates to report Enabled state
UC-RPTIDX-056 Tile Disabled report Button disabled, grayed out Disabled state
UC-RPTIDX-057 Tile Generating state isGeneratingReport=true disables interactions Loading state
UC-RPTIDX-058 Tile Configuration service ReportConfigurationService provides tile configs Service

Section: TODO - Missing Implementations

ID TODO Item Current Behavior Expected Behavior
UC-RPTIDX-TODO-001 Tax Summary Report Shows "Coming Soon" alert Should navigate to /tax-summary-report when implemented
UC-RPTIDX-TODO-002 Report Configuration Only sales-summary uses config All tiles should use ReportConfigurationService for enable/disable
UC-RPTIDX-TODO-003 Dedicated Report Pages Some tiles share pages Each tile should link to a purpose-built page with proper parameters

Total Use Cases: 58 (+ 3 TODO items)

11a

Financial Reports

Financial reporting suite including Balance Sheet, Profit & Loss, Cash Flow, Trial Balance, General Ledger, and Tax Reports.

Routen/a
Menu11 (Reports)
Checks133 use cases / 36 sections
Open detailed screen guide

UC-RPT: Financial Reports Use Cases

Pages: Various Report pages Routes: /reports/* Menu Position: 11 (Reports)


Overview

Financial reporting suite including Balance Sheet, Profit & Loss, Cash Flow, Trial Balance, General Ledger, and Tax Reports.


Balance Sheet Report (/reports/balance-sheet)

Section: Page Header & Navigation

ID Section Action Expected Outcome Controls Affected
UC-RPT-001 Header Load Balance Sheet page Title "Balance Sheet - Rabbit Accounts", h2 with balance-scale icon, breadcrumb: Home > Reports > Balance Sheet PageTitle, h2, breadcrumb
UC-RPT-002 Header Click "Home" in breadcrumb Navigates to Dashboard Navigation
UC-RPT-003 Header Click "Reports" in breadcrumb Navigates to Reports index Navigation
UC-RPT-004 Actions Click "Refresh" button Reloads report data for current date Refresh btn, data reload
UC-RPT-005 Actions Click "Export Excel" button Downloads BalanceSheet_YYYYMMDD.xlsx file Browser download
UC-RPT-006 Actions Click "Export PDF" button Downloads BalanceSheet_YYYYMMDD.pdf file Browser download

Section: Date Selection

ID Section Action Expected Outcome Controls Affected
UC-RPT-007 Filter Default date on load As of Date = today As of Date input
UC-RPT-008 Filter Change As of Date Date picker updates, no auto-load As of Date input
UC-RPT-009 Filter Click "Generate Report" Loading spinner, then report displays for selected date spinner, report content
UC-RPT-010 Filter Click "Today" quick button Sets date to today, generates report Today btn, As of Date input, report
UC-RPT-011 Filter Click "Month End" quick button Sets date to last day of current month, generates report Month End btn, As of Date input, report
UC-RPT-012 Filter Click "Year End" quick button Sets date to Dec 31 of current year, generates report Year End btn, As of Date input, report

Section: Loading State

ID Section Action Expected Outcome Controls Affected
UC-RPT-013 Loading During load Spinner with "Generating Balance Sheet..." text spinner-border, loading text

Section: Report Header Card

ID Section Action Expected Outcome Controls Affected
UC-RPT-014 Report Header View header card Shows: Business Name (h3), "Balance Sheet" (h5), "As of DD MMMM YYYY" date Report header card

Section: Summary Cards (4 cards)

ID Section Action Expected Outcome Controls Affected
UC-RPT-015 Total Assets Card View card Blue border, h6 "Total Assets", h4 amount ₹X,XX,XXX.XX, briefcase icon card border-primary
UC-RPT-016 Total Liabilities Card View card Red border, h6 "Total Liabilities", h4 amount, money-bill icon card border-danger
UC-RPT-017 Total Equity Card View card Green border, h6 "Total Equity", h4 amount, chart-pie icon card border-success
UC-RPT-018 Working Capital Card View card Blue border, h6 "Working Capital", h4 amount, coins icon card border-info

Section: Financial Ratios Cards

ID Section Action Expected Outcome Controls Affected
UC-RPT-019 Current Ratio View card Shows ratio (N2 format), "Target: ≥ 1.5", color: green if ≥1.5, yellow if ≥1.0, red if <1.0 Current Ratio card
UC-RPT-020 Quick Ratio View card Shows ratio, "Target: ≥ 1.0", color: green if ≥1.0, yellow if ≥0.75, red if <0.75 Quick Ratio card
UC-RPT-021 Debt to Equity View card Shows ratio, "Target: ≤ 1.0", color: green if ≤1.0, yellow if ≤2.0, red if >2.0 Debt to Equity card
UC-RPT-022 Current Period Profit View card Shows ₹ amount, "Year to Date", green if ≥0, red if <0 Current Period Profit card

Section: Assets Table

ID Section Action Expected Outcome Controls Affected
UC-RPT-023 Assets Header View table header Blue bg "ASSETS", columns: Account, Amount (₹) card-header bg-primary
UC-RPT-024 Current Assets View section Header row "CURRENT ASSETS", line items: Cash and Bank, Accounts Receivable, Inventory, Other Current Assets Table rows
UC-RPT-025 Current Assets Total View total row "Total Current Assets" with amount table-secondary row
UC-RPT-026 Fixed Assets View section Header row "FIXED ASSETS", line item: Property, Plant & Equipment Table rows
UC-RPT-027 Fixed Assets Total View total row "Total Fixed Assets" with amount table-secondary row
UC-RPT-028 Total Assets Row View total Blue bg "TOTAL ASSETS" with ₹X,XX,XXX.XX table-primary row

Section: Liabilities & Equity Table

ID Section Action Expected Outcome Controls Affected
UC-RPT-029 L&E Header View table header Red bg "LIABILITIES & EQUITY", columns: Account, Amount (₹) card-header bg-danger
UC-RPT-030 Current Liabilities View section Header "CURRENT LIABILITIES", items: Accounts Payable, Short-term Loans, Other Current Liabilities Table rows
UC-RPT-031 Current Liabilities Total View total "Total Current Liabilities" with amount table-secondary row
UC-RPT-032 Long-term Liabilities View section Header "LONG-TERM LIABILITIES", item: Long-term Loans Table rows
UC-RPT-033 Total Liabilities View total "Total Liabilities" with amount table-secondary row
UC-RPT-034 Equity Section View section Header "EQUITY", items: Owner's Equity, Retained Earnings, Current Period Profit Table rows
UC-RPT-035 Profit Color View Current Period Profit Green if ≥0, red if <0 text-success or text-danger
UC-RPT-036 Total Equity View total "Total Equity" with amount table-secondary row
UC-RPT-037 Total L&E Row View total Red bg "TOTAL LIABILITIES & EQUITY" with ₹ amount table-danger row

Section: Balance Verification Alert

ID Section Action Expected Outcome Controls Affected
UC-RPT-038 Balance Check Assets = L + E Green success alert "Balance Sheet is Balanced ✓", check-circle icon alert-success
UC-RPT-039 Balance Check Assets ≠ L + E Red danger alert "Balance Sheet is Out of Balance!", shows difference amount alert-danger

Section: Financial Position Chart

ID Section Action Expected Outcome Controls Affected
UC-RPT-040 Chart View chart Bar chart with 5 bars: Current Assets, Fixed Assets, Current Liabilities, Long-term Liabilities, Equity ApexChart
UC-RPT-041 Chart Hover on bar Tooltip shows category and amount Chart tooltip

Section: Data Validation

ID Validation Requirement
UC-RPT-042 Balance Equation Total Assets = Total Liabilities + Total Equity
UC-RPT-043 Currency Format All amounts in ₹X,XX,XXX.XX format
UC-RPT-044 Export Files Excel/PDF exports must download successfully

Profit & Loss Statement (/reports/profit-loss-statement)

Section: Page Header & Navigation

ID Section Action Expected Outcome Controls Affected
UC-RPT-045 Header Load P&L page Title "Profit & Loss Statement - Rabbit Accounts", h2 with chart-line icon, breadcrumb PageTitle, h2, breadcrumb
UC-RPT-046 Actions Click "Refresh" Reloads report Refresh btn
UC-RPT-047 Actions Click "Export Excel" Downloads ProfitLoss_YYYYMMDD.xlsx Browser download
UC-RPT-048 Actions Click "Export PDF" Downloads ProfitLoss_YYYYMMDD.pdf Browser download

Section: Period Filter

ID Section Action Expected Outcome Controls Affected
UC-RPT-049 Filter View filter card 4 controls: Period dropdown, From Date, To Date, Generate Report button Filter card
UC-RPT-050 Filter Select "This Month" From/To dates auto-set to current month, fields disabled Period select, date inputs disabled
UC-RPT-051 Filter Select "This Quarter" From/To dates auto-set to current quarter Period select, date inputs
UC-RPT-052 Filter Select "This Year" From/To dates auto-set to Jan 1 - Dec 31 Period select, date inputs
UC-RPT-053 Filter Select "Custom" Date inputs become enabled for manual entry Period select=custom, date inputs enabled
UC-RPT-054 Filter Click "Generate Report" Loading spinner, report generates for selected period spinner, report content

Section: Loading State

ID Section Action Expected Outcome Controls Affected
UC-RPT-055 Loading During load Spinner with "Generating Profit & Loss Statement..." spinner-border, loading text

Section: Report Header Card

ID Section Action Expected Outcome Controls Affected
UC-RPT-056 Report Header View header Business Name, "Profit & Loss Statement", "For the period: DD MMM YYYY to DD MMM YYYY" Header card

Section: Key Metrics Cards (4 cards)

ID Section Action Expected Outcome Controls Affected
UC-RPT-057 Net Revenue Card View card Blue bg, h6 "Net Revenue", h4 ₹ amount, rupee icon card bg-primary
UC-RPT-058 Gross Profit Card View card Green bg, h6 "Gross Profit", h4 ₹ amount, margin %, chart icon card bg-success
UC-RPT-059 Operating Profit Card View card Blue bg, h6 "Operating Profit", h4 ₹ amount, margin %, cogs icon card bg-info
UC-RPT-060 Net Profit Card View card Green/Red bg based on profit/loss, h6 "Net Profit", h4 ₹ amount, margin %, trophy icon card bg-success/danger

Section: Income Statement Table

ID Section Action Expected Outcome Controls Affected
UC-RPT-061 Table Header View headers Columns: Particulars, Amount (₹), % of Revenue thead
UC-RPT-062 Revenue Section View rows "REVENUE" header, Total Sales, Less: Sales Returns, Net Revenue total Revenue rows
UC-RPT-063 COGS Section View rows "COST OF GOODS SOLD" header, Opening Inventory, Purchases, Direct Costs, Less: Closing Inventory, COGS total COGS rows
UC-RPT-064 Gross Profit Row View row Green bg "GROSS PROFIT" with amount and margin % table-success row
UC-RPT-065 Operating Expenses View rows "OPERATING EXPENSES" header, Wastage, Defective Stock, Other Operating, Total Operating Expense rows
UC-RPT-066 Operating Profit Row View row Blue bg "OPERATING PROFIT" with amount and margin % table-info row
UC-RPT-067 Other Income/Expenses View rows "OTHER INCOME & EXPENSES" header, Other Income, Other Expenses Other rows
UC-RPT-068 Net Profit Row View row Green/Red bg "NET PROFIT", ₹ amount, margin % table-success/danger row

Section: Revenue & Cost Charts

ID Section Action Expected Outcome Controls Affected
UC-RPT-069 Revenue by Category View chart Pie chart showing revenue breakdown by category ApexChart pie
UC-RPT-070 Cost Breakdown View chart Pie/bar chart showing cost distribution ApexChart

Section: Data Validation

ID Validation Requirement
UC-RPT-071 Net Profit Calc Net Profit = Gross Profit - Operating Expenses + Other Income - Other Expenses
UC-RPT-072 Margin Calc Margin % = (Amount / Net Revenue) × 100
UC-RPT-073 Currency Format All amounts in ₹X,XX,XXX.XX format

Cash Flow Statement (/reports/cash-flow-statement)

Section: Page Header & Navigation

ID Section Action Expected Outcome Controls Affected
UC-RPT-074 Header Load page Title "Cash Flow Statement - Rabbit Accounts", h2 with money-bill-wave icon PageTitle, h2
UC-RPT-075 Actions Export buttons Refresh, Export Excel, Export PDF buttons Action buttons

Section: Period Filter

ID Section Action Expected Outcome Controls Affected
UC-RPT-076 Filter Period dropdown Options: This Month, This Quarter, This Year, Custom Period select
UC-RPT-077 Filter Date range From/To date inputs, Generate Report button Date inputs, button

Section: Summary Cards

ID Section Action Expected Outcome Controls Affected
UC-RPT-078 Opening Cash View card Shows opening cash balance for period Opening Cash card
UC-RPT-079 Cash from Operations View card Shows net cash from operating activities Operations card
UC-RPT-080 Cash from Investing View card Shows net cash from investing activities Investing card
UC-RPT-081 Cash from Financing View card Shows net cash from financing activities Financing card
UC-RPT-082 Closing Cash View card Shows ending cash balance Closing Cash card

Section: Cash Flow Table

ID Section Action Expected Outcome Controls Affected
UC-RPT-083 Operating Activities View section Header "OPERATING ACTIVITIES", items: Collections, Payments to Suppliers, Operating Expenses, Net from Operations Table rows
UC-RPT-084 Investing Activities View section Header "INVESTING ACTIVITIES", items: Purchase/Sale of Assets Table rows
UC-RPT-085 Financing Activities View section Header "FINANCING ACTIVITIES", items: Loans, Capital, Drawings Table rows
UC-RPT-086 Net Change View row "Net Change in Cash" with total Summary row
UC-RPT-087 Closing Balance View row "Closing Cash Balance" = Opening + Net Change Final row

Section: Cash Flow Chart

ID Section Action Expected Outcome Controls Affected
UC-RPT-088 Waterfall Chart View chart Waterfall showing cash flow progression ApexChart waterfall

Trial Balance (/reports/trial-balance)

Section: Page Header

ID Section Action Expected Outcome Controls Affected
UC-RPT-089 Header Load page Title "Trial Balance - Rabbit Accounts", h2 with balance-scale-left icon PageTitle, h2
UC-RPT-090 Actions Export buttons Refresh, Export Excel, Export PDF Action buttons

Section: Date Filter

ID Section Action Expected Outcome Controls Affected
UC-RPT-091 Filter As of Date Date picker, Generate Report button As of Date input, button

Section: Trial Balance Table

ID Section Action Expected Outcome Controls Affected
UC-RPT-092 Table Header View headers Columns: Account Code, Account Name, Debit (₹), Credit (₹) thead
UC-RPT-093 Account Rows View rows Each account with code, name, debit OR credit amount tbody tr
UC-RPT-094 Debit Column View amounts Right-aligned, shows only for debit balance accounts text-end
UC-RPT-095 Credit Column View amounts Right-aligned, shows only for credit balance accounts text-end
UC-RPT-096 Totals Row View footer "TOTAL" row with sum of Debits and sum of Credits tfoot row
UC-RPT-097 Balance Check Totals match Total Debits = Total Credits (must be equal) Totals comparison

Section: Balance Verification

ID Section Action Expected Outcome Controls Affected
UC-RPT-098 Balanced Debits = Credits Green success alert "Trial Balance is Balanced ✓" alert-success
UC-RPT-099 Unbalanced Debits ≠ Credits Red danger alert with difference amount alert-danger

General Ledger (/reports/general-ledger)

Section: Page Header

ID Section Action Expected Outcome Controls Affected
UC-RPT-100 Header Load page Title "General Ledger - Rabbit Accounts", h2 with book icon PageTitle, h2

Section: Filters

ID Section Action Expected Outcome Controls Affected
UC-RPT-101 Filter Account dropdown Lists all accounts for selection Account select
UC-RPT-102 Filter Date range From/To date inputs Date inputs
UC-RPT-103 Filter Generate button Loads transactions for selected account/period Generate btn

Section: Account Summary

ID Section Action Expected Outcome Controls Affected
UC-RPT-104 Summary Opening Balance Shows balance at period start Opening Balance
UC-RPT-105 Summary Total Debits Sum of all debit entries Total Debits
UC-RPT-106 Summary Total Credits Sum of all credit entries Total Credits
UC-RPT-107 Summary Closing Balance Opening + Debits - Credits Closing Balance

Section: Transaction Table

ID Section Action Expected Outcome Controls Affected
UC-RPT-108 Table Header View headers Columns: Date, Voucher #, Description, Debit, Credit, Balance thead
UC-RPT-109 Opening Row View first row "Opening Balance" with starting balance First row
UC-RPT-110 Transaction Rows View entries Each transaction with date, voucher, description, debit/credit, running balance tbody tr
UC-RPT-111 Running Balance View column Updates after each transaction Balance column
UC-RPT-112 Closing Row View last row "Closing Balance" with final balance Last row

Tax Reports (/reports/tax-reports)

Section: Page Header

ID Section Action Expected Outcome Controls Affected
UC-RPT-113 Header Load page Title "Tax Reports - Rabbit Accounts", h2 with file-invoice icon PageTitle, h2

Section: Report Selection

ID Section Action Expected Outcome Controls Affected
UC-RPT-114 Selection Report Type dropdown Options: GST Summary, GST R1, GST R3B, TDS Summary Report Type select
UC-RPT-115 Selection Period dropdown Options: Monthly, Quarterly, Annual Period select
UC-RPT-116 Selection Date range From/To date inputs Date inputs

Section: GST Summary

ID Section Action Expected Outcome Controls Affected
UC-RPT-117 GST Output View section Output GST collected on sales Output GST
UC-RPT-118 GST Input View section Input GST paid on purchases Input GST
UC-RPT-119 Net GST View total Output - Input = Net GST Payable/Receivable Net GST
UC-RPT-120 GST Breakdown View table Breakdown by tax rate: 0%, 5%, 12%, 18%, 28% GST table

Section: Export

ID Section Action Expected Outcome Controls Affected
UC-RPT-121 Export Click "Export GSTR-1" Downloads GST R1 format file Download
UC-RPT-122 Export Click "Export GSTR-3B" Downloads GST R3B format file Download

Reports Data Validation Requirements

ID Validation Requirement
UC-RPT-130 All Reports Must load without errors when business is selected
UC-RPT-131 Balance Sheet Assets = Liabilities + Equity (accounting equation)
UC-RPT-132 Trial Balance Total Debits = Total Credits
UC-RPT-133 P&L Net Profit calculation must be mathematically correct
UC-RPT-134 Cash Flow Closing Cash = Opening Cash + Net Change
UC-RPT-135 Currency Format All ₹ amounts use Indian format (₹X,XX,XXX.XX)
UC-RPT-136 Date Format Dates display as "DD MMM YYYY" or "DD MMMM YYYY"
UC-RPT-137 Export Excel All exports generate valid .xlsx files
UC-RPT-138 Export PDF All exports generate valid .pdf files
UC-RPT-139 Loading States All pages show spinner during data load
UC-RPT-140 Error Handling Appropriate error messages when data unavailable

Total Use Cases: 140

12

Sales Performance

Comprehensive sales analytics with trends, categories, customer segmentation, peak hours, AOV analysis, and forecasting.

Route/sales-performance
Menu12 (Analytics & Tracking > Sales Performance)
Checks60 use cases / 10 sections
Open detailed screen guide

UC-SALES: Sales Performance Page Use Cases

Page: SalesPerformance.razor Route: /sales-performance Menu Position: 12 (Analytics & Tracking > Sales Performance)


Overview

Comprehensive sales analytics with trends, categories, customer segmentation, peak hours, AOV analysis, and forecasting.


Section: Page Header & Date Filter

ID Section Action Expected Outcome Controls Affected
UC-SALES-001 Header Load Sales Performance page Page title shows "Sales Performance Analytics - Rabbit Accounts", subtitle shows "Comprehensive sales insights and trends" h3 title, p subtitle, PageTitle
UC-SALES-002 Filter Default date range on load From date = 30 days ago, To date = today From date input, To date input
UC-SALES-003 Filter Change From date to Dec 1 No immediate change (need to click Refresh) From date input=Dec 1
UC-SALES-004 Filter Change To date to Dec 15 No immediate change (need to click Refresh) To date input=Dec 15
UC-SALES-005 Filter Click Refresh button Loading spinner appears, then all data reloads for new date range: (1) Summary cards update, (2) Active tab data updates, (3) All analytics recalculate spinner, Total Sales h4, Total Orders h4, Avg Order Value h4, Gross Profit Margin h4, all tab content
UC-SALES-006 Loading Page loading state Shows spinner with "Loading analytics data..." text spinner-border, loading text

Section: Summary Cards (4 cards always visible)

ID Section Action Expected Outcome Controls Affected
UC-SALES-007 Total Sales Card View Total Sales Shows: (1) Label "Total Sales", (2) Amount in ₹ format (₹X,XX,XXX.XX), (3) MoM growth % with up/down arrow, (4) Rupee icon in blue circle Total Sales label, Total Sales h4 amount, MoM growth small text, bi-currency-rupee icon
UC-SALES-008 Total Sales Card MoM growth positive Green text with up arrow, e.g., "↑ 5.2% MoM" MoM growth text-success, bi-arrow-up icon
UC-SALES-009 Total Sales Card MoM growth negative Red text with down arrow, e.g., "↓ 3.1% MoM" MoM growth text-danger, bi-arrow-down icon
UC-SALES-010 Total Orders Card View Total Orders Shows: (1) Label "Total Orders", (2) Order count number, (3) Customer count text "X customers", (4) Cart icon in green circle Total Orders label, Total Orders h4 count, customers small text, bi-cart-check icon
UC-SALES-011 Avg Order Value Card View AOV Shows: (1) Label "Avg Order Value", (2) Amount in ₹ format, (3) "Per transaction" text, (4) Graph icon in blue circle Avg Order Value label, AOV h4 amount, Per transaction text, bi-graph-up icon
UC-SALES-012 Gross Profit Card View Gross Profit Margin Shows: (1) Label "Gross Profit Margin", (2) Percentage with 1 decimal (X.X%), (3) Gross profit amount "₹X,XX,XXX", (4) Percent icon in yellow circle Gross Profit Margin label, GPM h4 %, Gross profit amount, bi-percent icon

Section: Tab Navigation (6 tabs)

ID Section Action Expected Outcome Controls Affected
UC-SALES-013 Tabs Default active tab "Trends" tab is active (highlighted) on page load Trends tab nav-link active
UC-SALES-014 Tabs Click "Trends" tab Tab becomes active, Trends content displays: YoY card, MoM card, Daily Sales chart, Monthly Sales chart Trends tab active, YoY Growth card, MoM Growth card, Daily Sales Trend ApexChart, Monthly Sales Trend ApexChart
UC-SALES-015 Tabs Click "Categories" tab Tab becomes active, Categories content displays: Pie chart, Performance table, Top Products per category cards Categories tab active, Sales by Category ApexChart pie, Category Performance table, Top Products cards
UC-SALES-016 Tabs Click "Customers" tab Tab becomes active, Customers content displays: Segmentation pie chart, Segmentation summary, Top 20 Customers table Customers tab active, ABC Segmentation ApexChart, Segment A/B/C summary divs, Top 20 Customers table
UC-SALES-017 Tabs Click "Peak Hours" tab Tab becomes active, Peak Hours content displays: Day of Week chart, Hour of Day chart, Peak summary cards Peak Hours tab active, Day of Week ApexChart bar, Hour of Day ApexChart line, Best Day/Hour/Days Analyzed cards
UC-SALES-018 Tabs Click "AOV Trends" tab Tab becomes active, AOV content displays: 4 MA cards, AOV Trend chart with 3 lines AOV Trends tab active, Current AOV card, 7-Day MA card, 30-Day MA card, 90-Day MA card, AOV Trends ApexChart (3 series)
UC-SALES-019 Tabs Click "Forecast" tab Tab becomes active, Forecast content displays: Info alert, Forecast chart, Detailed forecast table Forecast tab active, Forecast method alert, Sales Forecast ApexChart (3 lines), Detailed Forecast table

Section: Trends Tab Content

ID Section Action Expected Outcome Controls Affected
UC-SALES-020 YoY Card View YoY Growth Shows: (1) Title "Year-over-Year Growth", (2) Growth % as h3 (e.g., 15.2%), (3) Current period amount, (4) Previous year amount YoY Growth card title, YoY h3 percentage, Current amount, Previous Year amount
UC-SALES-021 MoM Card View MoM Growth Shows: (1) Title "Month-over-Month Growth", (2) Growth % as h3, (3) Current period amount, (4) Previous period amount MoM Growth card title, MoM h3 percentage, Current amount, Previous Period amount
UC-SALES-022 Daily Chart View Daily Sales Trend ApexChart renders line chart with: (1) Title "Daily Sales Trend", (2) Line series named "Sales", (3) X-axis = dates, (4) Y-axis = sales amounts, (5) Height 350px Daily Sales Trend card title, ApexChart TItem=DailySalesTrend, Line series
UC-SALES-023 Daily Chart Hover on data point Tooltip shows date and sales amount for that day ApexChart tooltip
UC-SALES-024 Monthly Chart View Monthly Sales Trend ApexChart renders with: (1) Title "Monthly Sales Trend (Last 12 Months)", (2) Bar series for Sales, (3) Line series for Orders, (4) X-axis = month names, (5) Height 350px Monthly Sales Trend card title, ApexChart TItem=MonthlySalesTrend, Bar series Sales, Line series Orders
UC-SALES-025 Monthly Chart Chart has data MUST show actual bars/lines with data (not empty chart) ApexChart bars, ApexChart line

Section: Categories Tab Content

ID Section Action Expected Outcome Controls Affected
UC-SALES-026 Category Pie View Sales by Category ApexChart pie chart with: (1) Segments for each category, (2) Data labels showing %, (3) Height 400px Sales by Category ApexChart pie, pie segments, data labels
UC-SALES-027 Category Table View Category Performance Table with columns: Category, Sales, Orders, Growth. Shows top 10 categories Category Performance table, th Category/Sales/Orders/Growth, tbody rows (max 10)
UC-SALES-028 Category Table Growth positive Green badge with positive % badge bg-success
UC-SALES-029 Category Table Growth negative Red badge with negative % badge bg-danger
UC-SALES-030 Top Products View Top Products cards 3 cards showing top products for top 3 categories, each with product list showing name, qty, sales badge Top Products in [Category] card, list-group-item, product name, Qty small, sales badge

Section: Customers Tab Content

ID Section Action Expected Outcome Controls Affected
UC-SALES-031 Segmentation Chart View ABC Segmentation Pie chart with 3 segments: A (Top 20%), B (Next 30%), C (Bottom 50%) Customer Segmentation ApexChart pie, 3 segments
UC-SALES-032 Segment A Summary View Segment A Red background div showing: customer count badge, sales amount, percentage of total Segment A div bg-danger, badge bg-danger, sales amount, percentage
UC-SALES-033 Segment B Summary View Segment B Yellow background div showing: customer count, sales, percentage Segment B div bg-warning, badge bg-warning, sales amount, percentage
UC-SALES-034 Segment C Summary View Segment C Blue background div showing: customer count, sales, percentage Segment C div bg-info, badge bg-info, sales amount, percentage
UC-SALES-035 Top Customers View Top 20 Table Table columns: Customer, Segment, Total Sales, Orders, Avg Order, Last Purchase Top 20 Customers table, 6 column headers, up to 20 rows
UC-SALES-036 Top Customers Segment badge colors A = red (bg-danger), B = yellow (bg-warning), C = blue (bg-info) segment badge classes
UC-SALES-037 Top Customers Last Purchase column Shows "X days ago" text Last Purchase td, days ago small text

Section: Peak Hours Tab Content

ID Section Action Expected Outcome Controls Affected
UC-SALES-038 Day Chart View Day of Week chart Bar chart with 7 bars (Mon-Sun), Y-axis = Average Sales Sales by Day of Week ApexChart bar, 7 bars, day labels
UC-SALES-039 Hour Chart View Hour of Day chart Line chart with 24 points (or business hours), X-axis = hour labels Sales by Hour of Day ApexChart line, hourly data points
UC-SALES-040 Best Day Card View Best Day Green card showing: best day name, avg sales amount Best Day card bg-success, day name h4, Avg amount
UC-SALES-041 Best Hour Card View Best Hour Blue card showing: best hour label, sales amount Best Hour card bg-info, hour label h4, Sales amount
UC-SALES-042 Days Analyzed View Total Days Yellow card showing count of days in analysis period Total Days Analyzed card bg-warning, count h4

Section: AOV Trends Tab Content

ID Section Action Expected Outcome Controls Affected
UC-SALES-043 Current AOV Card View Current AOV Shows current average order value in ₹ Current AOV card, h4 amount
UC-SALES-044 7-Day MA Card View 7-Day MA Shows 7-day moving average 7-Day MA card, h4 amount
UC-SALES-045 30-Day MA Card View 30-Day MA Shows 30-day moving average 30-Day MA card, h4 amount
UC-SALES-046 90-Day MA Card View 90-Day MA Shows 90-day moving average 90-Day MA card, h4 amount
UC-SALES-047 AOV Chart View AOV Trend chart Line chart with 3 series: Daily AOV (thin), 7-Day MA, 30-Day MA. Height 400px AOV Trends ApexChart, Daily AOV series, 7-Day MA series, 30-Day MA series

Section: Forecast Tab Content

ID Section Action Expected Outcome Controls Affected
UC-SALES-048 Info Alert View Forecast info Blue alert showing: Forecast Method, Total Forecasted Sales, Forecast Period (days) alert alert-info, Forecast Method, Total Forecasted Sales, Forecast Period
UC-SALES-049 Forecast Chart View Forecast chart Line chart with 3 lines: Forecast (solid), Optimistic (dashed), Pessimistic (dashed). Height 400px Sales Forecast ApexChart, Forecast line, Optimistic line dashed, Pessimistic line dashed
UC-SALES-050 Forecast Table View Detailed Forecast Table with columns: Date, Forecast, Optimistic (green), Pessimistic (red), Confidence ±. Shows 14 rows Detailed Forecast table, 5 columns, 14 rows, green optimistic, red pessimistic

Section: Data Validation Requirements

ID Validation Requirement
UC-SALES-051 Summary Cards All 4 cards must show non-zero values when sales exist in date range
UC-SALES-052 Daily Chart Must render actual line with data points, NOT empty chart
UC-SALES-053 Monthly Chart Must render actual bars and line, NOT empty chart
UC-SALES-054 Category Pie Must show actual pie segments with category names
UC-SALES-055 Customer Table Must show customer rows with all columns populated
UC-SALES-056 Peak Hours Charts Both charts must show actual data patterns
UC-SALES-057 AOV Chart Must show 3 distinct lines with data
UC-SALES-058 Forecast Table All forecast values must be positive numbers
UC-SALES-059 Currency Format All ₹ amounts must use Indian format (₹X,XX,XXX.XX)
UC-SALES-060 Growth Percentages Must show 1 decimal place (X.X%)

Total Use Cases: 60

13

Vendor Performance

See the detailed use-case matrix below for expected behavior.

Routen/a
Menun/a
Checks55 use cases / 0 sections
Open detailed screen guide

Vendor Performance Scorecard Use Cases (VendorPerformanceScorecard.razor)

ID Section Action Expected Outcome Controls
UC-VPSC-001 Page Load Navigate to /vendor-performance-scorecard Loads with spinner, displays scorecards Container
UC-VPSC-002 Date Filter Set from/to dates Updates filter range Date inputs
UC-VPSC-003 Refresh Click Refresh LoadDataAsync reloads all data Refresh button
UC-VPSC-004 Formula Info View algorithm Shows weighted formula alert Alert info
UC-VPSC-005 Rankings Table Rank column Sequential rank number td text-center
UC-VPSC-006 Rankings Table Vendor Name Plain text vendor name td
UC-VPSC-007 Rankings Table Overall Score Bold FS-5 with color class Strong tag
UC-VPSC-008 Rankings Table Category badge Excellent/Good/Average/Poor Badge
UC-VPSC-009 Rankings Table Quality Score (40%) F1 format td text-center
UC-VPSC-010 Rankings Table Delivery Score (30%) F1 format td text-center
UC-VPSC-011 Rankings Table Pricing Score (20%) F1 format td text-center
UC-VPSC-012 Rankings Table Payment Score (10%) F1 format td text-center
UC-VPSC-013 Rankings Table Defect Rate Conditional color by threshold Span
UC-VPSC-014 Rankings Table On-Time % Conditional color >=95/85/below Span
UC-VPSC-015 Rankings Table Total Spend ₹N2 format right-aligned td text-end
UC-VPSC-016 Rankings Table Total Orders Center-aligned count td text-center
UC-VPSC-017 Rankings Table Details button ShowVendorDetails navigates Button
UC-VPSC-018 Tab Overview tab Shows top performers + distribution Tab pane
UC-VPSC-019 Tab Quality tab Quality metrics charts Tab pane
UC-VPSC-020 Tab Delivery tab Delivery performance charts Tab pane
UC-VPSC-021 Tab Pricing tab Pricing comparison charts Tab pane
UC-VPSC-022 Tab Payment tab Payment compliance charts Tab pane
UC-VPSC-023 Tab Spend tab Spend analysis charts Tab pane
UC-VPSC-024 Tab Profitability tab Profit breakdown charts Tab pane
UC-VPSC-025 Overview Top 5 Performers List with scores and spend Card
UC-VPSC-026 Overview Performance Distribution Progress bars by category Card
UC-VPSC-027 Overview Score Distribution table All 4 scores + overall Table
UC-VPSC-028 Quality Defect/Return Rate chart Grouped bar chart ApexChart
UC-VPSC-029 Quality Score Comparison Current vs Previous period ApexChart
UC-VPSC-030 Delivery Early/OnTime/Late chart Stacked bar chart ApexChart
UC-VPSC-031 Delivery On-Time Rate chart Horizontal bar chart ApexChart
UC-VPSC-032 Delivery Average Delay chart Days delay comparison ApexChart
UC-VPSC-033 Pricing Unit Price comparison Bar chart sorted by price ApexChart
UC-VPSC-034 Pricing Market Deviation chart Deviation % from average ApexChart
UC-VPSC-035 Pricing Product Comparison table Market avg, best vendor, range Table
UC-VPSC-036 Payment On-Time Rate chart Payment timeliness ApexChart
UC-VPSC-037 Payment Avg Delay chart Payment delay days ApexChart
UC-VPSC-038 Payment Status Distribution Early/OnTime/Late stacked ApexChart
UC-VPSC-039 Spend Total Spend chart Descending spend bars ApexChart
UC-VPSC-040 Spend Order Frequency Orders per month ApexChart
UC-VPSC-041 Spend Avg Order Value AOV comparison ApexChart
UC-VPSC-042 Profitability Net Profit chart Profit by vendor ApexChart
UC-VPSC-043 Profitability ROI chart ROI % comparison ApexChart
UC-VPSC-044 Profitability Profit Breakdown Gross/Defect/Return costs ApexChart
UC-VPSC-045 Profitability Contribution % Profit contribution chart ApexChart
UC-VPSC-046 Score Color >= 80 text-success CSS class
UC-VPSC-047 Score Color 60-79 text-primary CSS class
UC-VPSC-048 Score Color 40-59 text-warning CSS class
UC-VPSC-049 Score Color < 40 text-danger CSS class
UC-VPSC-050 Category Badge Excellent bg-success Badge class
UC-VPSC-051 Category Badge Good bg-primary Badge class
UC-VPSC-052 Category Badge Average bg-warning Badge class
UC-VPSC-053 Category Badge Poor bg-danger Badge class
UC-VPSC-054 Empty State No data Warning alert with message Alert warning
UC-VPSC-055 Navigation Details click Navigate to /vendors?id={id} NavigateTo
14

Credit & Aging

See the detailed use-case matrix below for expected behavior.

Routen/a
Menun/a
Checks45 use cases / 0 sections
Open detailed screen guide

Customer Credit Aging Use Cases (CustomerCreditAging.razor)

ID Section Action Expected Outcome Controls
UC-CCAGING-001 Page Load Navigate to /customer-credit-aging Loads aging dashboard Container
UC-CCAGING-002 Page Load Navigate to /accounts-receivable Same page alternate route Route
UC-CCAGING-003 Loading Data loading Shows spinner with message Spinner
UC-CCAGING-004 Error Error occurs Shows alert-danger Alert danger
UC-CCAGING-005 Info No business context Shows alert-warning Alert warning
UC-CCAGING-006 Summary Card Total Outstanding ₹N2 format + customer count Card
UC-CCAGING-007 Summary Card Overdue Amount ₹N2 format + percentage Card
UC-CCAGING-008 Summary Card Average DSO N0 days format Card
UC-CCAGING-009 Summary Card High Risk Customers High + Critical count Card
UC-CCAGING-010 Chart Data Aging buckets Current/30/60/90+ day buckets AgingChartData
UC-CCAGING-011 Chart Data Risk categories Low/Medium/High/Critical counts RiskCategoryData
UC-CCAGING-012 Utilization > 100% bg-danger class Badge
UC-CCAGING-013 Utilization > 80% bg-warning class Badge
UC-CCAGING-014 Utilization > 50% bg-info class Badge
UC-CCAGING-015 Utilization <= 50% bg-success class Badge
UC-CCAGING-016 Risk Score > 80 bg-danger badge Badge
UC-CCAGING-017 Risk Score > 60 bg-warning badge Badge
UC-CCAGING-018 Risk Score > 30 bg-info badge Badge
UC-CCAGING-019 Risk Score <= 30 bg-success badge Badge
UC-CCAGING-020 Risk Category Critical bg-danger badge Badge
UC-CCAGING-021 Risk Category High bg-warning badge Badge
UC-CCAGING-022 Risk Category Medium bg-info badge Badge
UC-CCAGING-023 Risk Category Low bg-success badge Badge
UC-CCAGING-024 Trend Badge Improving bg-success badge Badge
UC-CCAGING-025 Trend Badge Stable bg-info badge Badge
UC-CCAGING-026 Trend Badge Declining bg-warning badge Badge
UC-CCAGING-027 Trend Badge Critical bg-danger badge Badge
UC-CCAGING-028 Reminder Config Message template Placeholders: CustomerName, OverdueAmount, DaysOverdue Textarea
UC-CCAGING-029 Reminder Config Channel Email/SMS/Both dropdown Select
UC-CCAGING-030 Reminder Config Include invoice details Boolean toggle Checkbox
UC-CCAGING-031 Reminder Targeting Min days overdue Filter by days Input
UC-CCAGING-032 Reminder Targeting Min amount Filter by amount Input
UC-CCAGING-033 Reminder Targeting Risk categories Multi-select filter Dropdown
UC-CCAGING-034 Reminder Preview GetTargetedCustomerCount Returns filtered count Method
UC-CCAGING-035 Reminder Preview GetTargetedOverdueAmount Returns ₹N2 total Method
UC-CCAGING-036 Send Reminders Confirmation JS confirm dialog Confirm
UC-CCAGING-037 Send Reminders Success Alert with count sent Alert
UC-CCAGING-038 Preview Reminders Click Shows targeted info + sample Alert
UC-CCAGING-039 Template Friendly Polite reminder text UseTemplate
UC-CCAGING-040 Template Formal Business formal text UseTemplate
UC-CCAGING-041 Template Urgent Urgent notice text UseTemplate
UC-CCAGING-042 Customer Details View button ViewCustomerDetails with ID Button
UC-CCAGING-043 Data Load Parallel loading Aging/Limits/Risk/Summary tasks Task.WhenAll
UC-CCAGING-044 Risk Options Dropdown values Low/Medium/High/Critical DropDownOption
UC-CCAGING-045 Channel Options Dropdown values Email/SMS/Both DropDownOption
15

Vendor Analytics

See the detailed use-case matrix below for expected behavior.

Routen/a
Menun/a
Checks45 use cases / 0 sections
Open detailed screen guide

Vendor Analytics Page Use Cases (VendorAnalytics.razor)

ID Section Action Expected Outcome Controls
UC-VANALYTICS-001 Page Load Navigate to /vendor-analytics Page loads with spinner, then displays dashboard Page container
UC-VANALYTICS-002 Auth Access without CustomerAdmin Redirect to unauthorized Authorize attribute
UC-VANALYTICS-003 Business No business selected Shows "select a business" alert Alert info
UC-VANALYTICS-004 Date Filter Set from date fromDate bound to input Date input
UC-VANALYTICS-005 Date Filter Set to date toDate bound to input Date input
UC-VANALYTICS-006 Date Filter Click Apply RefreshData called, reloads analytics Apply button
UC-VANALYTICS-007 Refresh Click Refresh button RefreshData reloads all data Refresh button
UC-VANALYTICS-008 KPI Card Active Vendors displayed Shows totalVendors count Card body
UC-VANALYTICS-009 KPI Card New vendors this period Shows newVendorsThisPeriod Small text
UC-VANALYTICS-010 KPI Card Total Purchases Shows totalPurchases formatted ₹N0 Card body
UC-VANALYTICS-011 KPI Card Purchase growth Shows purchaseGrowthPercent with +/- icon Small text
UC-VANALYTICS-012 KPI Card Pending Payments Shows pendingPayments formatted ₹N0 Card body
UC-VANALYTICS-013 KPI Card Overdue invoices count Shows overdueInvoices number Small text
UC-VANALYTICS-014 KPI Card Avg Vendor Rating Shows averageVendorRating F1 format Card body
UC-VANALYTICS-015 Chart Purchase Volume Trend Line chart with ₹ formatted tooltips Canvas purchaseTrendChart
UC-VANALYTICS-016 Chart Top Vendors doughnut Shows top 10 vendors by purchase Canvas topVendorsChart
UC-VANALYTICS-017 Chart Vendor Ratings radar 5-axis radar chart 0-100 scale Canvas vendorRatingsChart
UC-VANALYTICS-018 Chart Payment Status pie Paid/Pending/Overdue distribution Canvas paymentStatusChart
UC-VANALYTICS-019 Table Vendor Name column Shows name with icon and code td
UC-VANALYTICS-020 Table Total Purchases Right-aligned ₹N0 format green td text-end
UC-VANALYTICS-021 Table Orders Count Right-aligned bold td text-end
UC-VANALYTICS-022 Table Avg Order Value Right-aligned ₹N0 td text-end
UC-VANALYTICS-023 Table Pending Amount Conditional color warning/success td text-end
UC-VANALYTICS-024 Table Quality Rating badge Color by GetRatingBadgeClass Badge
UC-VANALYTICS-025 Table Delivery Rating badge Color by GetRatingBadgeClass Badge
UC-VANALYTICS-026 Table Price Rating badge Color by GetRatingBadgeClass Badge
UC-VANALYTICS-027 Table Overall Rating badge Color by GetRatingBadgeClass Badge
UC-VANALYTICS-028 Table Status badge Active=green, Inactive=secondary Badge
UC-VANALYTICS-029 Export Click Export button Downloads CSV with analytics Export button
UC-VANALYTICS-030 Export CSV content Headers + data rows properly formatted CSV file
UC-VANALYTICS-031 Rating Score >= 80 bg-success badge Badge class
UC-VANALYTICS-032 Rating Score 60-79 bg-warning badge Badge class
UC-VANALYTICS-033 Rating Score 40-59 bg-info badge Badge class
UC-VANALYTICS-034 Rating Score < 40 bg-danger badge Badge class
UC-VANALYTICS-035 Empty State No vendor data Shows inbox icon with message Text center div
UC-VANALYTICS-036 Business Change Switch business HandleBusinessChanged reloads data Event handler
UC-VANALYTICS-037 Dispose Component disposed Unsubscribes from OnChanged event Dispose method
UC-VANALYTICS-038 Chart Init First render initializeVendorAnalyticsCharts called JS interop
UC-VANALYTICS-039 Chart Update Data loaded updateVendorAnalyticsCharts called JS interop
UC-VANALYTICS-040 Growth Icon Positive growth Arrow up icon bi-arrow-up
UC-VANALYTICS-041 Growth Icon Negative growth Arrow down icon bi-arrow-down
UC-VANALYTICS-042 Growth Color Positive text-success class Span class
UC-VANALYTICS-043 Growth Color Negative text-danger class Span class
UC-VANALYTICS-044 Table Sort Default order Sorted by TotalPurchases descending OrderByDescending
UC-VANALYTICS-045 Accessibility Table role role="table" with aria-label Table attributes
16

Batch Profitability

FIFO-based batch profitability analysis with P&L by batch, vendor performance ranking, quality cost analysis, and expiry tracking.

Route/batch-profitability-analytics
Menu19 (Analytics & Tracking > Batch Profitability Analytics)
Checks52 use cases / 8 sections
Open detailed screen guide

UC-BATCH: Batch Profitability Analytics Page Use Cases

Page: BatchProfitabilityAnalytics.razor Route: /batch-profitability-analytics Menu Position: 19 (Analytics & Tracking > Batch Profitability Analytics)


Overview

FIFO-based batch profitability analysis with P&L by batch, vendor performance ranking, quality cost analysis, and expiry tracking.


Section: Page Header & Filter

ID Section Action Expected Outcome Controls Affected
UC-BATCH-001 Header Load Batch Profitability page Page shows: (1) Green header "Batch Profitability Analytics - FIFO P&L Reports", (2) Refresh Analytics button, (3) Date filter section card-header bg-success, h5 title, Refresh Analytics btn, From Date input, To Date input, Apply Filter btn
UC-BATCH-002 Header No business selected Alert shows "Please select a business to view batch profitability analytics" alert alert-info
UC-BATCH-003 Filter Default date range From Date = 30 days ago, To Date = today From Date input, To Date input
UC-BATCH-004 Filter Change From Date Updates fromDate variable From Date input
UC-BATCH-005 Filter Change To Date Updates toDate variable To Date input
UC-BATCH-006 Filter Click Apply Filter Loading spinner shows "Calculating batch profitability...", then data reloads for new date range spinner-border, loading text, all summary cards, all tables
UC-BATCH-007 Header Click Refresh Analytics Same as Apply Filter - reloads all data All data sections

Section: Loading State

ID Section Action Expected Outcome Controls Affected
UC-BATCH-008 Loading During data load Green spinner visible, text "Calculating batch profitability..." spinner-border text-success, p text-muted
UC-BATCH-009 Loading Load completes Spinner hidden, summary cards and tables display All sections render

Section: Summary Cards (4 cards)

ID Section Action Expected Outcome Controls Affected
UC-BATCH-010 Total Revenue Card View card Blue card (bg-primary) showing: (1) "Total Revenue" title, (2) Amount in currency format, (3) Rupee icon card bg-primary, h5 "Total Revenue", h3 amount, fa-rupee-sign icon
UC-BATCH-011 Total FIFO Cost Card View card Yellow/orange card (bg-warning) showing: (1) "Total FIFO Cost" title, (2) Amount in currency format, (3) Layer icon card bg-warning, h5 "Total FIFO Cost", h3 amount, fa-layer-group icon
UC-BATCH-012 Gross Profit Card View card Green card (bg-success) showing: (1) "Gross Profit" title, (2) Amount = Revenue - Cost, (3) Chart icon card bg-success, h5 "Gross Profit", h3 amount, fa-chart-line icon
UC-BATCH-013 Profit Margin Card View card Blue card (bg-info) showing: (1) "Profit Margin" title, (2) Percentage with 1 decimal (X.X%), (3) Percentage icon card bg-info, h5 "Profit Margin", h3 percentage, fa-percentage icon
UC-BATCH-014 Summary Math Verify calculations Gross Profit = Total Revenue - Total FIFO Cost, Profit Margin = (Gross Profit / Revenue) × 100 Gross Profit h3, Profit Margin h3

Section: Batch P&L Analysis Table

ID Section Action Expected Outcome Controls Affected
UC-BATCH-015 Table Header View section Card header shows "Batch-Level P&L Analysis (FIFO Costing)" with table icon card-header h6, fa-table icon
UC-BATCH-016 Table Empty No data for period Alert info "No batch profitability data available for the selected period" alert alert-info
UC-BATCH-017 Table Headers View column headers 9 columns: Product, Batch, Vendor, Units Sold, Revenue, FIFO Cost, Gross Profit, Margin %, Quality Impact thead th × 9
UC-BATCH-018 Product Column View product cell Shows: (1) Product name in bold, (2) SKU below in muted small text td strong ProductName, small text-muted SKU
UC-BATCH-019 Batch Column View batch cell Shows: (1) Batch number badge (bg-secondary), (2) Batch date below (dd/MM/yyyy format) badge bg-secondary BatchNumber, small text-muted date
UC-BATCH-020 Units Sold View column Center-aligned integer td text-center UnitsSold
UC-BATCH-021 Revenue View column Right-aligned currency (C2 format) td text-end Revenue
UC-BATCH-022 FIFO Cost View column Right-aligned currency (C2 format) td text-end FifoCost
UC-BATCH-023 Gross Profit Positive Profit >= 0 Green text (text-success), bold span text-success fw-bold
UC-BATCH-024 Gross Profit Negative Profit < 0 Red text (text-danger), bold span text-danger fw-bold
UC-BATCH-025 Margin % Positive Margin >= 0 Green text (text-success), bold span text-success fw-bold
UC-BATCH-026 Margin % Negative Margin < 0 Red text (text-danger), bold span text-danger fw-bold
UC-BATCH-027 Quality Impact Good DefectLoss = 0 Green checkmark (✓) span text-success
UC-BATCH-028 Quality Impact Bad DefectLoss > 0 Red badge with negative amount badge bg-danger -amount
UC-BATCH-029 Table Rows View data Shows max 20 rows ordered by Gross Profit descending tbody tr × 20 max

Section: Vendor Performance Ranking

ID Section Action Expected Outcome Controls Affected
UC-BATCH-030 Section Header View header "Vendor Performance Ranking" with trophy icon card-header h6, fa-trophy icon
UC-BATCH-031 Empty State No vendor data Alert "No vendor performance data available" alert alert-info
UC-BATCH-032 Vendor Item View vendor row List item showing: (1) Vendor name h6, (2) Revenue + Batch count small text, (3) Profit margin badge (bg-success), (4) Total profit small text list-group-item, h6 VendorName, small Revenue/Batches, badge bg-success margin%, small TotalProfit
UC-BATCH-033 Vendor List View list Shows max 10 vendors ordered by profit margin desc list-group with 10 items max

Section: Quality Cost Analysis

ID Section Action Expected Outcome Controls Affected
UC-BATCH-034 Section Header View header "Quality Cost Analysis" with warning triangle icon card-header h6, fa-exclamation-triangle icon
UC-BATCH-035 Defect Loss Box View total defect Left box (bg-light): Red h4 amount "Total Defect Loss" h4 text-danger DefectLoss, small text-muted label
UC-BATCH-036 Expiry Loss Box View expiry loss Right box (bg-light): Yellow h4 amount "Expiry/Stale Loss" h4 text-warning ExpiryLoss, small text-muted label
UC-BATCH-037 Quality Issues List View top issues Shows "Top Quality Issues:" header, then up to 5 items with product name, issue type, and red negative impact amount h6 header, div items × 5, small product-issue, span text-danger -amount

Section: Expiry & Stale Inventory Tracking

ID Section Action Expected Outcome Controls Affected
UC-BATCH-038 Section Header View header "Expiry & Stale Inventory Tracking" with clock icon card-header h6, fa-clock icon
UC-BATCH-039 No Issues All inventory good Green success alert "No expiry or stale inventory issues detected" alert alert-success
UC-BATCH-040 Table Headers View columns 7 columns: Product, Batch, Age (Days), Remaining Qty, Book Value, Estimated Loss, Status thead th × 7
UC-BATCH-041 Age Column View age Center-aligned integer (days old) td text-center AgeDays
UC-BATCH-042 Remaining Qty View quantity Center-aligned integer td text-center RemainingQuantity
UC-BATCH-043 Book Value View value Right-aligned currency (C2 format) td text-end BookValue
UC-BATCH-044 Estimated Loss View loss Right-aligned red bold currency span text-danger fw-bold EstimatedLoss
UC-BATCH-045 Status Critical Age > 365 days Red badge "Critical" badge bg-danger "Critical"
UC-BATCH-046 Status Warning Age 270-365 days Yellow badge "Warning" badge bg-warning "Warning"
UC-BATCH-047 Status Caution Age 180-270 days (implied - not shown in code but logical) badge "Caution"
UC-BATCH-048 Table Rows View data Shows max 10 rows where Status != "Good", ordered by EstimatedLoss desc tbody tr × 10 max

Section: Data Validation Requirements

ID Validation Requirement
UC-BATCH-049 Loading State Page MUST complete loading and show data
UC-BATCH-050 Summary Cards All 4 summary cards must show calculated values when batch data exists
UC-BATCH-051 Table Data Batch table must show rows when InventoryConsumptions exist for period
UC-BATCH-052 Currency Format All amounts must display in currency format (uses .ToString("C"))

Total Use Cases: 52

17

Wastage Tracking

See the detailed use-case matrix below for expected behavior.

Routen/a
Menun/a
Checks55 use cases / 0 sections
Open detailed screen guide

Wastage Tracking Use Cases (WastageTracking.razor)

ID Section Action Expected Outcome Controls
UC-WASTAGE-001 Page Load Navigate to /wastage-tracking Loads wastage dashboard Container
UC-WASTAGE-002 Auth CustomerOperator required Authorized access Authorize attribute
UC-WASTAGE-003 Business No business selected Shows info alert Alert info
UC-WASTAGE-004 Header Record Wastage button Opens wastageModal Button light
UC-WASTAGE-005 Loading Data loading Shows spinner with text Spinner
UC-WASTAGE-006 Empty State No records Icon + message + create button Div text-center
UC-WASTAGE-007 Summary Card Total Items Wasted Sum of WastedQuantity Card danger
UC-WASTAGE-008 Summary Card Total Value Lost Sum ₹N0 TotalWastageValue Card warning
UC-WASTAGE-009 Summary Card Wastage Records Count of records Card info
UC-WASTAGE-010 Summary Card This Month Current month count Card secondary
UC-WASTAGE-011 Table Date column dd MMM yyyy format centered td text-center
UC-WASTAGE-012 Table Product column Name + optional batch td
UC-WASTAGE-013 Table Quantity column Centered count td text-center
UC-WASTAGE-014 Table Reason badge Color by GetReasonBadgeColor Badge
UC-WASTAGE-015 Table Est. Value ₹N2 right-aligned td text-end
UC-WASTAGE-016 Table Type badge bg-info badge Badge
UC-WASTAGE-017 Table View Details btn ViewDetails with ID Button outline-primary
UC-WASTAGE-018 Table Edit btn EditRecord with ID Button outline-secondary
UC-WASTAGE-019 Table Sort Default OrderByDescending WastageDate OrderBy
UC-WASTAGE-020 Table Limit Display Take(15) records Take
UC-WASTAGE-021 Reason Badge Expired bg-danger Badge class
UC-WASTAGE-022 Reason Badge Damaged bg-warning Badge class
UC-WASTAGE-023 Reason Badge Quality Issues bg-info Badge class
UC-WASTAGE-024 Reason Badge Other bg-secondary Badge class
UC-WASTAGE-025 Modal Create wastage New WastageRecord initialized Modal
UC-WASTAGE-026 Modal Form Product select Products dropdown Select
UC-WASTAGE-027 Modal Form Batch Number Optional input Input text
UC-WASTAGE-028 Modal Form Wasted Quantity Required min=1 Input number
UC-WASTAGE-029 Modal Form Unit Cost Required step=0.01 Input number
UC-WASTAGE-030 Modal Form Wastage Date Required date Input date
UC-WASTAGE-031 Modal Form Wastage Type WastageTypes.AllTypes dropdown Select
UC-WASTAGE-032 Modal Form Wastage Reason WastageReasons.AllReasons dropdown Select
UC-WASTAGE-033 Modal Form Description Optional textarea Textarea
UC-WASTAGE-034 Modal Form Total Value alert Quantity × UnitCost calculated Alert info
UC-WASTAGE-035 Modal Save Validation Product + quantity required Validation
UC-WASTAGE-036 Modal Save Create WastageService.CreateWastageRecordAsync Service call
UC-WASTAGE-037 Modal Save Update WastageService.UpdateWastageRecordAsync Service call
UC-WASTAGE-038 Details Modal View Shows product/wastage/description info Modal lg
UC-WASTAGE-039 Details Modal Product Info Product/Batch/Vendor Row
UC-WASTAGE-040 Details Modal Wastage Details Quantity/Cost/Total Row
UC-WASTAGE-041 Details Modal Type/Reason Badges with colors Badges
UC-WASTAGE-042 Details Modal Dates Wastage + Created dates Row
UC-WASTAGE-043 Details Modal Edit button Opens edit modal Button primary
UC-WASTAGE-044 Details Modal Delete button DeleteWastageRecord with confirm Button danger
UC-WASTAGE-045 Delete Confirmation JS confirm dialog Confirm
UC-WASTAGE-046 Delete Success Toast + reload data Toast
UC-WASTAGE-047 Product Change OnProductChanged Auto-fills UnitCost from cost layer Event
UC-WASTAGE-048 Cost Fallback No cost layer Uses 70% of UnitPrice Calculation
UC-WASTAGE-049 Toast Success showToast with success JS interop
UC-WASTAGE-050 Toast Error showToast with error JS interop
UC-WASTAGE-051 Data test Table data-test="wastage-table" Attribute
UC-WASTAGE-052 Data test Row data-test="wastage-row" Attribute
UC-WASTAGE-053 Data test Modal data-test="wastage-modal" Attribute
UC-WASTAGE-054 Data test Details Modal data-test="wastage-details-modal" Attribute
UC-WASTAGE-055 Data test Save button data-test="save-wastage-btn" Attribute
18

Defective Stock

See the detailed use-case matrix below for expected behavior.

Routen/a
Menun/a
Checks65 use cases / 0 sections
Open detailed screen guide

Defective Stock Page Use Cases (DefectiveStockPage.razor)

ID Section Action Expected Outcome Controls
UC-DEFSTOCK-001 Page Load Navigate to /defective-stock Loads defective stock management Container
UC-DEFSTOCK-002 Auth CustomerAdminOrOperator Authorized access Authorize
UC-DEFSTOCK-003 Header Record Defective Stock btn ShowCreateModal opens modal Button primary
UC-DEFSTOCK-004 KPI Card Total Defective Items kpis.TotalDefectiveItems count Card danger
UC-DEFSTOCK-005 KPI Card Total Loss Value ₹N2 TotalEstimatedLoss Card warning
UC-DEFSTOCK-006 KPI Card Recovery Amount ₹N2 + Claims amount Card success
UC-DEFSTOCK-007 KPI Card Net Loss ₹N2 after recovery Card info
UC-DEFSTOCK-008 KPI Card Pending Approvals PendingApprovals count Card
UC-DEFSTOCK-009 KPI Card Active Claims ActiveClaims count Card
UC-DEFSTOCK-010 KPI Card Active Returns ActiveReturns count Card
UC-DEFSTOCK-011 KPI Card Critical Defects CriticalDefects count Card
UC-DEFSTOCK-012 Filter Date Range DateRangeFilter component Component
UC-DEFSTOCK-013 Filter Status dropdown DefectiveStockStatuses.AllStatuses Select
UC-DEFSTOCK-014 Filter Severity dropdown DefectSeverities.AllSeverities Select
UC-DEFSTOCK-015 Filter Product search productFilter text Input
UC-DEFSTOCK-016 Filter Clear button ClearFilters resets all Button
UC-DEFSTOCK-017 Table Defect Code Code + Pending badge if applicable td
UC-DEFSTOCK-018 Table Product Name + optional code td
UC-DEFSTOCK-019 Table Quantity Badge bg-danger Badge
UC-DEFSTOCK-020 Table Defect Type Plain text td
UC-DEFSTOCK-021 Table Severity badge GetSeverityBadgeClass Badge
UC-DEFSTOCK-022 Table Status badge GetStatusBadgeClass Badge
UC-DEFSTOCK-023 Table Loss Value ₹N2 + recovery if any td
UC-DEFSTOCK-024 Table Vendor Name + claim indicator td
UC-DEFSTOCK-025 Table Defect Date dd/MM/yyyy format td
UC-DEFSTOCK-026 Table View Details btn ShowDetailsModal Button outline-primary
UC-DEFSTOCK-027 Table Edit btn ShowEditModal Button outline-secondary
UC-DEFSTOCK-028 Table Approve btn ShowApprovalModal (if Pending) Button outline-success
UC-DEFSTOCK-029 Severity Badge Critical bg-danger Badge class
UC-DEFSTOCK-030 Severity Badge High bg-warning Badge class
UC-DEFSTOCK-031 Severity Badge Medium bg-info Badge class
UC-DEFSTOCK-032 Severity Badge Low bg-secondary Badge class
UC-DEFSTOCK-033 Status Badge Identified bg-warning Badge class
UC-DEFSTOCK-034 Status Badge UnderInvestigation bg-info Badge class
UC-DEFSTOCK-035 Status Badge Quarantined bg-secondary Badge class
UC-DEFSTOCK-036 Status Badge AwaitingDisposal bg-primary Badge class
UC-DEFSTOCK-037 Status Badge Disposed bg-dark Badge class
UC-DEFSTOCK-038 Status Badge Returned bg-success Badge class
UC-DEFSTOCK-039 Status Badge UnderRepair bg-info Badge class
UC-DEFSTOCK-040 Status Badge Repaired bg-success Badge class
UC-DEFSTOCK-041 Status Badge WriteOff bg-danger Badge class
UC-DEFSTOCK-042 Modal Create/Edit title Dynamic based on DefectiveStockId Modal title
UC-DEFSTOCK-043 Modal Form Product select SearchableSelect component Component
UC-DEFSTOCK-044 Modal Form Defective Quantity Required min=1 Input number
UC-DEFSTOCK-045 Modal Form Defect Date Required yyyy-MM-dd Input date
UC-DEFSTOCK-046 Modal Form Defect Type DefectTypes.AllTypes Select
UC-DEFSTOCK-047 Modal Form Defect Cause DefectCauses.AllCauses Select
UC-DEFSTOCK-048 Modal Form Severity DefectSeverities.AllSeverities Select
UC-DEFSTOCK-049 Modal Form Description Required textarea Textarea
UC-DEFSTOCK-050 Modal Form Vendor select SearchableSelect Component
UC-DEFSTOCK-051 Modal Form PO Reference Optional text Input
UC-DEFSTOCK-052 Modal Form Purchase Date Optional date Input date
UC-DEFSTOCK-053 Modal Form Loss Value Optional decimal Input number
UC-DEFSTOCK-054 Modal Form Batch Number Optional text Input
UC-DEFSTOCK-055 Modal Form Discovered By Optional text Input
UC-DEFSTOCK-056 Modal Form Discovery Date Optional date Input date
UC-DEFSTOCK-057 Modal Form QC Inspector Optional text Input
UC-DEFSTOCK-058 Modal Form QC Notes Optional textarea Textarea
UC-DEFSTOCK-059 Modal Form Notes Optional textarea Textarea
UC-DEFSTOCK-060 Modal Save Create DefectiveStockService.CreateDefectiveStockAsync Service
UC-DEFSTOCK-061 Modal Save Update DefectiveStockService.UpdateDefectiveStockAsync Service
UC-DEFSTOCK-062 Modal Close/Cancel HideCreateModal Button
UC-DEFSTOCK-063 Loading Data loading Shows spinner Spinner
UC-DEFSTOCK-064 Empty State No records Icon + message Div text-center
UC-DEFSTOCK-065 Table Limit Display Take(15) records Take
19

Batch Reconciliation

FIFO batch reconciliation with status tracking, FIFO queue visualization, and consumption history.

Route/batch-reconciliation
Menu18 (Analytics & Tracking > Batch Reconciliation)
Checks28 use cases / 7 sections
Open detailed screen guide

UC-BATREC: Batch Reconciliation Page Use Cases

Page: BatchReconciliation.razor Route: /batch-reconciliation Menu Position: 18 (Analytics & Tracking > Batch Reconciliation)


Overview

FIFO batch reconciliation with status tracking, FIFO queue visualization, and consumption history.


Section: Page Header & Actions

ID Section Action Expected Outcome Controls Affected
UC-BATREC-001 Header Load page Title "Batch Reconciliation - Rabbit Accounts", card header "Batch Reconciliation & FIFO Tracking" with balance-scale icon PageTitle, card-header bg-info
UC-BATREC-002 Header No business selected Alert "Please select a business to view batch reconciliation" alert alert-info
UC-BATREC-003 Actions Click "Run Reconciliation" Shows alert about reconciliation process Run Reconciliation btn

Section: Loading & Empty States

ID Section Action Expected Outcome Controls Affected
UC-BATREC-004 Loading During load Spinner with "Loading batch data..." spinner-border text-info
UC-BATREC-005 Empty No batch records Empty state: boxes icon, "No Batch Records Found", description text Empty state UI

Section: Summary Cards (4 cards)

ID Section Action Expected Outcome Controls Affected
UC-BATREC-006 Summary Active Batches Blue card (bg-primary), count of batches with RemainingQuantity > 0 Card, count
UC-BATREC-007 Summary Total Batch Value Green card (bg-success), sum of RemainingCost in ₹ format Card, amount
UC-BATREC-008 Summary Partially Consumed Yellow card (bg-warning), count of batches with 0 < Remaining < Original Card, count
UC-BATREC-009 Summary Inactive Batches Red card (bg-danger), count of batches where IsActive = false Card, count

Section: FIFO Queue Visualization

ID Section Action Expected Outcome Controls Affected
UC-BATREC-010 FIFO View FIFO section Card header "FIFO Consumption Order" with arrow icon Card header
UC-BATREC-011 FIFO View queue Shows first 5 batches in FIFO order (oldest first) Batch cards
UC-BATREC-012 FIFO Batch card Shows batch number, remaining qty, date Batch card content
UC-BATREC-013 FIFO More than 5 batches Shows "+X more" indicator "+more" card
UC-BATREC-014 FIFO Border colors Border color based on status (success/warning/danger) Card borders

Section: Batch Records Table

ID Section Action Expected Outcome Controls Affected
UC-BATREC-015 Table View headers 9 columns: Batch Number, Product, Created Date, Original Qty, Remaining Qty, Unit Cost, Remaining Value, Status, Actions thead table-dark
UC-BATREC-016 Table Batch Number column Bold batch number, "✓ Fully Consumed" text if RemainingQty = 0 Cell content
UC-BATREC-017 Table Remaining Qty > 0 Blue bold text text-primary fw-bold
UC-BATREC-018 Table Remaining Qty = 0 Muted "0" text text-muted
UC-BATREC-019 Table Status badges Active (success), Partial (warning), Consumed (secondary), Inactive (danger) Status badges
UC-BATREC-020 Table Max rows Shows max 20 rows Limit
UC-BATREC-021 Table Currency format Unit Cost and Remaining Value in ₹X,XX,XXX.XX Currency cells

Section: Batch Actions

ID Section Action Expected Outcome Controls Affected
UC-BATREC-022 Actions Click "View History" (history icon) Shows alert with consumption history info History button
UC-BATREC-023 Actions Click "Adjust" (edit icon) Shows alert with batch adjustment info Adjust button
UC-BATREC-024 Actions Adjust button visibility Only visible for active batches with remaining qty > 0 Conditional rendering

Section: Data Validation Requirements

ID Validation Requirement
UC-BATREC-025 Data Loading Must show batches when InventoryCostLayers exist
UC-BATREC-026 FIFO Order Queue must show oldest batches first
UC-BATREC-027 Status Accuracy Status must match batch state (Active/Partial/Consumed/Inactive)
UC-BATREC-028 Currency Format All ₹ amounts use Indian format

Total Use Cases: 28

20

Batch Profitability Analytics

Advanced FIFO-based batch profitability analysis with P&L by batch, vendor performance ranking, quality cost analysis, and expiry tracking. **Note:** This page uses the same component as Batch Profitability (/batch-profitability). Refer to [16-UC-BatchProfitability.md](16-UC-BatchProfitability.md) for the complete use cases.

Route/batch-profitability-analytics
Menu20 (Analytics & Tracking > Batch Profitability Analytics)
Checks0 use cases / 0 sections
Open detailed screen guide

UC-BatchProfitabilityAnalytics: Batch Profitability Analytics Page Use Cases

Page: BatchProfitabilityAnalytics.razor Route: /batch-profitability-analytics Menu Position: 20 (Analytics & Tracking > Batch Profitability Analytics)


Overview

Advanced FIFO-based batch profitability analysis with P&L by batch, vendor performance ranking, quality cost analysis, and expiry tracking.

Note: This page uses the same component as Batch Profitability (/batch-profitability). Refer to 16-UC-BatchProfitability.md for the complete use cases.


Route Aliases

Both routes render the same BatchProfitabilityAnalytics component:

  • /batch-profitability (Menu position 16)
  • /batch-profitability-analytics (Menu position 20)

Key Features

  1. Summary Cards: Total Revenue, Total FIFO Cost, Gross Profit, Profit Margin
  2. Batch P&L Analysis Table: Product, Batch, Vendor, Units Sold, Revenue, FIFO Cost, Gross Profit, Margin %, Quality Impact
  3. Vendor Performance Ranking: Vendors ranked by profit margin
  4. Quality Cost Analysis: Defect loss, Expiry/Stale loss, Top quality issues
  5. Expiry & Stale Inventory Tracking: Products approaching expiry with estimated loss

Total Use Cases

See 16-UC-BatchProfitability.md for 52 use cases covering this component.

21

Cost Variance

Product cost variance analysis with trend detection, severity categorization, and purchasing recommendations.

Route/cost-variance-reporting
Menu20 (Analytics & Tracking > Cost Variance Reporting)
Checks29 use cases / 7 sections
Open detailed screen guide

UC-COSTVAR: Cost Variance Reporting Page Use Cases

Page: CostVarianceReporting.razor Route: /cost-variance-reporting Menu Position: 20 (Analytics & Tracking > Cost Variance Reporting)


Overview

Product cost variance analysis with trend detection, severity categorization, and purchasing recommendations.


Section: Page Header & Actions

ID Section Action Expected Outcome Controls Affected
UC-COSTVAR-001 Header Load page Title "Cost Variance Reporting - [BusinessName]", card header with chart-line icon PageTitle, card-header bg-warning
UC-COSTVAR-002 Header No business selected Alert "Please select a business to view cost variance reporting" alert alert-info
UC-COSTVAR-003 Actions Click "Refresh Report" Reloads all variance data Refresh Report btn

Section: Date Filter

ID Section Action Expected Outcome Controls Affected
UC-COSTVAR-004 Filter Default From Date 6 months ago From Date input
UC-COSTVAR-005 Filter Default To Date Today To Date input
UC-COSTVAR-006 Filter Change date and Apply Click Apply Filter reloads data for new range Apply Filter btn

Section: Loading State

ID Section Action Expected Outcome Controls Affected
UC-COSTVAR-007 Loading During load Spinner with "Analyzing cost variances..." spinner-border

Section: Summary Cards (4 cards)

ID Section Action Expected Outcome Controls Affected
UC-COSTVAR-008 Summary Total Products Blue card (bg-primary), count with boxes icon First card
UC-COSTVAR-009 Summary Cost Increases Red card (bg-danger), count with up arrow icon Second card
UC-COSTVAR-010 Summary Cost Decreases Green card (bg-success), count with down arrow icon Third card
UC-COSTVAR-011 Summary Avg Variance Info card (bg-info), percentage with percent icon Fourth card

Section: Product Cost Variance Table

ID Section Action Expected Outcome Controls Affected
UC-COSTVAR-012 Table View headers 10 columns: Product Name, SKU, First Cost, Last Cost, Avg Cost, Variance, Variance %, Category, Trend, Batches thead table-dark
UC-COSTVAR-013 Table Variance positive Red text (cost increase) text-danger
UC-COSTVAR-014 Table Variance negative Green text (cost decrease) text-success
UC-COSTVAR-015 Table Variance % badge Color based on severity: ≥20% danger, ≥15% warning, ≥10% info, ≥5% secondary, <5% success Badge colors
UC-COSTVAR-016 Table Category badge Critical (danger), High (warning), Medium (info), Low (secondary) Badge colors
UC-COSTVAR-017 Table Trend display Increasing ↗ (red), Decreasing ↘ (green), Stable → (muted) Trend icons
UC-COSTVAR-018 Table Max rows Shows max 15 product variances Limit
UC-COSTVAR-019 Table Empty state Icon with "No cost variance data available" message Empty state

Section: Purchasing Recommendations Table

ID Section Action Expected Outcome Controls Affected
UC-COSTVAR-020 Recs View headers 5 columns: Product, Type, Priority, Est. Savings, Recommendation thead table-dark
UC-COSTVAR-021 Recs Type badge Urgent Review (danger), Cost Negotiation (warning), Monitor Closely (info), Investigate Quality (secondary) Badge colors
UC-COSTVAR-022 Recs Priority badge 5 (danger), 4 (warning), 3 (info), 2 (secondary), 1 (success) Badge colors
UC-COSTVAR-023 Recs Est. Savings Currency format C2 Amount cell
UC-COSTVAR-024 Recs Max rows Shows max 10 recommendations Limit
UC-COSTVAR-025 Recs No recommendations Icon with "No specific recommendations" message Empty state

Section: Data Validation Requirements

ID Validation Requirement
UC-COSTVAR-026 Variance Calc Variance = LastCost - FirstCost
UC-COSTVAR-027 Variance % VariancePercent = ((LastCost - FirstCost) / FirstCost) × 100
UC-COSTVAR-028 Currency Format All amounts use C2 format (2 decimal places)
UC-COSTVAR-029 Date Range Default 6 months analysis period

Total Use Cases: 29

22

Vendor Payables

Vendor accounts payable management with payments, allocations, adjustments, and approval workflows.

Route/vendor-payments
Menu21 (Analytics & Tracking > Vendor Payables)
Checks95 use cases / 11 sections
Open detailed screen guide

UC-VPAY: Vendor Payments Page Use Cases

Page: VendorPayments.razor Route: /vendor-payments Menu Position: 21 (Analytics & Tracking > Vendor Payables)


Overview

Vendor accounts payable management with payments, allocations, adjustments, and approval workflows.


Section: Page Header & Actions

ID Section Action Expected Outcome Controls Affected
UC-VPAY-001 Header Load page "Vendor Accounts Payable" title with money-check icon, breadcrumb Page title
UC-VPAY-002 Header View breadcrumb Shows Dashboard > Vendor Accounts Payable Breadcrumb nav
UC-VPAY-003 Header Click "New Payment" Opens payment modal for new entry paymentModal
UC-VPAY-004 Header Click "OCR Upload" Opens OCR upload modal for receipt processing ocrUploadModal

Section: KPI Cards (4 cards)

ID Section Action Expected Outcome Controls Affected
UC-VPAY-005 KPI Total Payables Blue card shows sum of current month payments in ₹ format Card 1
UC-VPAY-006 KPI Approved Payments Green card shows count of approved payments Card 2
UC-VPAY-007 KPI Pending Approval Yellow card shows count of pending approval payments Card 3
UC-VPAY-008 KPI Unreconciled Amount Info card shows sum of unreconciled payments Card 4

Section: Filters & Search

ID Section Action Expected Outcome Controls Affected
UC-VPAY-009 Filter Select From Date Filters payments from selected date From date input
UC-VPAY-010 Filter Select To Date Filters payments up to selected date To date input
UC-VPAY-011 Filter Select Status Filters by payment status (Draft, Approved, etc.) Status dropdown
UC-VPAY-012 Filter Select Type Filters by payment type (BankTransfer, UPI, etc.) Type dropdown
UC-VPAY-013 Filter Select Vendor Filters by specific vendor Vendor dropdown
UC-VPAY-014 Filter Enter search term Searches payment number, reference, vendor name, notes Search input
UC-VPAY-015 Filter Click Clear Resets all filters to default Clear button

Section: Tab Navigation

ID Section Action Expected Outcome Controls Affected
UC-VPAY-016 Tabs View tabs 2 tabs: Payables (count), Adjustment History (count) nav-tabs
UC-VPAY-017 Tabs Click Payables tab Shows payments table, count in tab label payments tab
UC-VPAY-018 Tabs Click Adjustments tab Shows adjustment history, loads if empty adjustments tab

Section: Payments Table

ID Section Action Expected Outcome Controls Affected
UC-VPAY-019 Table View headers 8 columns: Payable #, Date, Vendor, Amount, Type, Status, Allocation, Actions thead
UC-VPAY-020 Table Click Export Exports to Excel (currently disabled) Export button
UC-VPAY-021 Table Click Refresh Calls RefreshData, reloads all data Refresh button
UC-VPAY-022 Table Loading state Spinner with "Loading..." message Spinner
UC-VPAY-023 Table Empty state Money icon with "No vendor payments found" message Empty state
UC-VPAY-024 Table Payment number cell Bold number, reference below if exists payment-number
UC-VPAY-025 Table Date cell DD/MM/YYYY, value date below if different payment-date
UC-VPAY-026 Table Vendor cell Bold name, vendor code below payment-vendor
UC-VPAY-027 Table Amount cell ₹X.XX bold, TDS below if > 0 payment-amount
UC-VPAY-028 Table Type cell Badge with type, method below payment-type
UC-VPAY-029 Table Status Draft Yellow (bg-warning) badge Status badge
UC-VPAY-030 Table Status Approved Green (bg-success) badge Status badge
UC-VPAY-031 Table Status Processed Blue (bg-primary) badge Status badge
UC-VPAY-032 Table Status Rejected Red (bg-danger) badge Status badge
UC-VPAY-033 Table Status Cancelled Dark (bg-dark) badge Status badge
UC-VPAY-034 Table Needs approval Warning icon with "Needs Approval" text Status cell
UC-VPAY-035 Table Fully Allocated Green "Fully Allocated" badge Allocation cell
UC-VPAY-036 Table Partial allocation Yellow "Partial" badge with remaining amount Allocation cell
UC-VPAY-037 Table Unallocated Red "Unallocated" badge Allocation cell
UC-VPAY-038 Table Click View Calls ViewPayment(id), opens modal read-only Eye button
UC-VPAY-039 Table Click Edit Calls EditPayment(id), opens modal editable (if CanEdit) Edit button
UC-VPAY-040 Table Click Allocate Calls AllocatePayment(id), opens allocation modal Link button
UC-VPAY-041 Table Click Approve Calls ApprovePayment(id) (if CanApprovePayments) Approve button
UC-VPAY-042 Table Click Reject Opens rejection modal (if CanApprovePayments) Reject button

Section: Pagination

ID Section Action Expected Outcome Controls Affected
UC-VPAY-043 Pagination Multiple pages Pagination nav appears when totalPages > 1 Pagination nav
UC-VPAY-044 Pagination Click first Goes to page 1 Double left button
UC-VPAY-045 Pagination Click previous Goes to currentPage - 1 Left button
UC-VPAY-046 Pagination Click page number Goes to specific page Page buttons
UC-VPAY-047 Pagination Click next Goes to currentPage + 1 Right button
UC-VPAY-048 Pagination Click last Goes to totalPages Double right button

Section: Adjustment History Tab

ID Section Action Expected Outcome Controls Affected
UC-VPAY-049 Adjustments View headers 7 columns: Date, Payment, Type, Details, Performed By, Reason, Status thead
UC-VPAY-050 Adjustments Filter by date Filters adjustments by date range Date inputs
UC-VPAY-051 Adjustments Filter by type AllocationReversal or AmountAdjustment Type dropdown
UC-VPAY-052 Adjustments Search payment Searches by payment number or reason Search input
UC-VPAY-053 Adjustments Type badge Reversal=warning, other=info Type badge
UC-VPAY-054 Adjustments Status Completed Green (bg-success) badge Status badge
UC-VPAY-055 Adjustments Status Failed Red (bg-danger) badge Status badge
UC-VPAY-056 Adjustments Empty state History icon with "No adjustment history found" Empty message

Section: Create/Edit Payment Modal

ID Section Action Expected Outcome Controls Affected
UC-VPAY-057 Modal View modal Title shows "Create New" or "Edit" based on state Modal title
UC-VPAY-058 Modal Validation errors Red alert box listing all errors Validation alert
UC-VPAY-059 Modal Payment Number Required text input Input field
UC-VPAY-060 Modal Vendor select Required dropdown with all active vendors Select field
UC-VPAY-061 Modal Payment Date Required date input Date input
UC-VPAY-062 Modal Value Date Optional date input Date input
UC-VPAY-063 Modal Payment Amount Required number input Number input
UC-VPAY-064 Modal Payment Type Required dropdown: BankTransfer, UPI, Cheque, Cash, etc. Select field
UC-VPAY-065 Modal Payment Method Dropdown populated based on PaymentType Select field
UC-VPAY-066 Modal Reference Number Optional text input Input field
UC-VPAY-067 Modal Bank Transfer fields Shows Bank Account, Bank Name, IFSC when type=BankTransfer Conditional fields
UC-VPAY-068 Modal UPI fields Shows UPI ID, Transaction ID when type=UPI Conditional fields
UC-VPAY-069 Modal Cheque fields Shows Cheque Number, Cheque Date, Bank Name when type=Cheque Conditional fields
UC-VPAY-070 Modal TDS Amount Optional number input Number input
UC-VPAY-071 Modal TDS Rate Optional number input (percentage) Number input
UC-VPAY-072 Modal TDS Section Optional text (194C, 194J, etc.) Input field
UC-VPAY-073 Modal Processing Fee Optional number input Number input
UC-VPAY-074 Modal Currency Dropdown: INR, USD, EUR (default INR) Select field
UC-VPAY-075 Modal Notes Optional textarea Textarea
UC-VPAY-076 Modal Click Cancel Closes modal without saving Cancel button
UC-VPAY-077 Modal Click Save Validates and saves payment Save button

Section: Reject Payment Modal

ID Section Action Expected Outcome Controls Affected
UC-VPAY-078 Reject View modal Warning alert with payment details Modal body
UC-VPAY-079 Reject Reason required Min 5 characters, shows validation error if less Textarea
UC-VPAY-080 Reject Click Reject Calls RejectPaymentAsync, refreshes data Reject button

Section: Payment Allocation Modal

ID Section Action Expected Outcome Controls Affected
UC-VPAY-081 Allocation Payment details Shows Payment #, Vendor, Amount, Available for Allocation Detail card
UC-VPAY-082 Allocation Available Invoices Lists vendor's unpaid invoices with balance Left panel
UC-VPAY-083 Allocation Click Add to Allocation Adds invoice to pending allocations Add button
UC-VPAY-084 Allocation Allocations list Shows selected invoices with editable amounts Right panel
UC-VPAY-085 Allocation Edit allocation amount Updates AllocationAmount, recalculates totals Number input
UC-VPAY-086 Allocation Edit TDS amount Updates TdsAmount, recalculates totals Number input
UC-VPAY-087 Allocation Click Remove Removes from pending allocations Remove button
UC-VPAY-088 Allocation Click Reverse Opens reverse allocation modal (saved allocations) Reverse button
UC-VPAY-089 Allocation Click Adjust Payment Opens adjust payment amount modal Adjust button
UC-VPAY-090 Allocation Allocation summary Shows Total Allocated, Remaining, Payment Amount Summary card
UC-VPAY-091 Allocation Click Save Calls SavePaymentAllocations, disabled if no allocations Save button

Section: Data Validation Requirements

ID Validation Requirement
UC-VPAY-092 Currency Format All amounts in ₹X,XX,XXX.XX Indian format
UC-VPAY-093 Date Format DD/MM/YYYY for display
UC-VPAY-094 Authorization Base: CustomerOperator; Approval: CustomerAdmin/SystemAdmin
UC-VPAY-095 Page Size 20 items per page default

Total Use Cases: 95

22a

Payment Allocation Modal

Payment allocation modal for matching vendor payments to vendor invoices (GRNs) with TDS deduction support.

Routen/a
MenuN/A (Sub-component)
Checks35 use cases / 5 sections
Open detailed screen guide

UC-VPALLOC: Vendor Payment Allocation Use Cases

Page: VendorPaymentAllocation.razor (Modal Component) Route: N/A (Modal within VendorPayments.razor) Menu Position: N/A (Sub-component)


Overview

Payment allocation modal for matching vendor payments to vendor invoices (GRNs) with TDS deduction support.


Section: Payment Info Card

ID Section Action Expected Outcome Controls Affected
UC-VPALLOC-001 Info View payment details Shows Payment #, Vendor Name Header row
UC-VPALLOC-002 Info Payment Amount Bold ₹ formatted amount Amount display
UC-VPALLOC-003 Info Already Allocated Shows previously allocated amount Allocated display
UC-VPALLOC-004 Info Available for Allocation Payment Amount - Already Allocated Available display

Section: Available Invoices Panel

ID Section Action Expected Outcome Controls Affected
UC-VPALLOC-005 Invoices View header "Available Invoices" with count Panel header
UC-VPALLOC-006 Invoices Search invoices Filters by GRN number Search input
UC-VPALLOC-007 Invoices Invoice row Shows GRN #, Date, Total, Paid, Balance Row layout
UC-VPALLOC-008 Invoices GRN Number Bold, primary colored link GRN display
UC-VPALLOC-009 Invoices Invoice Date DD/MM/YYYY format Date cell
UC-VPALLOC-010 Invoices Total Amount ₹ formatted Amount cell
UC-VPALLOC-011 Invoices Paid Amount ₹ formatted, success color Paid cell
UC-VPALLOC-012 Invoices Balance Due ₹ formatted, warning if > 0 Balance cell
UC-VPALLOC-013 Invoices Click Add Calls AddToAllocation(invoice) Plus button
UC-VPALLOC-014 Invoices Already in allocation Add button disabled, "Added" shown Disabled state
UC-VPALLOC-015 Invoices Empty state "No unpaid invoices found" message Empty message

Section: Pending Allocations Panel

ID Section Action Expected Outcome Controls Affected
UC-VPALLOC-016 Pending View header "Allocations" with count Panel header
UC-VPALLOC-017 Pending Allocation row GRN #, Balance, Allocation Amount, TDS Row layout
UC-VPALLOC-018 Pending Invoice Balance Read-only balance display Balance display
UC-VPALLOC-019 Pending Allocation Amount Editable number, max = balance Number input
UC-VPALLOC-020 Pending TDS Amount Editable number for TDS deduction Number input
UC-VPALLOC-021 Pending Net Amount AllocationAmount - TDS, read-only Calculated field
UC-VPALLOC-022 Pending Click Remove Removes from pending list Trash button
UC-VPALLOC-023 Pending Validation Amount cannot exceed balance Validation
UC-VPALLOC-024 Pending Empty state "No allocations added" message Empty message

Section: Existing Allocations Panel

ID Section Action Expected Outcome Controls Affected
UC-VPALLOC-025 Existing View header "Saved Allocations" with count Panel header
UC-VPALLOC-026 Existing Allocation row GRN #, Amount, TDS, Net, Date, Status Row layout
UC-VPALLOC-027 Existing Allocation Date DD/MM/YYYY when allocated Date display
UC-VPALLOC-028 Existing Status Active Green (bg-success) badge Status badge
UC-VPALLOC-029 Existing Status Reversed Red (bg-danger) badge Status badge
UC-VPALLOC-030 Existing Click Reverse Opens reverse confirmation modal Reverse button

Section: Summary & Actions

ID Section Action Expected Outcome Controls Affected
UC-VPALLOC-031 Summary Total Allocation Sum of pending allocation amounts Total display
UC-VPALLOC-032 Summary Remaining Available - Total Allocation Remaining display
UC-VPALLOC-033 Summary Over-allocation warning Red warning if Total > Available Warning alert
UC-VPALLOC-034 Actions Click Cancel Closes modal, discards pending Cancel button
UC-VPALLOC-035 Actions Click Save Saves all pending allocations, disabled if none Save button

Total Use Cases: 35

23

Vendor Balance Dashboard

Dashboard showing vendor account balances, aging analysis, payment schedules, and summary KPIs for accounts payable management.

Route/vendor-balance-dashboard
Menu22 (Analytics & Tracking > Vendor Balance Dashboard)
Checks55 use cases / 9 sections
Open detailed screen guide

UC-VBDASH: Vendor Balance Dashboard Use Cases

Page: VendorBalanceDashboard.razor Route: /vendor-balance-dashboard Menu Position: 22 (Analytics & Tracking > Vendor Balance Dashboard)


Overview

Dashboard showing vendor account balances, aging analysis, payment schedules, and summary KPIs for accounts payable management.


Section: Page Header

ID Section Action Expected Outcome Controls Affected
UC-VBDASH-001 Header Load page "Vendor Balance Dashboard" title with chart-line icon Page title
UC-VBDASH-002 Header View breadcrumb Shows Dashboard > Vendor Balance Dashboard Breadcrumb nav
UC-VBDASH-003 Header Click Refresh Calls RefreshAllData, shows loading indicator Refresh button
UC-VBDASH-004 Header Click Export Exports dashboard to Excel/PDF Export button

Section: KPI Summary Cards

ID Section Action Expected Outcome Controls Affected
UC-VBDASH-005 KPI Total Payable Primary card with sum of all vendor balances Card 1
UC-VBDASH-006 KPI Current (0-30 days) Green card with current period payables Card 2
UC-VBDASH-007 KPI Due (31-60 days) Yellow card with near-due payables Card 3
UC-VBDASH-008 KPI Overdue (60+ days) Red card with overdue amount Card 4
UC-VBDASH-009 KPI Average Payment Days Info card with average days to payment Card 5
UC-VBDASH-010 KPI Vendors with Balance Secondary card with count of vendors with balance Card 6

Section: Vendor Balances Table

ID Section Action Expected Outcome Controls Affected
UC-VBDASH-011 Table View headers Vendor, Opening Balance, Purchases, Payments, Closing Balance, Aging thead
UC-VBDASH-012 Table Search vendor Filters by vendor name or code Search input
UC-VBDASH-013 Table Filter by balance Options: All, With Balance, Zero Balance Filter dropdown
UC-VBDASH-014 Table Sort by column Sorts ascending/descending on click Sort headers
UC-VBDASH-015 Table Vendor name cell Bold name with vendor code below Vendor cell
UC-VBDASH-016 Table Opening Balance ₹ formatted, from period start Balance cell
UC-VBDASH-017 Table Total Purchases ₹ formatted, GRN total for period Purchases cell
UC-VBDASH-018 Table Total Payments ₹ formatted in green Payments cell
UC-VBDASH-019 Table Closing Balance ₹ formatted, bold if > 0 Balance cell
UC-VBDASH-020 Table Aging breakdown Mini bar showing 0-30, 31-60, 60+ distribution Aging cell
UC-VBDASH-021 Table Click vendor row Expands to show detailed transactions Row expand
UC-VBDASH-022 Table Click View Details Navigates to vendor details page View button

Section: Period Filter

ID Section Action Expected Outcome Controls Affected
UC-VBDASH-023 Filter Select From Date Updates balances from selected date From date
UC-VBDASH-024 Filter Select To Date Updates balances to selected date To date
UC-VBDASH-025 Filter Quick select: This Month Sets current month dates Quick button
UC-VBDASH-026 Filter Quick select: Last Month Sets previous month dates Quick button
UC-VBDASH-027 Filter Quick select: This Quarter Sets current quarter dates Quick button
UC-VBDASH-028 Filter Quick select: This Year Sets current financial year dates Quick button
UC-VBDASH-029 Filter Click Apply Refreshes all data with new period Apply button

Section: Aging Analysis Chart

ID Section Action Expected Outcome Controls Affected
UC-VBDASH-030 Chart View chart Stacked bar chart showing aging buckets Chart container
UC-VBDASH-031 Chart 0-30 days bar Green segment with current payables Bar segment
UC-VBDASH-032 Chart 31-60 days bar Yellow segment with near-due Bar segment
UC-VBDASH-033 Chart 61-90 days bar Orange segment with due Bar segment
UC-VBDASH-034 Chart 90+ days bar Red segment with overdue Bar segment
UC-VBDASH-035 Chart Hover on segment Shows amount and percentage Tooltip
UC-VBDASH-036 Chart Click on segment Filters table to that aging bucket Chart interaction

Section: Top Vendors by Balance

ID Section Action Expected Outcome Controls Affected
UC-VBDASH-037 Top View card "Top 10 Vendors by Balance" card Card header
UC-VBDASH-038 Top Vendor list Sorted by closing balance descending List items
UC-VBDASH-039 Top Vendor item Name, balance, percentage of total List row
UC-VBDASH-040 Top Progress bar Visual representation of balance Progress bar
UC-VBDASH-041 Top Click vendor Navigates to vendor details Click action

Section: Payment Schedule

ID Section Action Expected Outcome Controls Affected
UC-VBDASH-042 Schedule View card "Upcoming Payments" card Card header
UC-VBDASH-043 Schedule Payment list Shows scheduled payments by due date List items
UC-VBDASH-044 Schedule Due today Red highlight for today's payments Row highlight
UC-VBDASH-045 Schedule Due this week Yellow highlight for week's payments Row highlight
UC-VBDASH-046 Schedule Payment row Vendor, Invoice #, Amount, Due Date Row layout
UC-VBDASH-047 Schedule Click Schedule Payment Opens vendor payments page Action button

Section: Vendor Detail Expansion

ID Section Action Expected Outcome Controls Affected
UC-VBDASH-048 Detail Expand row Shows transaction history for vendor Expanded section
UC-VBDASH-049 Detail Transaction type GRN (Purchase) or Payment icons Type indicator
UC-VBDASH-050 Detail Transaction date DD/MM/YYYY format Date cell
UC-VBDASH-051 Detail Reference number GRN # or Payment # Reference cell
UC-VBDASH-052 Detail Amount ₹ formatted, green for payment, default for purchase Amount cell
UC-VBDASH-053 Detail Running balance Cumulative balance after transaction Balance cell

Section: Data Validation

ID Validation Requirement
UC-VBDASH-054 Currency Format All amounts in ₹X,XX,XXX.XX Indian format
UC-VBDASH-055 Authorization Requires CustomerAdmin or CustomerOperator role

Total Use Cases: 55

24

Batch Linked Payables

Batch-linked accounts payable analysis with payment status, vendor linkage, cash flow forecast, and payment strategy recommendations.

Route/batch-linked-payables
Menu23 (Analytics & Tracking > Batch-Linked Payables)
Checks37 use cases / 9 sections
Open detailed screen guide

UC-BATLNK: Batch Linked Payables Page Use Cases

Page: BatchLinkedPayables.razor Route: /batch-linked-payables Menu Position: 23 (Analytics & Tracking > Batch-Linked Payables)


Overview

Batch-linked accounts payable analysis with payment status, vendor linkage, cash flow forecast, and payment strategy recommendations.


Section: Page Header & Actions

ID Section Action Expected Outcome Controls Affected
UC-BATLNK-001 Header Load page Title "Batch-Linked Accounts Payable", h2 with link icon, subtitle text PageTitle, h2, p
UC-BATLNK-002 Actions Click "Refresh" Reloads all data Refresh btn
UC-BATLNK-003 Actions Click "Process Batch Payment" Opens payment processing modal Process btn

Section: Loading State

ID Section Action Expected Outcome Controls Affected
UC-BATLNK-004 Loading During load Spinner with "Loading batch payable data..." spinner-border

Section: Analysis Overview Cards (4 cards)

ID Section Action Expected Outcome Controls Affected
UC-BATLNK-005 Overview Batch-Linked Payables Purple gradient card, amount in C format, batch count First card
UC-BATLNK-006 Overview Unlinked Payables Pink gradient card, amount, invoice count Second card
UC-BATLNK-007 Overview Linkage Rate Blue gradient card, percentage, "batch traceability" Third card
UC-BATLNK-008 Overview Total Outstanding Green gradient card, sum of linked + unlinked Fourth card

Section: Batch Payment Status Table

ID Section Action Expected Outcome Controls Affected
UC-BATLNK-009 Table View headers 9 columns: Batch, Product, Vendor, Batch Cost, Outstanding, Payment %, Status, Profit Impact, Actions thead
UC-BATLNK-010 Table Batch cell Batch number (bold), days outstanding below Batch cell
UC-BATLNK-011 Table Overdue row Red table-danger row styling table-danger row class
UC-BATLNK-012 Table Payment progress Progress bar with color based on percentage Progress bar
UC-BATLNK-013 Table Status badge Fully Paid (success), Partially Paid (warning), Unpaid (danger) Status badges
UC-BATLNK-014 Table Profit Impact Green if positive, red if negative Color classes
UC-BATLNK-015 Table Dropdown actions "View Profitability Impact", "Process Payment" options Dropdown menu
UC-BATLNK-016 Table Empty state Icon and "No batch payment data available" message Empty state
UC-BATLNK-017 Table Max rows Shows max 10 batch statuses Limit

Section: Vendor Linkage Status

ID Section Action Expected Outcome Controls Affected
UC-BATLNK-018 Vendor Card header "Vendor Linkage Status" with building icon Card header
UC-BATLNK-019 Vendor Linkage item Vendor name, linked/total batches, progress bar, outstanding amount List item
UC-BATLNK-020 Vendor Progress bar Shows linkage percentage Progress bar
UC-BATLNK-021 Vendor Empty state Icon and "No vendor linkage data" Empty state
UC-BATLNK-022 Vendor Max items Shows max 8 vendors Limit

Section: Cash Flow Forecast

ID Section Action Expected Outcome Controls Affected
UC-BATLNK-023 Forecast Section header "Batch Payables Forecast (Next 30 Days)" with calendar icon Card header
UC-BATLNK-024 Forecast Summary cards Total Forecast, Profit Impact, Critical Payments count, Forecast Days 4 summary boxes
UC-BATLNK-025 Forecast Daily table Date, Forecasted Payments, Batch Count, Profit Impact, Major Batches Forecast table
UC-BATLNK-026 Forecast Profit impact color Green if positive, red if negative Color classes
UC-BATLNK-027 Forecast Max rows Shows max 10 days with payments > 0 Limit

Section: Recommendations Panel

ID Section Action Expected Outcome Controls Affected
UC-BATLNK-028 Recs Section header "Payment Strategy Recommendations" with lightbulb icon Card header
UC-BATLNK-029 Recs Strategy info Optimal strategy name, potential profit improvement Strategy section
UC-BATLNK-030 Recs Action items List of recommended actions with check icons Action list
UC-BATLNK-031 Recs Priority batches Top 5 priority batches with badge, number, amount Priority list

Section: TODO Items - ✅ ALL IMPLEMENTED

ID Section Action Expected Outcome Status
UC-BATLNK-032 Actions Click "View Profitability Impact" Shows batch profitability analysis modal with metrics, vendor info, profit impact ✅ IMPLEMENTED
UC-BATLNK-033 Actions Click "Process Payment" Shows payment processing modal with form (amount, date, method, reference, notes) ✅ IMPLEMENTED
UC-BATLNK-034 Actions Process payment for batch ProcessBatchPayment() opens modal, ConfirmPayment() processes payment ✅ IMPLEMENTED

Section: Data Validation Requirements

ID Validation Requirement
UC-BATLNK-035 Linkage Rate Must calculate (LinkedPayables / TotalPayables) × 100
UC-BATLNK-036 Currency Format All amounts use C format (currency)
UC-BATLNK-037 Forecast Period Must show 30-day forecast

Total Use Cases: 37

25

Excel Import

Excel file import and validation for bulk data operations including products, customers, vendors, and transactions.

Route/excel-import
Menu25 (Analytics & Tracking > Excel Import)
Checks32 use cases / 7 sections
Open detailed screen guide

UC-ExcelImport: Excel Import Page Use Cases

Page: ExcelImportValidation.razor Route: /excel-import Menu Position: 25 (Analytics & Tracking > Excel Import)


Overview

Excel file import and validation for bulk data operations including products, customers, vendors, and transactions.


Section: Page Header

ID Section Action Expected Outcome Controls Affected
UC-EXCEL-001 Header Load page Title "Excel Import - [BusinessName]", file upload section visible PageTitle, h2
UC-EXCEL-002 Header No business selected Alert "Please select a business to import data" alert alert-info

Section: Import Type Selection

ID Section Action Expected Outcome Controls Affected
UC-EXCEL-003 Type View import types Options: Products, Customers, Vendors, Sales, Inventory Import type selector
UC-EXCEL-004 Type Select Products Shows products template info and upload field Type-specific UI
UC-EXCEL-005 Type Select Customers Shows customers template info and upload field Type-specific UI
UC-EXCEL-006 Type Select Vendors Shows vendors template info and upload field Type-specific UI

Section: File Upload

ID Section Action Expected Outcome Controls Affected
UC-EXCEL-007 Upload View upload area Drag-drop zone with "Choose File" button File upload area
UC-EXCEL-008 Upload Click Choose File File browser opens InputFile
UC-EXCEL-009 Upload Drag Excel file File accepted if .xlsx/.xls Drag-drop zone
UC-EXCEL-010 Upload Invalid file type Error message "Only Excel files supported" Error alert
UC-EXCEL-011 Upload File selected Shows file name, size, ready to process File info display
UC-EXCEL-012 Upload Click Download Template Downloads template for selected import type Download button

Section: Validation

ID Section Action Expected Outcome Controls Affected
UC-EXCEL-013 Validate Click Validate Processing spinner, validates all rows Validate button
UC-EXCEL-014 Validate All rows valid Green success "X rows ready to import" Success alert
UC-EXCEL-015 Validate Some rows invalid Yellow warning with error count, error list Warning alert, error list
UC-EXCEL-016 Validate Column mismatch Error "Missing required columns: X, Y, Z" Error alert
UC-EXCEL-017 Validate View errors Table showing row number, column, error message Error table

Section: Preview

ID Section Action Expected Outcome Controls Affected
UC-EXCEL-018 Preview View preview table Shows first 10 rows of data to import Preview table
UC-EXCEL-019 Preview Invalid row Row highlighted in red with error icon Row styling
UC-EXCEL-020 Preview Valid row Row in normal styling Row styling
UC-EXCEL-021 Preview Total rows Shows "Total: X rows, Valid: Y, Invalid: Z" Summary text

Section: Import

ID Section Action Expected Outcome Controls Affected
UC-EXCEL-022 Import Import button disabled Disabled until validation passes Import button
UC-EXCEL-023 Import Click Import Processing with progress bar Progress indicator
UC-EXCEL-024 Import Import success Green success "X records imported successfully" Success alert
UC-EXCEL-025 Import Partial success "Imported: X, Skipped: Y" with error details Warning alert
UC-EXCEL-026 Import Import failure Error message with retry option Error alert
UC-EXCEL-027 Import Import complete Reset form, ready for next import Form reset

Section: Data Validation Requirements

ID Validation Requirement
UC-EXCEL-028 File Size Max file size limit enforced
UC-EXCEL-029 Column Mapping Required columns validated
UC-EXCEL-030 Data Types Number, date, text types validated
UC-EXCEL-031 Duplicates Duplicate detection for codes/IDs
UC-EXCEL-032 References Foreign key references validated

Total Use Cases: 32

26

PO-GR Integration

Purchase Order to Goods Receipt integration with matching, variance approvals, exception handling, and compliance reporting.

Route/po-gr-integration
Menu25 (Analytics & Tracking > PO-GR Integration)
Checks80 use cases / 10 sections
Open detailed screen guide

UC-POGR: PO to GR Integration Page Use Cases

Page: POGRIntegration.razor Route: /po-gr-integration Menu Position: 25 (Analytics & Tracking > PO-GR Integration)


Overview

Purchase Order to Goods Receipt integration with matching, variance approvals, exception handling, and compliance reporting.


Section: Page Header & Actions

ID Section Action Expected Outcome Controls Affected
UC-POGR-001 Header Load page Title "PO to Goods Receipt Integration" with exchange icon Page title
UC-POGR-002 Header Description Shows "Seamless integration..." subtitle Description text
UC-POGR-003 Header Click Auto-Match Calls PerformAutoMatching, matches GRs to POs Auto-Match button
UC-POGR-004 Header Click Refresh Calls RefreshData, reloads all data Refresh button
UC-POGR-005 Header Click Compliance Report Calls GenerateComplianceReport, shows alert with metrics Compliance button
UC-POGR-006 Header Processing active All header buttons disabled Button disabled state

Section: Summary Cards (4 cards)

ID Section Action Expected Outcome Controls Affected
UC-POGR-007 Summary Pending POs Yellow card shows pendingPOsCount, overdue count below Card 1
UC-POGR-008 Summary Unmatched GRs Info card shows unmatchedGRsCount Card 2
UC-POGR-009 Summary Variances Pending Red card shows variancesAwaitingApproval Card 3
UC-POGR-010 Summary Matching Rate Green card shows matchingRate as percentage Card 4

Section: Tab Navigation

ID Section Action Expected Outcome Controls Affected
UC-POGR-011 Tabs View tabs 5 tabs: Pending POs, Unmatched GRs, Variance Approvals, Exception Report, Integration Summary nav-tabs
UC-POGR-012 Tabs Click tab Sets selectedTabIndex, changes activeTab Tab click
UC-POGR-013 Tabs Default tab "Pending Purchase Orders" active (index 0) First tab active

Section: Pending Purchase Orders Tab

ID Section Action Expected Outcome Controls Affected
UC-POGR-014 PO Tab View headers 8 columns: Order #, Vendor, Order Date, Expected Delivery, Status, Receipt %, Amount, Actions thead table-dark
UC-POGR-015 PO Tab Order number Bold, overdue badge if IsOverdue with days count Order # cell
UC-POGR-016 PO Tab Expected date Shows date or "Not set" if null Date cell
UC-POGR-017 PO Tab Status badge Color from GetStatusColor: Pending=warning, Approved=info, Sent=primary, PartiallyReceived=warning, Completed=success, Cancelled=danger Status badge
UC-POGR-018 PO Tab Receipt % Progress bar showing ReceiptPercentage Progress bar
UC-POGR-019 PO Tab Amount Currency format Amount cell
UC-POGR-020 PO Tab Click Create GR Opens CreateGRFromPO modal Create GR button
UC-POGR-021 PO Tab Click View Calls ViewPODetails(purchaseOrderId) View button
UC-POGR-022 PO Tab Max rows Shows max 50 POs Pagination
UC-POGR-023 PO Tab Empty state Check icon with "No Pending Purchase Orders" Empty message

Section: Unmatched Goods Receipts Tab

ID Section Action Expected Outcome Controls Affected
UC-POGR-024 GR Tab View headers 7 columns: Receipt #, Vendor, Receipt Date, Items, Status, Quality Score, Actions thead
UC-POGR-025 GR Tab Click Auto-Match All Calls PerformAutoMatching Auto-Match All button
UC-POGR-026 GR Tab Status badge Color from GetGRStatusColor Status badge
UC-POGR-027 GR Tab Quality score Badge color from GetQualityScoreColor: ≥90=success, ≥80=warning, <80=danger Score badge
UC-POGR-028 GR Tab Click Match Calls MatchGRToPO(goodsReceiptId) Match button
UC-POGR-029 GR Tab Click View Calls ViewGRDetails(goodsReceiptId) View button
UC-POGR-030 GR Tab Max rows Shows max 50 GRs Pagination
UC-POGR-031 GR Tab Empty state Check icon with "No Unmatched Goods Receipts" Empty message

Section: Variance Approvals Tab

ID Section Action Expected Outcome Controls Affected
UC-POGR-032 Variance View card Warning border card for each variance requiring approval Variance card
UC-POGR-033 Variance Header Shows "Variance Approval Required" with total amount badge Card header
UC-POGR-034 Variance Summary row Total Variance, Variance Count, Significant Variances Summary div
UC-POGR-035 Variance Table headers 7 columns: Product, Ordered, Received, Qty Variance, Price Variance, Total Variance, Type Table thead
UC-POGR-036 Variance Qty variance ≠ 0 Yellow warning text Qty cell
UC-POGR-037 Variance Price variance > 0.01 Yellow warning text Price cell
UC-POGR-038 Variance Total > 50 Red danger text; else yellow warning Total cell
UC-POGR-039 Variance Quality issues Shows "Quality" danger badge Type cell
UC-POGR-040 Variance Max rows Shows max 10 variance details Pagination
UC-POGR-041 Variance Click Approve Calls ApproveVariance(grId, true) Approve button
UC-POGR-042 Variance Click Reject Calls ApproveVariance(grId, false) Reject button
UC-POGR-043 Variance Click View Details Calls ViewVarianceDetails(grId) View Details button
UC-POGR-044 Variance Empty state Check icon with "No Variances Awaiting Approval" Empty message

Section: Exception Report Tab

ID Section Action Expected Outcome Controls Affected
UC-POGR-045 Exceptions Severity cards 3 cards: High (danger), Medium (warning), Low (info) with counts Severity cards
UC-POGR-046 Exceptions Table headers 7 columns: Type, Severity, Vendor, Reference, Description, Date, Actions thead
UC-POGR-047 Exceptions Type badge Color from GetExceptionTypeColor: OverduePO=danger, UnmatchedGR=warning, SignificantVariance=warning, QualityIssue=danger, DeliveryDelay=info Type badge
UC-POGR-048 Exceptions Severity badge Color from GetSeverityColor Severity badge
UC-POGR-049 Exceptions Row class From GetExceptionRowClass: High=table-danger, Medium=table-warning Row class
UC-POGR-050 Exceptions Reference Shows OrderNumber or ReceiptNumber Reference cell
UC-POGR-051 Exceptions Click Resolve Calls ResolveException(exception) Resolve button
UC-POGR-052 Exceptions Max rows Shows max 50 exceptions Pagination
UC-POGR-053 Exceptions Empty state Check icon with "No Exceptions Found" Empty message

Section: Integration Summary Tab

ID Section Action Expected Outcome Controls Affected
UC-POGR-054 Summary Table headers 9 columns: Order #, Vendor, Order Date, Status, Amount, GRs, Receipt %, Variances, Completed thead
UC-POGR-055 Summary Status badge Color from GetStatusColor Status badge
UC-POGR-056 Summary Receipt % Progress bar showing percentage Progress bar
UC-POGR-057 Summary HasVariances Yes=warning badge, No=success badge Variance cell
UC-POGR-058 Summary IsCompleted Check icon (success) or clock icon (warning) Completed cell
UC-POGR-059 Summary Max rows Shows max 50 summaries Pagination
UC-POGR-060 Summary Empty state Info icon with "No Integration Data" Empty message

Section: Create GR Modal

ID Section Action Expected Outcome Controls Affected
UC-POGR-061 Modal View modal Title "Create Goods Receipt from Purchase Order" Modal title
UC-POGR-062 Modal PO info Shows Order Number and Vendor Name Info row
UC-POGR-063 Modal Vendor Delivery Note Text input for delivery note Input field
UC-POGR-064 Modal Batch Number Text input for batch number Input field
UC-POGR-065 Modal Receipt Date Date input, defaults to today Date input
UC-POGR-066 Modal Received By Text input for receiver name Input field
UC-POGR-067 Modal Notes Textarea for notes Textarea
UC-POGR-068 Modal Line items table Shows Product, Ordered, Received, Damaged, Quality Line items table
UC-POGR-069 Modal Received qty Number input, min 0, max OrderedQuantity Number input
UC-POGR-070 Modal Damaged qty Number input, min 0, max ReceivedQuantity Number input
UC-POGR-071 Modal Quality score Number input 0-100, step 0.1 Number input
UC-POGR-072 Modal Click Cancel Closes modal via CloseCreateGRModal Cancel button
UC-POGR-073 Modal Click Create Calls SaveGoodsReceipt, disabled if processing Create button
UC-POGR-074 Modal Processing Spinner shown, button disabled Processing state

Section: Data Validation Requirements

ID Validation Requirement
UC-POGR-075 Matching Rate = (matchedGRs / totalGRs) × 100
UC-POGR-076 Date Format MMM dd, yyyy for display dates
UC-POGR-077 Currency Format C format for amounts
UC-POGR-078 Quality Range 0-100 decimal
UC-POGR-079 Authorization Requires CustomerOperator policy
UC-POGR-080 Date Range Integration summary default 30 days

Total Use Cases: 80

27

Low Stock Alerts

Intelligent stock alerts with AI-powered recommendations, reorder suggestions, and stock insights based on sales velocity and lead times.

Route/low-stock-alerts
Menu27 (Analytics & Tracking > Low Stock Alerts)
Checks43 use cases / 10 sections
Open detailed screen guide

UC-LowStockAlerts: Low Stock Alerts Page Use Cases

Page: LowStockAlerts.razor Route: /low-stock-alerts Menu Position: 27 (Analytics & Tracking > Low Stock Alerts)


Overview

Intelligent stock alerts with AI-powered recommendations, reorder suggestions, and stock insights based on sales velocity and lead times.


Section: Page Header

ID Section Action Expected Outcome Controls Affected
UC-LSA-001 Header Load page Title "Low Stock Alert Explanations" with warning icon, subtitle "Intelligent stock alerts..." h3 title, p subtitle
UC-LSA-002 Header Click "Refresh Analysis" Loading spinner, then data reloads spinner, data refresh
UC-LSA-003 Header Click "Reorder Report" Generates/exports reorder report Report generation

Section: Loading State

ID Section Action Expected Outcome Controls Affected
UC-LSA-004 Loading During load Spinner with "Analyzing stock levels and generating recommendations..." spinner, loading text
UC-LSA-005 Loading Load completes Shows summary cards (Critical, Low, Healthy, Reorder counts) Summary cards display

Section: Summary Cards (4 cards)

ID Section Action Expected Outcome Controls Affected
UC-LSA-006 Summary Critical Stock card Red border, shows count, "Requires immediate action" card border-danger, display-4 text-danger, subtitle
UC-LSA-007 Summary Low Stock card Yellow border, shows count, "Reorder recommended" card border-warning, display-4 text-warning, subtitle
UC-LSA-008 Summary Healthy Stock card Green border, shows count, "Within normal levels" card border-success, display-4 text-success, subtitle
UC-LSA-009 Summary Reorder Items card Blue border, shows reorder recommendation count card border-primary, display-4 text-primary, subtitle

Section: Tabs (4 tabs)

ID Section Action Expected Outcome Controls Affected
UC-LSA-010 Tabs View tabs 4 tabs: Critical Alerts (count), Low Stock (count), Reorder Recommendations (count), Stock Insights 4 nav-link tabs
UC-LSA-011 Tabs Click Critical Alerts Shows critical stock items with URGENT cards, stockout days badge, View Insights button Critical tab content
UC-LSA-012 Tabs Click Low Stock Shows low stock items with warning cards, days until reorder badge Low Stock tab content
UC-LSA-013 Tabs Click Reorder Recommendations Shows summary card + table with Priority/Product/Stock/Qty/Days/Vendor/Cost/Actions Recommendations table
UC-LSA-014 Tabs Click Stock Insights Shows Stock Distribution chart, Days Until Stockout analysis, Top Products by Sales Velocity table Insights charts/tables

Section: Critical Alerts Tab Content

ID Section Action Expected Outcome Controls Affected
UC-LSA-015 Critical View item card Red border card with: URGENT product name, stockout badge, Stock Analysis section, Recommendation section card border-danger
UC-LSA-016 Critical Stockout <= 3 days Red badge "Stockout in X days" badge bg-danger
UC-LSA-017 Critical Stock Analysis Shows: Current Stock, Daily Sales Rate, Supplier Lead Time, Reorder Point, Seasonal Impact (if applicable) Analysis list
UC-LSA-018 Critical Click "View Insights" Modal opens with detailed product stock insights ProductInsight modal
UC-LSA-019 Critical Click "Create Emergency Order" Navigates to /po-gr-integration?productId=X&emergency=true Navigation
UC-LSA-020 Critical No critical items Green success alert "Great! No products are at critical stock levels." alert alert-success

Section: Low Stock Tab Content

ID Section Action Expected Outcome Controls Affected
UC-LSA-021 Low Stock View item card Yellow border card with: product name, days badge, Stock Analysis, Action Plan card border-warning
UC-LSA-022 Low Stock Stock Analysis Shows: Current Stock, Daily Sales Rate, Monthly Usage, Last Restocked date, Seasonal Factor Analysis list
UC-LSA-023 Low Stock Click "Create Reorder" Navigates to /po-gr-integration?productId=X Navigation
UC-LSA-024 Low Stock No low stock items Blue info alert "All products are above their low stock thresholds." alert alert-info

Section: Reorder Recommendations Tab

ID Section Action Expected Outcome Controls Affected
UC-LSA-025 Reorder Summary card Shows: Total Items count, Urgent Orders count, Estimated Cost sum Summary card
UC-LSA-026 Reorder Table headers 8 columns: Priority, Product, Current Stock, Recommended Qty, Days Until Stockout, Preferred Vendor, Est. Cost, Actions thead th × 8
UC-LSA-027 Reorder Priority Urgent Red "Urgent" badge badge bg-danger
UC-LSA-028 Reorder Priority High Yellow "High" badge badge bg-warning
UC-LSA-029 Reorder Days <= 7 Red bold text for urgency text-danger fw-bold
UC-LSA-030 Reorder Vendor column Shows vendor name, cost, lead time days; or "No vendor assigned" Vendor cell
UC-LSA-031 Reorder Click "Create PO" Confirmation with recommendation details, then navigates to PO-GR page Confirm dialog, navigation
UC-LSA-032 Reorder Click "Details" Alert shows recommendation justification Alert popup
UC-LSA-033 Reorder No recommendations Green success alert "No reorder recommendations at this time..." alert alert-success

Section: Stock Insights Tab

ID Section Action Expected Outcome Controls Affected
UC-LSA-034 Insights Stock Distribution chart Canvas chart showing stock distribution stockDistributionChart canvas
UC-LSA-035 Insights Days Until Stockout Shows counts by risk level: Immediate (≤3), Short-term (4-7), Medium-term (8-14), Longer-term (>14) Risk level badges
UC-LSA-036 Insights Top Products table 5 columns: Product, Daily Sales Rate, Current Stock, Days of Coverage, Seasonal Factor Table with top 10
UC-LSA-037 Insights Seasonal Factor badge Warning badge if > 1.0, Info badge if < 1.0, "Normal" text if ~1.0 badge or text

Section: Product Insight Modal

ID Section Action Expected Outcome Controls Affected
UC-LSA-038 Modal View modal Shows: Current Analysis (stock, sales rate, lead time, reorder point, optimal qty), Seasonal Pattern, Preferred Vendors table, 12-Month Demand Forecast Modal sections

Section: Data Validation Requirements

ID Validation Requirement
UC-LSA-039 Page Load Must load successfully without errors
UC-LSA-040 Summary Counts Card counts must match tab item counts
UC-LSA-041 Calculations Days until stockout = CurrentStock / DailySalesRate
UC-LSA-042 Priority Logic Critical < 3 days, Low Stock 3-14 days, Healthy > 14 days
UC-LSA-043 Currency Format All ₹ amounts use Indian format

Total Use Cases: 43

27a

Inventory Summary

See the detailed use-case matrix below for expected behavior.

Routen/a
Menun/a
Checks45 use cases / 0 sections
Open detailed screen guide

Inventory Summary Report Use Cases (InventorySummaryReport.razor)

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
28

Credit Management

See the detailed use-case matrix below for expected behavior.

Routen/a
Menun/a
Checks65 use cases / 0 sections
Open detailed screen guide

Credit Management Use Cases (CreditManagement.razor)

ID Section Action Expected Outcome Controls
UC-CREDMGMT-001 Page Load Navigate to /credit-management Dashboard cards + tabs load Container
UC-CREDMGMT-002 Dashboard Outstanding Credits card Shows totalOutstandingCredit C format Card primary
UC-CREDMGMT-003 Dashboard Credits Issued Today Shows creditsIssuedToday + count Card success
UC-CREDMGMT-004 Dashboard Credits Used Today Shows creditsUsedToday Card info
UC-CREDMGMT-005 Dashboard Expiring Soon card Shows creditsExpiringSoon (30 days) Card warning
UC-CREDMGMT-006 Tab Customer Credits tab Shows customer credit balances table Tab pane
UC-CREDMGMT-007 Tab Transactions tab Shows credit transaction history Tab pane
UC-CREDMGMT-008 Tab Process Refunds tab Refund form + recent refunds Tab pane
UC-CREDMGMT-009 Tab Batch Allocation tab Multi-row allocation form Tab pane
UC-CREDMGMT-010 Tab Analytics tab Credit overview + trends Tab pane
UC-CREDMGMT-011 Customer Table Row number Sequential with pagination offset th scope row
UC-CREDMGMT-012 Customer Table Customer name/code Stacked display td
UC-CREDMGMT-013 Customer Table Total Issued FormatCurrency Indian format td text-end
UC-CREDMGMT-014 Customer Table Total Used FormatCurrency td text-end
UC-CREDMGMT-015 Customer Table Available Bold FormatCurrency td text-end fw-semibold
UC-CREDMGMT-016 Customer Table Pending Credits FormatCurrency td text-end
UC-CREDMGMT-017 Customer Table Expired Credits FormatCurrency td text-end
UC-CREDMGMT-018 Customer Table Utilization % Progress bar with value td
UC-CREDMGMT-019 Customer Table Last Activity FormatDate MMM dd yyyy td
UC-CREDMGMT-020 Customer Table Status badge GetUtilizationBadgeClass Badge
UC-CREDMGMT-021 Customer Table View History btn ViewCustomerHistory called Button outline-primary
UC-CREDMGMT-022 Customer Table Add Credit btn BeginAdjustmentForCustomer Button outline-success
UC-CREDMGMT-023 Customer Table Allocate btn BeginAllocationForCustomer Button outline-info
UC-CREDMGMT-024 Customer Table Footer totals Sum of issued/used/available tfoot
UC-CREDMGMT-025 Customer Filter Search input customerSearchTerm binding Input text
UC-CREDMGMT-026 Customer Filter Status dropdown active/expired/high-value Select
UC-CREDMGMT-027 Customer Filter Min Credit minAvailableCredit Input number
UC-CREDMGMT-028 Customer Filter Filter button ApplyCustomerFilters Button primary
UC-CREDMGMT-029 Customer Filter Reset button ResetCustomerFilters Button outline-secondary
UC-CREDMGMT-030 Pagination Previous button ChangeCustomerCreditsPage(-1) Page button
UC-CREDMGMT-031 Pagination Page numbers SetCustomerCreditsPage Page buttons
UC-CREDMGMT-032 Pagination Next button ChangeCustomerCreditsPage(1) Page button
UC-CREDMGMT-033 Pagination Page description GetPageDescription Text muted
UC-CREDMGMT-034 Refund Form Order ID input refundOrderIdString binding InputText
UC-CREDMGMT-035 Refund Form Refund Amount refundRequest.RefundAmount InputNumber
UC-CREDMGMT-036 Refund Form Reason textarea refundRequest.Reason InputTextArea
UC-CREDMGMT-037 Refund Form Expiry Date refundRequest.ExpiryDate optional InputDate
UC-CREDMGMT-038 Refund Form Submit ProcessRefund validates + processes Button submit
UC-CREDMGMT-039 Recent Refunds Table Shows last 10 refunds Table sm
UC-CREDMGMT-040 Batch Allocation Add Row AddAllocationRow adds entry Button
UC-CREDMGMT-041 Batch Allocation Remove Row RemoveAllocationRow by index Button danger
UC-CREDMGMT-042 Batch Allocation Process All ProcessBatchAllocations Button success
UC-CREDMGMT-043 Batch Row Customer ID request.CustomerId input Input
UC-CREDMGMT-044 Batch Row Order ID request.OrderId input Input
UC-CREDMGMT-045 Batch Row Amount request.Amount input Input number
UC-CREDMGMT-046 Batch Row Notes request.Notes input Input
UC-CREDMGMT-047 Analytics Credit Overview Total issued/used/expired/outstanding Card
UC-CREDMGMT-048 Analytics Utilization Rate Progress bar with % Progress
UC-CREDMGMT-049 Analytics Top Credit Customers Top 8 by credit Table
UC-CREDMGMT-050 Analytics Credit Trend Monthly issued/used/net/count Table
UC-CREDMGMT-051 Adjustment Modal Show showAdjustmentModal = true Modal
UC-CREDMGMT-052 Adjustment Modal Customer ID adjustmentCustomerIdString InputText
UC-CREDMGMT-053 Adjustment Modal Amount adjustmentRequest.Amount +/- InputNumber
UC-CREDMGMT-054 Adjustment Modal Reason adjustmentRequest.Reason InputTextArea
UC-CREDMGMT-055 Adjustment Modal Expiry adjustmentRequest.ExpiryDate InputDate
UC-CREDMGMT-056 Adjustment Modal Reference adjustmentRequest.ReferenceNumber InputText
UC-CREDMGMT-057 Adjustment Modal Submit ProcessAdjustment Button primary
UC-CREDMGMT-058 Adjustment Modal Close CloseAdjustmentModal Button/X
UC-CREDMGMT-059 Utilization >= 90% bg-danger badge Badge class
UC-CREDMGMT-060 Utilization 70-89% bg-warning badge Badge class
UC-CREDMGMT-061 Utilization 50-69% bg-info badge Badge class
UC-CREDMGMT-062 Utilization < 50% bg-success badge Badge class
UC-CREDMGMT-063 Row Class HasExpiredCredits table-warning tr class
UC-CREDMGMT-064 Row Class Utilization > 90% table-danger tr class
UC-CREDMGMT-065 Row Class IsHighValueCustomer table-success tr class
29

Customer Analysis

See the detailed use-case matrix below for expected behavior.

Routen/a
Menun/a
Checks45 use cases / 0 sections
Open detailed screen guide

Customer Analysis Report Use Cases (CustomerAnalysisReport.razor)

ID Section Action Expected Outcome Controls
UC-CUSTANAL-001 Page Load Navigate to /customer-analysis-report Loads report with charts Container
UC-CUSTANAL-002 Auth CustomerAdmin required Authorized access only Authorize attribute
UC-CUSTANAL-003 Business No business selected Shows info alert Alert info
UC-CUSTANAL-004 Refresh Click Refresh button RefreshData + toast Button
UC-CUSTANAL-005 Export Click Export CSV Downloads CSV file Button primary
UC-CUSTANAL-006 Summary Card Total Customers totalCustomers count Card primary
UC-CUSTANAL-007 Summary Card Active Customers activeCustomers this month Card success
UC-CUSTANAL-008 Summary Card Avg Customer Value ₹N0 lifetime value Card info
UC-CUSTANAL-009 Summary Card Outstanding ₹N0 total due Card warning
UC-CUSTANAL-010 Chart Customer Activity Trend Line + Bar ApexChart ApexChart
UC-CUSTANAL-011 Chart Activity - Active Customers Line series by month ApexPointSeries Line
UC-CUSTANAL-012 Chart Activity - New Customers Bar series by month ApexPointSeries Bar
UC-CUSTANAL-013 Chart Customer Segments Bar chart by segment ApexChart
UC-CUSTANAL-014 Chart Empty No activity data Icon + muted message Div text-center
UC-CUSTANAL-015 Chart Empty No segment data Icon + muted message Div text-center
UC-CUSTANAL-016 Table Customer Name Bold text td strong
UC-CUSTANAL-017 Table Customer Code Code format td code
UC-CUSTANAL-018 Table Total Orders Right-aligned count td text-end
UC-CUSTANAL-019 Table Total Value C2 currency format td text-end
UC-CUSTANAL-020 Table Avg Order Value C2 currency format td text-end
UC-CUSTANAL-021 Table Last Order dd MMM yyyy format td
UC-CUSTANAL-022 Table Days Since Last Order Integer days td text-end
UC-CUSTANAL-023 Table Outstanding C2 currency format td text-end
UC-CUSTANAL-024 Table Segment badge Colored by segment type Badge
UC-CUSTANAL-025 Segment Badge VIP bg-success Badge class
UC-CUSTANAL-026 Segment Badge Regular bg-primary Badge class
UC-CUSTANAL-027 Segment Badge New bg-info Badge class
UC-CUSTANAL-028 Segment Badge Inactive bg-warning Badge class
UC-CUSTANAL-029 Segment Logic >= ₹100,000 value VIP segment Segment calc
UC-CUSTANAL-030 Segment Logic >= ₹25,000 value Regular segment Segment calc
UC-CUSTANAL-031 Segment Logic > 0 value New segment Segment calc
UC-CUSTANAL-032 Segment Logic 0 value Inactive segment Segment calc
UC-CUSTANAL-033 Segment Logic > 90 days since order Override to Inactive Segment calc
UC-CUSTANAL-034 Activity Data Last 6 months Monthly aggregation customerActivityData
UC-CUSTANAL-035 Export CSV Header Report title + timestamp CSV line
UC-CUSTANAL-036 Export CSV Summary Metrics with values CSV section
UC-CUSTANAL-037 Export CSV Details All customer rows CSV rows
UC-CUSTANAL-038 Table Empty No data Icon + muted message Div text-center
UC-CUSTANAL-039 Business Change HandleBusinessChanged Reloads data + StateHasChanged Event handler
UC-CUSTANAL-040 Dispose Component disposed Unsubscribes from OnChanged Dispose method
UC-CUSTANAL-041 Accessibility Grid cleanup initGridAccessibilityCleanup JS call JS interop
UC-CUSTANAL-042 Table Sort Default OrderByDescending TotalValue OrderBy
UC-CUSTANAL-043 Breadcrumb Reports link Navigates to /reports Link
UC-CUSTANAL-044 Page Title Dynamic Business name in title PageTitle
UC-CUSTANAL-045 Data test Table attribute data-test="customer-analysis-table" Attribute
99

Settings

See the detailed use-case matrix below for expected behavior.

Routen/a
Menun/a
Checks40 use cases / 0 sections
Open detailed screen guide

Settings Page Use Cases (Settings.razor)

ID Section Action Expected Outcome Controls
UC-SETTINGS-001 Page Load Navigate to /settings Loads settings page Container
UC-SETTINGS-002 Auth CustomerOperator required Authorized access Authorize
UC-SETTINGS-003 Loading Data loading Shows spinner Spinner
UC-SETTINGS-004 General Default Currency INR/USD/EUR/GBP dropdown Select
UC-SETTINGS-005 General Default Tax Rate % Decimal input step=0.01 Input number
UC-SETTINGS-006 General Date Format dd/MM/yyyy, MM/dd/yyyy, yyyy-MM-dd Select
UC-SETTINGS-007 General Number Format en-IN/en-US/en-GB dropdown Select
UC-SETTINGS-008 Inventory Low Stock Threshold Integer input Input number
UC-SETTINGS-009 Inventory Auto-Generate Product Codes Switch toggle Checkbox switch
UC-SETTINGS-010 Sales Default Payment Terms (Days) Integer input Input number
UC-SETTINGS-011 Sales Auto-Generate Invoice Numbers Switch toggle Checkbox switch
UC-SETTINGS-012 Save Click Save Settings SaveSettings with spinner Button primary
UC-SETTINGS-013 Save No business selected Alert "select a business" Alert
UC-SETTINGS-014 Save Success Alert "saved successfully" + update timestamp Alert
UC-SETTINGS-015 Save Error Alert with error message Alert
UC-SETTINGS-016 Reset Click Reset to Defaults Confirm dialog + reset values Button
UC-SETTINGS-017 Reset Confirmation JS confirm dialog Confirm
UC-SETTINGS-018 Reset Confirmed All fields reset to defaults StateHasChanged
UC-SETTINGS-019 Default Values Currency INR Default
UC-SETTINGS-020 Default Values Tax Rate 18.0 Default
UC-SETTINGS-021 Default Values Date Format dd/MM/yyyy Default
UC-SETTINGS-022 Default Values Number Format en-IN Default
UC-SETTINGS-023 Default Values Low Stock Threshold 10 Default
UC-SETTINGS-024 Default Values Auto Product Codes true Default
UC-SETTINGS-025 Default Values Payment Terms 30 Default
UC-SETTINGS-026 Default Values Auto Invoice Numbers true Default
UC-SETTINGS-027 Quick Info Business name SelectedBusinessName or "Not Selected" Text
UC-SETTINGS-028 Quick Info Last Updated DateTime or "Never" Text
UC-SETTINGS-029 Quick Info Note Settings per-business info alert Alert info
UC-SETTINGS-030 Page Title Dynamic Business name in title PageTitle
UC-SETTINGS-031 Save Indicator isSaving=true Spinner shows in button Spinner
UC-SETTINGS-032 Save Indicator isSaving=false Button enabled Button
UC-SETTINGS-033 Card Header General Settings Card header text Card header
UC-SETTINGS-034 Card Header Inventory Settings Card header text Card header
UC-SETTINGS-035 Card Header Sales Settings Card header text Card header
UC-SETTINGS-036 Render Guard hasRendered check JS only after first render Boolean
UC-SETTINGS-037 Init OnAfterRenderAsync LoadSettings called once Lifecycle
UC-SETTINGS-038 Layout Main content col-lg-8 Column
UC-SETTINGS-039 Layout Sidebar col-lg-4 Column
UC-SETTINGS-040 Dispose Component disposed Cleanup if needed Dispose