diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 241e85f..3b1f5a1 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -333,7 +333,8 @@ namespace AyaNova.PlugIn.V8 await ExportLoanItems(progress); await ExportParts(progress); await ExportProjects(progress); - await ExportPurchaseOrders(progress); + //deferred to possibly never if people can live without it + // await ExportPurchaseOrders(progress); @@ -1443,7 +1444,7 @@ namespace AyaNova.PlugIn.V8 var ObjectTID = new TypeAndID(RootObjectTypes.Part, c.ID); dynamic d = new JObject(); - if (IsDuplicatev7v8IdMapItem(c.ID, c.PartNumber, progress)) continue; + if (IsDuplicatev7v8IdMapItem(c.ID, c.PartNumber, progress)) continue; d.name = c.Name; d.partNumber = GetUniqueName(c.PartNumber); progress.Op(ObjectTypeName + " " + d.partNumber + " " + d.name); @@ -1598,7 +1599,8 @@ namespace AyaNova.PlugIn.V8 //Step 2: export the objects //get pos in order by created date oldest to newest to preserve order - PurchaseOrderList pl = PurchaseOrderList.GetListByCriteria(" "); + //PurchaseOrderList pl = PurchaseOrderList.GetListByCriteria(" "); + PurchaseOrderList pl = PurchaseOrderList.GetListByCriteria(" "); progress.Append("Exporting " + pl.Count.ToString() + " " + ObjectTypeName + "s"); foreach (PurchaseOrderList.PurchaseOrderListInfo i in pl) @@ -1608,7 +1610,12 @@ namespace AyaNova.PlugIn.V8 tags.Add(ImportTag); PurchaseOrder c = PurchaseOrder.GetItem(i.LT_PurchaseOrder_Label_PONumber.Value); - PurchaseOrderReceiptList prl = PurchaseOrderReceiptList.GetList(""); + //get receipts for this PO + PurchaseOrderReceiptListDetailed prl = PurchaseOrderReceiptListDetailed.GetList( + ""); + var ObjectTID = new TypeAndID(RootObjectTypes.PurchaseOrder, c.ID); @@ -1692,7 +1699,7 @@ namespace AyaNova.PlugIn.V8 //this ensures that by appending a extra number character that is unique then removing the vendorid from the start //resulting in a unique name/vendorid combo d.serial = GetUniqueName(c.UnitModelID.ToString() + tempNumber).Replace(c.UnitModelID.ToString(), ""); - + if (IsDuplicatev7v8IdMapItem(c.ID, c.Serial, progress)) continue; progress.Op(ObjectTypeName + " " + d.serial); d.active = c.Active; @@ -2806,9 +2813,9 @@ namespace AyaNova.PlugIn.V8 LocalizedTextTable lt = LocalizedTextTable.Load(i.Locale); progress.Op("Checking if locale " + i.Locale + " is customized"); - //#if(DEBUG) - // continue; - //#endif +#if(DEBUG) + continue; +#endif if (!util.LocaleIsCustomized(i.Locale, lt, progress)) continue; ////calculate hash //List allStrings = new List();