Jelajahi Sumber

Fix to treatment po button

Kenric Nugteren 8 bulan lalu
induk
melakukan
3af2e15238

+ 8 - 0
prs.desktop/Panels/Factory/FactoryPanel.xaml.cs

@@ -767,6 +767,14 @@ namespace PRSDesktop
             new Client<PurchaseOrderItem>().Save(orderitems, "Created by Factory Floor Purchase");
 
             Progress.SetMessage("Updating Packets");
+            foreach(var orderItem in orderitems)
+            {
+                var packet = packetupdates.FirstOrDefault(x => x.ID.Equals(orderItem.Packet.ID));
+                if(packet is not null)
+                {
+                    packet.OrderItem.ID = orderItem.ID;
+                }
+            }
             new Client<ManufacturingPacket>().Save(packetupdates.Where(x => x.IsChanged()), "");
 
 

+ 1 - 1
prs.desktop/Panels/Products/Master List/ProductsPanel.xaml.cs

@@ -35,7 +35,7 @@ namespace PRSDesktop
     /// </summary>
     public partial class ProductsPanel : UserControl, IPanel<Product>
     {
-        private Product _product;
+        private Product _product = new();
         private ProductsGlobalSettings _globalsettings = new();
         private ProductScreenSettings _settings = new();