This commit is contained in:
@@ -239,8 +239,9 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
private string ImportTag = string.Empty;
|
private string ImportTag = string.Empty;
|
||||||
|
|
||||||
private void AddImportTag(List<string> tags){
|
private void AddImportTag(List<string> tags)
|
||||||
if(!string.IsNullOrWhiteSpace(ImportTag))
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(ImportTag))
|
||||||
tags.Add(ImportTag);
|
tags.Add(ImportTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -360,6 +361,9 @@ namespace AyaNova.PlugIn.V8
|
|||||||
await ExportExternalUsers(progress);//needs vendors, clients and headoffices already exported so needs to be here late
|
await ExportExternalUsers(progress);//needs vendors, clients and headoffices already exported so needs to be here late
|
||||||
await ExportMemos(progress);
|
await ExportMemos(progress);
|
||||||
|
|
||||||
|
await ExportWorkorderStatus(progress);//item and workorder both as split in v8
|
||||||
|
await ExportWorkOrderItemPriorities(progress);
|
||||||
|
|
||||||
await ExportServiceWorkorders(progress);
|
await ExportServiceWorkorders(progress);
|
||||||
//MIGRATE_OUTSTANDING - here can fixup loanitem workorder id's
|
//MIGRATE_OUTSTANDING - here can fixup loanitem workorder id's
|
||||||
|
|
||||||
@@ -945,7 +949,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
d.contractId = Getv7v8IdMap(c.ContractID, "Contract for Client " + d.name);
|
d.contractId = Getv7v8IdMap(c.ContractID, "Contract for Client " + d.name);
|
||||||
d.contractExpires = c.ContractExpires;
|
d.contractExpires = c.ContractExpires;
|
||||||
}
|
}
|
||||||
|
|
||||||
//todo d.defaultServiceTemplateId = c.defaultservicetemplateid
|
//todo d.defaultServiceTemplateId = c.defaultservicetemplateid
|
||||||
d.phone1 = c.Phone1;
|
d.phone1 = c.Phone1;
|
||||||
d.phone2 = c.Phone2;
|
d.phone2 = c.Phone2;
|
||||||
@@ -1152,7 +1156,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
d.contractExpires = c.ContractExpires;
|
d.contractExpires = c.ContractExpires;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
d.phone1 = c.Phone1;
|
d.phone1 = c.Phone1;
|
||||||
d.phone2 = c.Phone2;
|
d.phone2 = c.Phone2;
|
||||||
d.phone3 = c.Phone3;
|
d.phone3 = c.Phone3;
|
||||||
@@ -2247,6 +2251,54 @@ namespace AyaNova.PlugIn.V8
|
|||||||
}
|
}
|
||||||
#endregion Memos
|
#endregion Memos
|
||||||
|
|
||||||
|
|
||||||
|
//await (progress);//item and workorder both as split in v8
|
||||||
|
//await ExportWorkOrderItemPriorities(progress);
|
||||||
|
#region WorkorderStatus
|
||||||
|
private async System.Threading.Tasks.Task ExportWorkorderStatus(ProgressForm progress)
|
||||||
|
{
|
||||||
|
if (!progress.KeepGoing) return;
|
||||||
|
progress.Op("Start WorkOrder/Item Status export");
|
||||||
|
progress.SubOp("");
|
||||||
|
var ObjectTypeName = "WorkorderStatus";
|
||||||
|
progress.Append("Exporting all " + " " + ObjectTypeName + "s");
|
||||||
|
List<string> tags = new List<string>();
|
||||||
|
AddImportTag(tags);
|
||||||
|
WorkorderStatusPickList pl = WorkorderStatusPickList.GetList();
|
||||||
|
|
||||||
|
foreach (WorkorderStatusPickList.WorkorderStatusPickListInfo pli in pl)
|
||||||
|
{
|
||||||
|
if (!progress.KeepGoing) return;
|
||||||
|
|
||||||
|
|
||||||
|
if (!progress.KeepGoing) return;
|
||||||
|
|
||||||
|
dynamic d = new JObject();
|
||||||
|
|
||||||
|
|
||||||
|
SetTags(d, tags);
|
||||||
|
|
||||||
|
|
||||||
|
progress.Op(ObjectTypeName + " " + pli.ID.ToString());
|
||||||
|
|
||||||
|
var rMainObject = await util.PostAsync("work-order-status", d.ToString());
|
||||||
|
long RavenId = util.IdFromResponse(rMainObject);
|
||||||
|
//Event log fixup
|
||||||
|
await util.EventLog(util.AyaType, RavenId, RavenFromId, RavenFromId, mem.Created, mem.Modified);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//------
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion workorder status
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗██████╗
|
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗██████╗
|
||||||
██║ ██║██╔═══██╗██╔══██╗██║ ██╔╝ ██╔═══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗
|
██║ ██║██╔═══██╗██╔══██╗██║ ██╔╝ ██╔═══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗
|
||||||
@@ -2262,7 +2314,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
progress.Op("Start Service workorders export");
|
progress.Op("Start Service workorders export");
|
||||||
progress.SubOp("");
|
progress.SubOp("");
|
||||||
var ObjectTypeName = "Workorder";
|
var ObjectTypeName = "Workorder";
|
||||||
|
|
||||||
//Step 1: export the CustomFields to FormCustom if applicable so that when doing individual items we can export their custom data too
|
//Step 1: export the CustomFields to FormCustom if applicable so that when doing individual items we can export their custom data too
|
||||||
var ocf = ObjectHasCustomFieldDataToExport("WorkorderItem");
|
var ocf = ObjectHasCustomFieldDataToExport("WorkorderItem");
|
||||||
bool ShouldExportCustom = ocf != null;
|
bool ShouldExportCustom = ocf != null;
|
||||||
@@ -2283,7 +2335,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
if (!progress.KeepGoing) return;
|
if (!progress.KeepGoing) return;
|
||||||
List<string> tags = new List<string>();
|
List<string> tags = new List<string>();
|
||||||
AddImportTag(tags);
|
AddImportTag(tags);
|
||||||
|
|
||||||
|
|
||||||
Workorder c = Workorder.GetItem(i.LT_O_Workorder.Value);
|
Workorder c = Workorder.GetItem(i.LT_O_Workorder.Value);
|
||||||
if (IsDuplicatev7v8IdMapItem(c.ID, c.WorkorderService.ServiceNumber.ToString(), progress)) continue;
|
if (IsDuplicatev7v8IdMapItem(c.ID, c.WorkorderService.ServiceNumber.ToString(), progress)) continue;
|
||||||
@@ -2340,7 +2392,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
// d.concurrency = util.CTokenFromResponse(rMainObject);
|
// d.concurrency = util.CTokenFromResponse(rMainObject);
|
||||||
progress.Op("WorkorderItem " + wi.ID.ToString());
|
progress.Op("WorkorderItem " + wi.ID.ToString());
|
||||||
|
|
||||||
TagFromv7Guid(wi.TypeID, tags);
|
TagFromv7Guid(wi.TypeID, tags);
|
||||||
TagFromv7Guid(wi.WorkorderItemUnitServiceTypeID, tags);
|
TagFromv7Guid(wi.WorkorderItemUnitServiceTypeID, tags);
|
||||||
SetTags(dwi, tags);
|
SetTags(dwi, tags);
|
||||||
@@ -2450,7 +2502,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
}
|
}
|
||||||
#endregion Quotes
|
#endregion Quotes
|
||||||
|
|
||||||
/*
|
/*
|
||||||
██████╗ ███╗ ███╗
|
██████╗ ███╗ ███╗
|
||||||
██╔══██╗████╗ ████║
|
██╔══██╗████╗ ████║
|
||||||
██████╔╝██╔████╔██║
|
██████╔╝██╔████╔██║
|
||||||
|
|||||||
Reference in New Issue
Block a user