From 0b5df2afd26ce2a2e519eb167a4d9c056c358379 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 16 Aug 2021 18:48:11 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 3dd1483..31b9a0f 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -1757,7 +1757,7 @@ namespace AyaNova.PlugIn.V8 //check list of this item on woitempartrequest creation, if it matches then need to fixup that po during wo export } List PoItemPartRequestMap = new List(); - + int _highestPurchaseOrderNumberExported = 0; private async System.Threading.Tasks.Task ExportPurchaseOrders(ProgressForm progress) { if (!progress.KeepGoing) return; @@ -1785,8 +1785,10 @@ namespace AyaNova.PlugIn.V8 dynamic d = new JObject(); d.serial = c.PONumber; if (IsDuplicatev7v8IdMapItem(c.ID, i.LT_PurchaseOrder_Label_PONumber.Display, progress)) continue; - progress.Op(ObjectTypeName + " " + d.name); + progress.Op(ObjectTypeName + " " + d.serial); + if (c.PONumber > _highestPurchaseOrderNumberExported) + _highestPurchaseOrderNumberExported = c.PONumber; d.notes = c.Notes; d.vendorMemo = c.VendorMemo; d.dropShipToCustomerId = Getv7v8IdMapNullOk(c.DropShipToClientID); @@ -1912,6 +1914,12 @@ namespace AyaNova.PlugIn.V8 await util.EventLog(util.AyaType.PurchaseOrder, RavenId, SafeGetUserMap(c.Creator), SafeGetUserMap(c.Modifier), c.Created, c.Modified); }//end of PO loop + + //set new seed number for work orders + _highestPurchaseOrderNumberExported += 1; + { + await util.PutAsync("global-biz-setting/seeds/26/" + _highestPurchaseOrderNumberExported.ToString()); + } } #endregion PurchaseOrders