@model PagedResult @{ ViewData["Title"] = "Inventory"; ViewData["PageIcon"] = "bi-box-seam"; ViewData["PageHelpTitle"] = "Inventory"; ViewData["PageHelpContent"] = "Track powder coatings, consumables, and other shop materials. Items show as Low Stock when quantity falls at or below the Reorder Point — the Low Stock count at the top is your reorder alert. Click any row to view full details or edit. Use the search box and category filter to narrow the list. Low Stock filter shows only items needing attention."; var lowStockCount = (int)(ViewBag.StatsLowStockCount ?? 0); var activeCount = (int)(ViewBag.StatsActiveCount ?? 0); var totalValue = (decimal)(ViewBag.StatsTotalValue ?? 0m); }

Total Items

@Model.TotalCount

Low Stock Items

@lowStockCount

Active Items

@activeCount

Total Value

@totalValue.ToString("C")

@Model.TotalCount
Total
@lowStockCount
Low Stock
@activeCount
Active
@totalValue.ToString("C0")
Value
@{ var lowStockOnly = (bool)(ViewBag.LowStockOnly ?? false); var activeLocation = ViewBag.Location as string; var activeColorFamily = ViewBag.ColorFamily as string; } @if (!string.IsNullOrEmpty(ViewBag.SearchTerm) || !string.IsNullOrEmpty(ViewBag.Category) || !string.IsNullOrEmpty(activeLocation) || !string.IsNullOrEmpty(activeColorFamily) || lowStockOnly) {
@if (lowStockOnly) { Showing @Model.TotalCount low stock item@(Model.TotalCount == 1 ? "" : "s") — at or below reorder point } else { Showing @Model.TotalCount item(s) @if (!string.IsNullOrEmpty(ViewBag.SearchTerm)) { matching "@ViewBag.SearchTerm" } @if (!string.IsNullOrEmpty(ViewBag.Category)) { in category "@ViewBag.Category" } @if (!string.IsNullOrEmpty(activeLocation)) { in bin "@activeLocation" } @if (!string.IsNullOrEmpty(activeColorFamily)) { in color family "@activeColorFamily" } }
@if (!string.IsNullOrEmpty(activeLocation)) { Print Bin } Clear Filters
}
@if (((IEnumerable)ViewBag.ColorFamilies).Any()) { } @if (((IEnumerable)ViewBag.Locations).Any()) { }
Add Item Add
@if (!Model.Items.Any()) { var isInventoryFiltered = !string.IsNullOrEmpty(ViewBag.SearchTerm as string) || !string.IsNullOrEmpty(ViewBag.Category as string) || !string.IsNullOrEmpty(activeColorFamily) || lowStockOnly;
No inventory items found

@(isInventoryFiltered ? "No items match your current filters." : "Get started by adding your first inventory item.")

@(isInventoryFiltered ? "Add Item" : "Add Your First Item")
} else {
@foreach (var item in Model.Items) { }
Item Name Category Color Location Vendor Quantity Reorder Point Unit Cost Stock Value Status Actions
@item.Name
@item.SKU
@item.Category @if (!string.IsNullOrEmpty(item.ColorName)) { @item.ColorName } else { } @if (!string.IsNullOrEmpty(item.Location)) { @item.Location } else { } @if (!string.IsNullOrEmpty(item.PrimaryVendorName)) { @item.PrimaryVendorName } else { } @item.QuantityOnHand.ToString("N2") @item.UnitOfMeasure @if (item.IsOutOfStock) { } else if (item.IsLowStock) { } @item.ReorderPoint.ToString("N2") @item.UnitOfMeasure @item.UnitCost.ToString("C") @((item.QuantityOnHand * item.UnitCost).ToString("C")) @if (item.IsIncoming) { Incoming } else if (item.IsActive) { Active } else { Inactive }
@foreach (var item in Model.Items) {
@item.Name
@item.SKU
Category @item.Category
@if (!string.IsNullOrEmpty(item.ColorName)) {
Color @item.ColorName
} @if (!string.IsNullOrEmpty(item.Location)) {
Location @item.Location
} @if (!string.IsNullOrEmpty(item.PrimaryVendorName)) {
Vendor @item.PrimaryVendorName
}
Quantity @item.QuantityOnHand.ToString("N2") @item.UnitOfMeasure @if (item.IsOutOfStock) { } else if (item.IsLowStock) { }
Reorder Point @item.ReorderPoint.ToString("N2") @item.UnitOfMeasure
Unit Cost @item.UnitCost.ToString("C")
Stock Value @((item.QuantityOnHand * item.UnitCost).ToString("C"))
Status @if (item.IsActive) { Active } else { Inactive }
}
}
@if (Model.TotalCount > 0) { @await Html.PartialAsync("_Pagination", Model) }
@* QR Label Modal (shared across all items — src set dynamically by JS) *@ @section Scripts { }