فهرست منبع

DESKTOP - requisitionitemgrid additional information choosing stockholdings for site requis

Nick-PRSDigital@bitbucket.org 2 سال پیش
والد
کامیت
abef73c124
1فایلهای تغییر یافته به همراه10 افزوده شده و 6 حذف شده
  1. 10 6
      prs.desktop/Panels/Requisitions/RequisitionItemGrid.cs

+ 10 - 6
prs.desktop/Panels/Requisitions/RequisitionItemGrid.cs

@@ -100,12 +100,16 @@ namespace PRSDesktop
 
                 foreach (var holding in holdings.Rows)
                 {
-                    String text =
-                        $"{holding.Get<StockHolding, String>(c => c.Location.Code)}: {holding.Get<StockHolding, double>(c => c.Units)} @ {holding.Get<StockHolding, String>(c => c.Dimensions.UnitSize)}";
-                    String style = holding.Get<StockHolding, String>(c => c.Style.Code);
-                    if (!String.IsNullOrWhiteSpace(style))
-                        text = $"{text} ({style})";
-                    column.AddItem(text, null, (sel) => SelectLocation(holding,sel));
+                    var qty = holding.Get<StockHolding, double>(c => c.Units);
+                    if (!CoreUtils.IsEffectivelyEqual(qty, 0.0F))
+                    {
+                        String text =
+                            $"Location: {holding.Get<StockHolding, String>(c => c.Location.Code)}, Qty: {holding.Get<StockHolding, double>(c => c.Units)} @ {holding.Get<StockHolding, String>(c => c.Dimensions.UnitSize)}";
+                        String style = holding.Get<StockHolding, String>(c => c.Style.Code);
+                        if (!String.IsNullOrWhiteSpace(style))
+                            text = $"{text} (Style code: {style})";
+                        column.AddItem(text, null, (sel) => SelectLocation(holding, sel));
+                    }
                 }
             }