@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 : "https://" + 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 (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
}
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) {

@(Model.InventoryAccountName ?? "—")

} @if (Model.CogsAccountId.HasValue) {

@(Model.CogsAccountName ?? "—")

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

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

@(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.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
@section Scripts { }