Use this page for technical screen behavior, source references, and active Playwright coverage.
Sales order management with create, edit, view, filter, and payment tracking capabilities.
Page: Sales.razor
Route: /sales
Menu Position: 6 (Sales)
Sales order management with create, edit, view, filter, and payment tracking capabilities.
| 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 |
| ID | Section | Action | Expected Outcome | Controls Affected |
|---|---|---|---|---|
| UC-SALESORD-006 | Loading | During load | Spinner with "Loading sales orders..." text | spinner-border, loading text |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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) |
| 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 |
Location: Rabbit.Accounts.Tests/Sales/SalesOrderCalculationTests.cs
Test Categories:
Payment Status Logic:
Total Use Cases: 60
Open any image for a closer look. The manual keeps screenshots on screen pages so the index stays light.