瀏覽代碼

Stopped showing negative/zero JRIs for stock holding

Kenric Nugteren 1 年之前
父節點
當前提交
a0b3716807
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      prs.desktop/Panels/Products/Locations/StockHoldingRelocationWindow.xaml.cs

+ 6 - 0
prs.desktop/Panels/Products/Locations/StockHoldingRelocationWindow.xaml.cs

@@ -155,6 +155,12 @@ public partial class StockHoldingRelocationWindow : Window, INotifyPropertyChang
         foreach(var item in rItems)
         {
             var qty = item.ID != Guid.Empty ? quantities.GetValueOrDefault(item.ID) : item.Qty;
+            if(item.ID != Guid.Empty && qty <= 0)
+            {
+                // We can't do anything with this; it shouldn't be shown.
+                continue;
+            }
+
             var newItem = new StockHoldingRelocationItem
             {
                 Issued = 0,