S32
Batch Reconciliation
FIFO batch reconciliation with status tracking, FIFO queue visualization, and consumption history.
Route/batch-reconciliation
Entry pathAnalytics nav > Batch Reconciliation
Detailed source
19-UC-BatchReconciliation.md
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