This commit is contained in:
@@ -1404,6 +1404,9 @@ namespace AyaNova.PlugIn.V8
|
||||
// PickListAutoComplete pl = PickListAutoComplete.GetList("**", "loanitem");
|
||||
progress.Append("Exporting " + pl.Count.ToString() + " " + ObjectTypeName + "s");
|
||||
|
||||
//cache unit of measures
|
||||
UnitOfMeasurePickList umpl=UnitOfMeasurePickList.GetList(false);
|
||||
|
||||
foreach (PartPickList.PartPickListInfo i in pl)
|
||||
{
|
||||
if (!progress.KeepGoing) return;
|
||||
@@ -1414,15 +1417,27 @@ namespace AyaNova.PlugIn.V8
|
||||
var ObjectTID = new TypeAndID(RootObjectTypes.Part, c.ID);
|
||||
|
||||
dynamic d = new JObject();
|
||||
d.name = GetUniqueName(i.DisplayName(AyaBizUtils.GlobalSettings.DefaultPartDisplayFormat));//todo: temporary for testing
|
||||
if (IsDuplicatev7v8IdMapItem(c.ID, c.Name, progress)) continue;
|
||||
progress.Op(ObjectTypeName + " " + d.name);
|
||||
if (IsDuplicatev7v8IdMapItem(c.ID, c.PartNumber, progress)) continue;
|
||||
progress.Op(ObjectTypeName + " " + d.partNumber + " " + d.name);
|
||||
d.name = c.Name;
|
||||
d.partNumber = c.PartNumber;
|
||||
d.manufacturerId = Getv7v8IdMapNullOk(c.ManufacturerID);
|
||||
d.manufacturerNumber = c.ManufacturerNumber;
|
||||
d.wholeSalerId = Getv7v8IdMapNullOk(c.WholesalerID);
|
||||
d.wholeSalerNumber = c.WholesalerNumber;
|
||||
d.alternativeWholeSalerId = Getv7v8IdMapNullOk(c.AlternativeWholesalerID);
|
||||
d.alternativeWholeSalerNumber = c.AlternativeWholesalerNumber;
|
||||
d.cost = c.Cost;
|
||||
d.retail = c.Retail;
|
||||
d.uPC = c.UPC;
|
||||
if (c.UnitOfMeasureID != Guid.Empty && umpl.Contains(c.UnitOfMeasureID))
|
||||
{
|
||||
d.unitOfMeasure = umpl[c.UnitOfMeasureID].Name;
|
||||
}
|
||||
d.active = c.Active;
|
||||
d.notes = c.Notes;
|
||||
|
||||
SetTags(d, tags);
|
||||
|
||||
|
||||
//Custom fields?
|
||||
if (ShouldExportCustom)
|
||||
d.customFields = CustomFieldData(c, DateCustomFields);
|
||||
|
||||
Reference in New Issue
Block a user