Jelajahi Sumber

Removed the old odering validation, which I don't think is necessary anymore.

Kenric Nugteren 10 bulan lalu
induk
melakukan
9309e9c00a

+ 0 - 1
prs.desktop/Panels/Stock Forecast/OrderScreen/StockForecastOrderScreen.xaml.cs

@@ -108,7 +108,6 @@ public partial class StockForecastOrderScreen : Window, INotifyPropertyChanged
 
     private void OKButton_Click(object sender, RoutedEventArgs e)
     {
-        if (!Grid.Validate()) return;
         DialogResult = true;
         Close();
     }

+ 0 - 17
prs.desktop/Panels/Stock Forecast/OrderScreen/StockForecastOrderingGrid.cs

@@ -316,23 +316,6 @@ public class StockForecastOrderingGrid : DynamicItemsListGrid<StockForecastOrder
         HiddenColumns.Add(x => x.Product.Image.ID);
     }
 
-    public bool Validate()
-    {
-        if(OrderType == StockForecastOrderingType.Breakup)
-        {
-            foreach(var item in Items)
-            {
-                var sum = item.Breakups.Sum(x => x.Quantity);
-                if(sum > item.GetTotalQuantity(OrderType))
-                {
-                    MessageWindow.ShowMessage($"Not enough being ordered for {item.Product.Code}/{item.Style.Code}: requires at least {sum}", "Not enough");
-                    return false;
-                }
-            }
-        }
-        return true;
-    }
-
     #region UI Component
 
     private Component? _uiComponent;