This commit is contained in:
@@ -35,7 +35,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
public string PluginVersion
|
public string PluginVersion
|
||||||
{
|
{
|
||||||
get { return "7.6.1-alpha.132"; }
|
get { return "7.6.1-alpha.133"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string About
|
public string About
|
||||||
@@ -814,13 +814,13 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
var rOptions = await util.GetAsync("user-option/" + RavenId.ToString());
|
var rOptions = await util.GetAsync("user-option/" + RavenId.ToString());
|
||||||
d = rOptions.ObjectResponse["data"];
|
d = rOptions.ObjectResponse["data"];
|
||||||
// d.uiColor = System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color.FromArgb(c.ScheduleBackColor));
|
// d.uiColor = System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color.FromArgb(c.ScheduleBackColor));
|
||||||
d.emailAddress = string.IsNullOrWhiteSpace(c.EmailAddress) ? null : c.EmailAddress;
|
d.emailAddress = string.IsNullOrWhiteSpace(c.EmailAddress) ? null : c.EmailAddress;
|
||||||
d.phone1 = c.Phone1;
|
d.phone1 = c.Phone1;
|
||||||
d.phone2 = c.Phone2;
|
d.phone2 = c.Phone2;
|
||||||
d.phone3 = c.PageAddress;
|
d.phone3 = c.PageAddress;
|
||||||
|
|
||||||
|
|
||||||
if (LocaleMap.ContainsKey(c.DefaultLanguage))
|
if (LocaleMap.ContainsKey(c.DefaultLanguage))
|
||||||
d.translationId = LocaleMap[c.DefaultLanguage];
|
d.translationId = LocaleMap[c.DefaultLanguage];
|
||||||
else
|
else
|
||||||
@@ -1945,7 +1945,6 @@ namespace AyaNova.PlugIn.V8
|
|||||||
#endregion Parts
|
#endregion Parts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region Part assemblies
|
#region Part assemblies
|
||||||
private async System.Threading.Tasks.Task ExportPartAssemblies(ProgressForm progress)
|
private async System.Threading.Tasks.Task ExportPartAssemblies(ProgressForm progress)
|
||||||
{
|
{
|
||||||
@@ -1995,8 +1994,6 @@ namespace AyaNova.PlugIn.V8
|
|||||||
}
|
}
|
||||||
#endregion part assemblies
|
#endregion part assemblies
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region Warehouses
|
#region Warehouses
|
||||||
private async System.Threading.Tasks.Task ExportWarehouses(ProgressForm progress)
|
private async System.Threading.Tasks.Task ExportWarehouses(ProgressForm progress)
|
||||||
{
|
{
|
||||||
@@ -2043,7 +2040,6 @@ namespace AyaNova.PlugIn.V8
|
|||||||
}
|
}
|
||||||
#endregion warehouses
|
#endregion warehouses
|
||||||
|
|
||||||
|
|
||||||
#region Projects
|
#region Projects
|
||||||
private async System.Threading.Tasks.Task ExportProjects(ProgressForm progress)
|
private async System.Threading.Tasks.Task ExportProjects(ProgressForm progress)
|
||||||
{
|
{
|
||||||
@@ -2296,6 +2292,62 @@ namespace AyaNova.PlugIn.V8
|
|||||||
#endregion PurchaseOrders
|
#endregion PurchaseOrders
|
||||||
|
|
||||||
|
|
||||||
|
#region Inventory adjustment serials
|
||||||
|
|
||||||
|
|
||||||
|
private async System.Threading.Tasks.Task ExportAdjustmentSerials(ProgressForm progress)
|
||||||
|
{
|
||||||
|
if (!progress.KeepGoing) return;
|
||||||
|
|
||||||
|
|
||||||
|
progress.Op("Start part inventory adjustment serial numbers export");
|
||||||
|
progress.SubOp("");
|
||||||
|
|
||||||
|
//Step 2: export the objects
|
||||||
|
PartInventoryAdjustmentListDetailed pl = PartInventoryAdjustmentListDetailed.GetList(
|
||||||
|
"<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?><GRIDCRITERIA> <COLUMNITEM CM=\"aPartInventoryAdjustment.AADJUSTMENTNUMBER\" UI=\"LT_PartInventoryAdjustment_Label_AdjustmentNumber\" PIN=\"0\" WIDTH=\"85\" SORT=\"ASC\" /> <COLUMNITEM CM=\"aPartInventoryAdjustment.aReasonForAdjustment\" UI=\"LT_PartInventoryAdjustment_Label_ReasonForAdjustment\" PIN=\"0\" WIDTH=\"106\" /> <COLUMNITEM CM=\"aPartInventoryAdjustment.aDateAdjusted\" UI=\"LT_PartInventoryAdjustment_Label_DateAdjusted\" PIN=\"0\" WIDTH=\"118\" /> <COLUMNITEM CM=\"aUser.aLastName\" UI=\"LT_Common_Label_Creator\" PIN=\"0\" WIDTH=\"141\" /> <COLUMNITEM CM=\"aPartWarehouse.aName\" UI=\"LT_O_PartWarehouse\" PIN=\"0\" WIDTH=\"127\" /> <COLUMNITEM CM=\"aPart.aName\" UI=\"LT_O_Part\" PIN=\"0\" WIDTH=\"142\" /> <COLUMNITEM CM=\"aPartInventoryAdjustmentItem.aQuantityAdjustment\" UI=\"LT_PartInventoryAdjustmentItem_Label_QuantityAdjustment\" PIN=\"0\" WIDTH=\"154\" /> <COLUMNITEM CM=\"aPartSerial.aSerialNumber\" UI=\"LT_Common_Label_SerialNumber\" PIN=\"0\" WIDTH=\"118\" /></GRIDCRITERIA>");
|
||||||
|
|
||||||
|
foreach (PartInventoryAdjustmentListDetailed.PartInventoryAdjustmentListDetailedInfo i in pl)
|
||||||
|
{
|
||||||
|
if (!progress.KeepGoing) return;
|
||||||
|
|
||||||
|
//if no serial then continue to the next one until there is
|
||||||
|
if (string.IsNullOrWhiteSpace(i.LT_Common_Label_SerialNumber)) continue;
|
||||||
|
|
||||||
|
long partNumber = await Getv7v8IdMap(i.LT_O_Part.Value, RootObjectTypes.Part, false, false);
|
||||||
|
if (partNumber == 0)
|
||||||
|
{
|
||||||
|
//log here or skip it as old adjustments could have invalid parts or not exported
|
||||||
|
//maybe append just to be safe
|
||||||
|
progress.Append("Part inventory adjustment part missing; skipping serial number '" + i.LT_Common_Label_SerialNumber + "' export: PartID " + i.LT_O_Part.Value.ToString());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//get the part serial record
|
||||||
|
|
||||||
|
|
||||||
|
var a = await util.GetAsync("part/serials/" + partNumber.ToString());
|
||||||
|
|
||||||
|
|
||||||
|
dynamic d = a.ObjectResponse["data"];
|
||||||
|
dynamic dItem = new JObject();
|
||||||
|
dItem = i.LT_Common_Label_SerialNumber;
|
||||||
|
d.Add(dItem);
|
||||||
|
|
||||||
|
//list should only have a serial number in it if it's staying, removed ones are removed entirely from the list as well due to quirk
|
||||||
|
//so the list should only have one serial per part per adjustment item in the list in theory and no negative removed ones
|
||||||
|
//get new part number
|
||||||
|
//get existing serials because the same part may be adjusted multiple times
|
||||||
|
//PUT at route /part/serials/v8partid array of strings which are *all* serial numbers for that part (warehouse no longer relevant)
|
||||||
|
|
||||||
|
await util.PutAsync("part/serials/" + partNumber, d);
|
||||||
|
|
||||||
|
}//end of adjustmentitem loop
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion Inventory adjustment serials
|
||||||
|
|
||||||
|
|
||||||
#region Task groups
|
#region Task groups
|
||||||
private async System.Threading.Tasks.Task ExportTaskGroups(ProgressForm progress)
|
private async System.Threading.Tasks.Task ExportTaskGroups(ProgressForm progress)
|
||||||
{
|
{
|
||||||
@@ -2343,8 +2395,6 @@ namespace AyaNova.PlugIn.V8
|
|||||||
}
|
}
|
||||||
#endregion Task groups
|
#endregion Task groups
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region Units
|
#region Units
|
||||||
private async System.Threading.Tasks.Task ExportUnits(ProgressForm progress)
|
private async System.Threading.Tasks.Task ExportUnits(ProgressForm progress)
|
||||||
{
|
{
|
||||||
@@ -2804,7 +2854,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
if (i.ContractRate)
|
if (i.ContractRate)
|
||||||
{
|
{
|
||||||
d.contractOnly = true;
|
d.contractOnly = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -4862,7 +4912,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Clear out inventory for special unknown missing part created in v8 for potentially missing parts
|
//Clear out inventory for special unknown missing part created in v8 for potentially missing parts
|
||||||
if(mSubstitutePartId!=0)
|
if (mSubstitutePartId != 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
JObject v8inv = (await util.GetAsync("part/latest-inventory/" + mSubstitutePartId)).ObjectResponse;
|
JObject v8inv = (await util.GetAsync("part/latest-inventory/" + mSubstitutePartId)).ObjectResponse;
|
||||||
@@ -4993,7 +5043,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
//MAKE A DUPLICATE (probable source locale here in v7 that matches Raven is duped in Raven as basis for updating with custom v7 translations)
|
//MAKE A DUPLICATE (probable source locale here in v7 that matches Raven is duped in Raven as basis for updating with custom v7 translations)
|
||||||
//i.e. if we guess german is the v7 source of the customized locale then migrate it to the Raven german translation ensuring the best language for the user
|
//i.e. if we guess german is the v7 source of the customized locale then migrate it to the Raven german translation ensuring the best language for the user
|
||||||
var exportName = GetUniqueName(i.Locale + " (" + ProbableSourceLocale + ")");
|
var exportName = GetUniqueName(i.Locale + " (" + ProbableSourceLocale + ")");
|
||||||
progress.Append("ACTION REQUIRED: migrating a custom locale '" + i.Locale + "' to v8 as '"+exportName+"'. We do not recommend using migrated locales, see the Migration guide 'Localized Text' section for guidance.");
|
progress.Append("ACTION REQUIRED: migrating a custom locale '" + i.Locale + "' to v8 as '" + exportName + "'. We do not recommend using migrated locales, see the Migration guide 'Localized Text' section for guidance.");
|
||||||
progress.SubOp("Is custom and closest match to " + ProbableSourceLocale);
|
progress.SubOp("Is custom and closest match to " + ProbableSourceLocale);
|
||||||
progress.Op("Exporting " + i.Locale + " to " + exportName);
|
progress.Op("Exporting " + i.Locale + " to " + exportName);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user