@model PowderCoating.Application.DTOs.Inventory.InventoryItemDto @{ ViewData["Title"] = $"{Model.Name}"; ViewData["PageIcon"] = "bi-box-seam"; ViewData["PageHelpTitle"] = "Inventory Item"; ViewData["PageHelpContent"] = "Full detail for this inventory item. Stock Information shows current quantity and reorder thresholds — a Low Stock banner appears when quantity is at or below the Reorder Point. Pricing shows Unit Cost (what you paid), Average Cost (weighted average across purchases), and Total Stock Value. Use the Actions panel to edit, view jobs using this powder, or delete the item."; string SafeUrl(string? url) => string.IsNullOrEmpty(url) ? "#" : (url.StartsWith("http://", StringComparison.OrdinalIgnoreCase) || url.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) ? url : "http://" + url; } @section Styles { }
@if (Model.IsOutOfStock) { Out of Stock } else if (Model.IsLowStock) { Low Stock } else { In Stock }

SKU: @Model.SKU

@Model.Category @if (Model.IsActive) { Active } else { Inactive } @if ((bool?)ViewBag.CatalogDiscontinued == true) { Discontinued by manufacturer }
@if (Model.IsOutOfStock) {
Out of Stock: No quantity on hand. Use Stock Adjustment to add inventory.
} else if (Model.IsLowStock) {
Low Stock: Current quantity (@Model.QuantityOnHand @Model.UnitOfMeasure) is at or below the reorder point (@Model.ReorderPoint @Model.UnitOfMeasure)
} @if (!Model.IsActive) {
Status: This item is inactive
} @if ((bool?)ViewBag.CatalogDiscontinued == true) {
Discontinued by @(ViewBag.CatalogVendorName ?? "manufacturer"): this powder has been discontinued and cannot be reordered. Existing stock can still be used and quoted. @if (!string.IsNullOrEmpty(ViewBag.CatalogProductUrl as string)) { View product page }
}
Item Details
@if ((bool)(ViewBag.IsCoating ?? false)) {
}
@if (!string.IsNullOrEmpty(Model.Description)) {

@Model.Description

} @if (!string.IsNullOrEmpty(Model.ColorName) || !string.IsNullOrEmpty(Model.Manufacturer)) {

@if (!string.IsNullOrEmpty(Model.Manufacturer)) {

@Model.Manufacturer

} @if (!string.IsNullOrEmpty(Model.ColorName)) {

@Model.ColorName

} @if (!string.IsNullOrEmpty(Model.Finish)) {

@Model.Finish

} @if (!string.IsNullOrEmpty(Model.ColorCode)) {

@Model.ColorCode

} @if (!string.IsNullOrEmpty(Model.ManufacturerPartNumber)) {

@Model.ManufacturerPartNumber

} @if (Model.CoverageSqFtPerLb.HasValue) {

@Model.CoverageSqFtPerLb.Value @ViewBag.CoverageUnit

} @if (Model.TransferEfficiency.HasValue) {

@Model.TransferEfficiency.Value%

} @if (!string.IsNullOrEmpty(Model.SpecPageUrl)) { } @if (!string.IsNullOrEmpty(Model.SdsUrl) || !string.IsNullOrEmpty(Model.TdsUrl)) {
@if (!string.IsNullOrEmpty(Model.SdsUrl)) { Safety Data Sheet } @if (!string.IsNullOrEmpty(Model.TdsUrl)) { Technical Data Sheet }
} } @if (!string.IsNullOrEmpty(Model.Notes)) {

@Model.Notes

}
@{ var hasCoatingSpecs = Model.CureTemperatureF.HasValue || Model.CureTimeMinutes.HasValue || Model.RequiresClearCoat || !string.IsNullOrEmpty(Model.ColorFamilies); } @if (hasCoatingSpecs) {
Coating Specifications
@if (Model.CureTemperatureF.HasValue) {

@((int)Model.CureTemperatureF.Value)°F

} @if (Model.CureTimeMinutes.HasValue) {

@Model.CureTimeMinutes.Value min

}

@if (Model.RequiresClearCoat) { Yes } else { No }

@if (!string.IsNullOrEmpty(Model.ColorFamilies)) {
@foreach (var fam in Model.ColorFamilies.Split(',', StringSplitOptions.RemoveEmptyEntries).Select(f => f.Trim()).Where(f => !string.IsNullOrWhiteSpace(f))) { @fam }
}
} @if (Model.InventoryAccountId.HasValue || Model.CogsAccountId.HasValue) {
Financial Accounts
@if (Model.InventoryAccountId.HasValue) {

@Html.Raw(Model.InventoryAccountName ?? "—")

} @if (Model.CogsAccountId.HasValue) {

@Html.Raw(Model.CogsAccountName ?? "—")

}
}
@if (!string.IsNullOrWhiteSpace(Model.ImageUrl)) {
@Model.Name
Click to enlarge
}
Stock & Pricing

@Model.QuantityOnHand.ToString("N2") @Model.UnitOfMeasure

@Html.Raw(Model.Location ?? "—")

@Model.ReorderPoint.ToString("N2") @Model.UnitOfMeasure

@Model.ReorderQuantity.ToString("N2") @Model.UnitOfMeasure

@Model.MinimumStock.ToString("N2") @Model.UnitOfMeasure

@Model.MaximumStock.ToString("N2") @Model.UnitOfMeasure


@Model.UnitCost.ToString("C")

@Model.AverageCost.ToString("C")

@((Model.QuantityOnHand * Model.UnitCost).ToString("C"))

@if (Model.CatalogReferencePrice.HasValue && Model.CatalogReferencePrice.Value > 0) {

@Model.CatalogReferencePrice.Value.ToString("C") / @Model.UnitOfMeasure

@{ var catRef = Model.CatalogReferencePrice.Value; var paidPrice = (Model.LastPurchaseDate.HasValue && Model.LastPurchasePrice > 0) ? Model.LastPurchasePrice : Model.UnitCost; } @if (paidPrice > 0 && Math.Abs(catRef - paidPrice) >= 0.01m) { var priceUp = catRef > paidPrice;
Price @(priceUp ? "up" : "down") from @paidPrice.ToString("C") last paid
} @if (Model.CatalogPriceUpdatedAt.HasValue) {
Updated @Model.CatalogPriceUpdatedAt.Value.ToLocalTime().ToString("MMM d, yyyy")
}
} @if (Model.LastPurchaseDate.HasValue) {

@Model.LastPurchasePrice.ToString("C")

@Model.LastPurchaseDate.Value.ToString("MMM dd, yyyy")

} @if (Model.PrimaryVendorId.HasValue || !string.IsNullOrEmpty(Model.VendorPartNumber)) {

@if (Model.PrimaryVendorId.HasValue) {

@Model.PrimaryVendorName

} @if (!string.IsNullOrEmpty(Model.VendorPartNumber)) {

@Model.VendorPartNumber

} }
Actions
Edit Item View Activity History Delete Item
@* QR Label Modal *@ @section Scripts { }