From 30f5ddbc1bc7f5dc8a66b7c9913dd8779d99dba4 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 16 Aug 2021 20:42:10 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 85289f0..a9be65a 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -146,7 +146,7 @@ namespace AyaNova.PlugIn.V8 { return; } - +#if(!DEBUG) //check if in migrate mode if (util.ServerState != "MigrateMode") { @@ -154,6 +154,7 @@ namespace AyaNova.PlugIn.V8 "Target server is in \"Migrate mode\""); return; } +#endif Opt dOpt = new Opt(); @@ -3636,11 +3637,19 @@ namespace AyaNova.PlugIn.V8 //get all parts in list PartPickList pl = PartPickList.GetAllParts(); + //iterate all parts foreach (PartPickList.PartPickListInfo i in pl) { progress.SubOp("sync part " + i.Name); - PartInventoryValuesFetcher v7inv = PartInventoryValuesFetcher.GetItem(i.ID); - var v8inv = (await util.GetAsync("part/latest-inventory/" + Getv7v8IdMap(i.ID, "part id for synchronize inventory"))).ObjectResponse; + PartInventoryList v7inv = PartInventoryList.GetListForSingleItem(i.ID); + JObject v8inv = (await util.GetAsync("part/latest-inventory/" + Getv7v8IdMap(i.ID, "part id for synchronize inventory"))).ObjectResponse; + //iterate v8 inventory + foreach (JObject v8o in v8inv["data"]) + { + + } + //find matching v7 item and adjust + //no v7 item then set to zeros } //iterate the parts