This commit is contained in:
@@ -386,26 +386,19 @@ namespace AyaNova.PlugIn.V8
|
|||||||
await ExportHeadOffices(progress);
|
await ExportHeadOffices(progress);
|
||||||
await ExportClients(progress);
|
await ExportClients(progress);
|
||||||
await ExportVendors(progress);
|
await ExportVendors(progress);
|
||||||
|
|
||||||
await ExportWarehouses(progress);
|
|
||||||
await ExportLoanItems(progress);
|
await ExportLoanItems(progress);
|
||||||
await ExportParts(progress);
|
|
||||||
await InitInventory(progress);
|
await InitInventory(progress);
|
||||||
|
await ExportWarehouses(progress);
|
||||||
|
await ExportParts(progress);
|
||||||
await ExportProjects(progress);
|
await ExportProjects(progress);
|
||||||
|
|
||||||
//PURCHASE ORDERS deferred to possibly never if people can live without it
|
//PURCHASE ORDERS deferred to possibly never if people can live without it
|
||||||
// await ExportPurchaseOrders(progress);
|
// await ExportPurchaseOrders(progress);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await ExportUnitModels(progress);
|
await ExportUnitModels(progress);
|
||||||
await ExportUnits(progress);
|
await ExportUnits(progress);
|
||||||
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 ExportWorkorderStatus(progress);//item and workorder both as split in v8
|
||||||
await ExportWorkOrderItemPriorities(progress);
|
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
|
||||||
|
|
||||||
@@ -1656,6 +1649,20 @@ namespace AyaNova.PlugIn.V8
|
|||||||
AddImportTag(dxtags);
|
AddImportTag(dxtags);
|
||||||
SetTags(dx, dxtags);
|
SetTags(dx, dxtags);
|
||||||
UnknownV7PartId = util.IdFromResponse(await util.PostAsync("part", dx.ToString()));
|
UnknownV7PartId = util.IdFromResponse(await util.PostAsync("part", dx.ToString()));
|
||||||
|
|
||||||
|
if (V7UseInventory)
|
||||||
|
{
|
||||||
|
foreach (long l in Allv8WarehouseIds)
|
||||||
|
{
|
||||||
|
//create opening initial inventory just so migrate can proceed without v8 balking
|
||||||
|
dynamic di = new JObject();
|
||||||
|
di.description = "v8 migrate temporary initial inventory to allow migration";
|
||||||
|
di.partId = UnknownV7PartId;
|
||||||
|
di.partWarehouseId = l;
|
||||||
|
di.quantity = 1000000000m;//one billion should cover it
|
||||||
|
await util.PostAsync("part-inventory", di.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion Parts
|
#endregion Parts
|
||||||
|
|
||||||
@@ -2656,6 +2663,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
//######### STATE #######
|
//######### STATE #######
|
||||||
//if closed then set that state as well but always first set the current state
|
//if closed then set that state as well but always first set the current state
|
||||||
{
|
{
|
||||||
|
progress.SubOp("STATE");
|
||||||
if (c.WorkorderService.WorkorderStatusID != Guid.Empty)
|
if (c.WorkorderService.WorkorderStatusID != Guid.Empty)
|
||||||
{
|
{
|
||||||
dynamic state = new JObject();
|
dynamic state = new JObject();
|
||||||
@@ -2691,7 +2699,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
foreach (WorkorderItem wi in c.WorkorderItems)
|
foreach (WorkorderItem wi in c.WorkorderItems)
|
||||||
{
|
{
|
||||||
List<string> witags = new List<string>();
|
List<string> witags = new List<string>();
|
||||||
progress.Op("WorkorderItem " + wi.ID.ToString());
|
progress.SubOp("WorkorderItem " + wi.ID.ToString());
|
||||||
dynamic dwi = new JObject();
|
dynamic dwi = new JObject();
|
||||||
dwi.workOrderId = RavenId;
|
dwi.workOrderId = RavenId;
|
||||||
dwi.sequence = ++nSequence;
|
dwi.sequence = ++nSequence;
|
||||||
@@ -2726,7 +2734,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
if (ravUnitId != null)
|
if (ravUnitId != null)
|
||||||
{
|
{
|
||||||
//we have a legit unit record, make it for v8
|
//we have a legit unit record, make it for v8
|
||||||
progress.Op("WorkorderItemUnit " + wi.UnitID.ToString());
|
progress.SubOp("WorkorderItemUnit " + wi.UnitID.ToString());
|
||||||
dynamic dwiu = new JObject();
|
dynamic dwiu = new JObject();
|
||||||
dwiu.workOrderId = RavenId;
|
dwiu.workOrderId = RavenId;
|
||||||
dwiu.workorderItemId = ravenwoitemid;
|
dwiu.workorderItemId = ravenwoitemid;
|
||||||
@@ -2742,7 +2750,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
//##### WORKORDER ITEM SCHEDULED USER
|
//##### WORKORDER ITEM SCHEDULED USER
|
||||||
foreach (WorkorderItemScheduledUser wisu in wi.ScheduledUsers)
|
foreach (WorkorderItemScheduledUser wisu in wi.ScheduledUsers)
|
||||||
{
|
{
|
||||||
progress.Op("WorkorderItemScheduledUser " + wisu.ID.ToString());
|
progress.SubOp("WorkorderItemScheduledUser " + wisu.ID.ToString());
|
||||||
dynamic dwisu = new JObject();
|
dynamic dwisu = new JObject();
|
||||||
dwisu.workOrderId = RavenId;
|
dwisu.workOrderId = RavenId;
|
||||||
dwisu.workorderItemId = ravenwoitemid;
|
dwisu.workorderItemId = ravenwoitemid;
|
||||||
@@ -2758,7 +2766,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
//##### WORKORDER ITEM PART
|
//##### WORKORDER ITEM PART
|
||||||
foreach (WorkorderItemPart wip in wi.Parts)
|
foreach (WorkorderItemPart wip in wi.Parts)
|
||||||
{
|
{
|
||||||
progress.Op("WorkorderItemPart " + wip.ID.ToString());
|
progress.SubOp("WorkorderItemPart " + wip.ID.ToString());
|
||||||
dynamic dwip = new JObject();
|
dynamic dwip = new JObject();
|
||||||
dwip.workOrderId = RavenId;
|
dwip.workOrderId = RavenId;
|
||||||
dwip.workorderItemId = ravenwoitemid;
|
dwip.workorderItemId = ravenwoitemid;
|
||||||
@@ -2786,7 +2794,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
//##### WORKORDER ITEM PART
|
//##### WORKORDER ITEM PART
|
||||||
foreach (WorkorderItemPart wip in wi.Parts)
|
foreach (WorkorderItemPart wip in wi.Parts)
|
||||||
{
|
{
|
||||||
progress.Op("WorkorderItemPart " + wip.ID.ToString());
|
progress.SubOp("WorkorderItemPart " + wip.ID.ToString());
|
||||||
dynamic dwip = new JObject();
|
dynamic dwip = new JObject();
|
||||||
dwip.workOrderId = RavenId;
|
dwip.workOrderId = RavenId;
|
||||||
dwip.workorderItemId = ravenwoitemid;
|
dwip.workorderItemId = ravenwoitemid;
|
||||||
|
|||||||
Reference in New Issue
Block a user