From e313149f087ec43a6cf703c309c6d55f1d199adb Mon Sep 17 00:00:00 2001 From: Scott Pouliot Date: Wed, 10 Jun 2026 16:07:43 -0400 Subject: [PATCH] Fix inventory label duplicate color/finish display - Suppress ColorName line if it matches the item Name (powders use color name as their item name, causing it to show twice) - Suppress Finish if already contained in the item Name - Always show Manufacturer regardless of whether it is populated Co-Authored-By: Claude Sonnet 4.6 --- src/PowderCoating.Web/Views/Inventory/Label.cshtml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/PowderCoating.Web/Views/Inventory/Label.cshtml b/src/PowderCoating.Web/Views/Inventory/Label.cshtml index ea8b020..2e8d580 100644 --- a/src/PowderCoating.Web/Views/Inventory/Label.cshtml +++ b/src/PowderCoating.Web/Views/Inventory/Label.cshtml @@ -148,21 +148,18 @@
SKU: @Model.SKU
- @if (!string.IsNullOrEmpty(Model.ColorName)) + @if (!string.IsNullOrEmpty(Model.ColorName) && !string.Equals(Model.ColorName, Model.Name, StringComparison.OrdinalIgnoreCase)) {
@Model.ColorName - @if (!string.IsNullOrEmpty(Model.Finish)) + @if (!string.IsNullOrEmpty(Model.Finish) && Model.Name.IndexOf(Model.Finish, StringComparison.OrdinalIgnoreCase) < 0) { — @Model.Finish }
} - @if (!string.IsNullOrEmpty(Model.Manufacturer)) - { -
@Model.Manufacturer
- } +
@Model.Manufacturer
@if (!string.IsNullOrEmpty(Model.Location)) {