From e64904a6752e7ba48b83529591cbfec44d0bd77a Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sat, 14 Aug 2021 00:56:03 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index e34146a..802adb7 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -1830,7 +1830,7 @@ namespace AyaNova.PlugIn.V8 dItem.partId = Getv7v8IdMap(pi.PartID, "part for poitem"); dItem.partWarehouseId = Getv7v8IdMap(pi.PartWarehouseID, "warehouse for poitem"); dItem.quantityOrdered = pi.QuantityOrdered; - dItem.quantityReceived = 0; + dItem.quantityReceived = pi.QuantityReceived; //dItem.serials = string.Empty; StringBuilder sbSerials = new StringBuilder(); dItem.purchaseOrderCost = pi.PurchaseOrderCost; @@ -1841,6 +1841,7 @@ namespace AyaNova.PlugIn.V8 dItem.vendorPartNumber = pi.WorkorderItemPartRequestID.ToString();//temp holder for guid, not used in v7 so available PoItemPartRequestMap.Add(new poitemtowoitempartrequest() { v7woitempartrequestid = pi.WorkorderItemPartRequestID, v7poid = c.ID }); } + foreach (PurchaseOrderReceipt r in receipts) { @@ -1855,7 +1856,7 @@ namespace AyaNova.PlugIn.V8 { //Note: in v7 must receive to same warehouse as ordered, no option otherwise so no need //to worry about that here - dItem.quantityReceived += ri.QuantityReceived; + //No, use the poitem value above, this one can be wonky dItem.quantityReceived += ri.QuantityReceived; dItem.receivedCost = ri.ReceiptCost;//yes, last receipt wins for cost foreach (PartSerial sn in ri.SerialNumbers) sbSerials.Append(sn.SerialNumber + ", ");