diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 079d63a..5504504 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -2292,7 +2292,7 @@ namespace AyaNova.PlugIn.V8 } } #endregion PurchaseOrders - + #region Synchronize serials private async System.Threading.Tasks.Task SynchronizeSerials(ProgressForm progress) { @@ -2322,10 +2322,10 @@ namespace AyaNova.PlugIn.V8 dynamic d = a.ObjectResponse["data"]; var v = (JArray)d; bool hasUpdate = false; - + foreach (PartSerialPickList.PartSerialPickListInfo si in i.LT_PartSerial_Label_List) { - bool notFound=true; + bool notFound = true; foreach (JValue j in v) { if (j.Value() == si.SerialNumber) @@ -2340,14 +2340,14 @@ namespace AyaNova.PlugIn.V8 dynamic dItem = new JObject(); dItem = si.SerialNumber; d.Add(dItem); - } + } } if (hasUpdate) - await util.PutAsync("part/serials/" + partNumber, d); + await util.PutAsync("part/serials/" + partNumber, d); }//end of inventory item loop } #endregion Synchronize serials - + #region Task groups private async System.Threading.Tasks.Task ExportTaskGroups(ProgressForm progress) { @@ -2619,14 +2619,14 @@ namespace AyaNova.PlugIn.V8 dynamic d = new JObject(); - + string tempModelNumber = c.ModelNumber + " " + c.Name; tempModelNumber = tempModelNumber.Trim(); - progress.Op(ObjectTypeName + " " + tempModelNumber); + progress.Op(ObjectTypeName + " " + tempModelNumber); if (string.IsNullOrWhiteSpace(tempModelNumber)) tempModelNumber = "0";//was not required in v7, is required in v8 - + d.name = GetUniqueName(tempModelNumber); d.active = c.Active; @@ -5792,7 +5792,8 @@ namespace AyaNova.PlugIn.V8 } formDataContent.Add(new StringContent(RavenTypeAsString), name: "AttachToAType"); formDataContent.Add(new StringContent(v8Id.ToString()), name: "AttachToObjectId"); - formDataContent.Add(new StringContent(ImportTag), name: "Notes"); + if (!string.IsNullOrWhiteSpace(ImportTag)) + formDataContent.Add(new StringContent(ImportTag), name: "Notes"); formDataContent.Add(new StringContent(dFileData.ToString()), name: "FileData"); StreamContent AttachmentFile = new StreamContent(af.GetContent()); @@ -5877,13 +5878,13 @@ namespace AyaNova.PlugIn.V8 //is it a local file? if (!new Uri(doc.URL).IsFile) { - NonFileUrls += (doc.Description + "(" + ImportTag + ") " + doc.URL + "\n"); + NonFileUrls += (doc.Description + "(v8Migrate) " + doc.URL + "\n"); continue; } //can we see it? if (!File.Exists(doc.URL)) { - NonFileUrls += (ImportTag + " - Assigned doc. file not found: " + doc.Description + " " + doc.URL + "\n"); + NonFileUrls += ( "v8Migrate - Assigned doc. file not found: " + doc.Description + " " + doc.URL + "\n"); continue; } @@ -5896,7 +5897,7 @@ namespace AyaNova.PlugIn.V8 if (fi.Length > SmallestFileUploadRejectedAsTooBig) { progress.Append("Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + AyaBizUtils.FileSizeDisplay(fi.Length) + "). " + MaxFileSizeInfo(fi.Length)); - NonFileUrls += (ImportTag + " - Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + AyaBizUtils.FileSizeDisplay(fi.Length) + ")." + MaxFileSizeInfo(fi.Length) + "\n"); + NonFileUrls += ("v8Migrate - Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + AyaBizUtils.FileSizeDisplay(fi.Length) + ")." + MaxFileSizeInfo(fi.Length) + "\n"); continue; } //Compile the FileData property @@ -5939,7 +5940,7 @@ namespace AyaNova.PlugIn.V8 - formDataContent.Add(new StringContent(doc.Description + " (" + ImportTag + ")"), name: "Notes"); + formDataContent.Add(new StringContent(doc.Description + " (v8Migrate)"), name: "Notes"); formDataContent.Add(new StringContent(dFileData.ToString()), name: "FileData"); StreamContent AttachmentFile = new StreamContent(fi.OpenRead()); @@ -5969,7 +5970,7 @@ namespace AyaNova.PlugIn.V8 if (SmallestFileUploadRejectedAsTooBig > fi.Length) SmallestFileUploadRejectedAsTooBig = fi.Length; progress.Append("Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + AyaBizUtils.FileSizeDisplay(fi.Length) + "). " + MaxFileSizeInfo(fi.Length)); - NonFileUrls += (ImportTag + " - Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + AyaBizUtils.FileSizeDisplay(fi.Length) + ")." + MaxFileSizeInfo(fi.Length) + "\n"); + NonFileUrls += ("v8Migrate - Assigned doc. file " + doc.Description + " " + doc.URL + " too large (" + AyaBizUtils.FileSizeDisplay(fi.Length) + ")." + MaxFileSizeInfo(fi.Length) + "\n"); continue; }