This commit is contained in:
@@ -499,9 +499,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
await ExportParts(progress);
|
await ExportParts(progress);
|
||||||
await ExportPartAssemblies(progress);
|
await ExportPartAssemblies(progress);
|
||||||
await ExportProjects(progress);
|
await ExportProjects(progress);
|
||||||
|
await ExportPurchaseOrders(progress);
|
||||||
if (V7UseInventory)
|
|
||||||
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
|
||||||
@@ -512,7 +510,6 @@ namespace AyaNova.PlugIn.V8
|
|||||||
await ExportQuotes(progress);
|
await ExportQuotes(progress);
|
||||||
await ExportPMs(progress);
|
await ExportPMs(progress);
|
||||||
await ExportServiceWorkorders(progress);
|
await ExportServiceWorkorders(progress);
|
||||||
//todo: fixup pm,quote links on service wo, should I export them first??
|
|
||||||
await ExportUnitMeterReadings(progress);
|
await ExportUnitMeterReadings(progress);
|
||||||
|
|
||||||
|
|
||||||
@@ -523,8 +520,8 @@ namespace AyaNova.PlugIn.V8
|
|||||||
//await ExportServiceBank(progress);//deprecated for v8 (so far)
|
//await ExportServiceBank(progress);//deprecated for v8 (so far)
|
||||||
|
|
||||||
await ExportClientServiceRequests(progress);
|
await ExportClientServiceRequests(progress);
|
||||||
|
|
||||||
await SynchronizeInventory(progress);
|
await SynchronizeInventory(progress);
|
||||||
|
await ExportGlobalSettings(progress);
|
||||||
|
|
||||||
if (progress.KeepGoing)
|
if (progress.KeepGoing)
|
||||||
{
|
{
|
||||||
@@ -1712,20 +1709,37 @@ namespace AyaNova.PlugIn.V8
|
|||||||
private async System.Threading.Tasks.Task InitInventory(ProgressForm progress)
|
private async System.Threading.Tasks.Task InitInventory(ProgressForm progress)
|
||||||
{
|
{
|
||||||
if (!progress.KeepGoing) return;
|
if (!progress.KeepGoing) return;
|
||||||
if (!V7UseInventory)
|
if (V7UseInventory)
|
||||||
{
|
progress.Append("Info: v7 Use inventory is Active and will be migrated");
|
||||||
progress.Append("v7 Use inventory is OFF, not migrating inventory");
|
else
|
||||||
var a = await util.GetAsync("global-biz-setting");
|
progress.Append("Info: v7 Use inventory is OFF, not migrating inventory");
|
||||||
dynamic d = a.ObjectResponse["data"];
|
var a = await util.GetAsync("global-biz-setting");
|
||||||
d.useInventory = false;
|
dynamic d = a.ObjectResponse["data"];
|
||||||
await util.PutAsync("global-biz-setting", d);
|
d.useInventory = V7UseInventory;
|
||||||
return;
|
await util.PutAsync("global-biz-setting", d);
|
||||||
}
|
|
||||||
progress.Append("Info: v7 Use inventory is Active");
|
|
||||||
}
|
}
|
||||||
#endregion InitInventory
|
#endregion InitInventory
|
||||||
|
|
||||||
|
|
||||||
|
#region Global settings
|
||||||
|
//Global / ops settings
|
||||||
|
private async System.Threading.Tasks.Task ExportGlobalSettings(ProgressForm progress)
|
||||||
|
{
|
||||||
|
if (!progress.KeepGoing) return;
|
||||||
|
if (V7UseInventory)
|
||||||
|
progress.Append("Info: v7 Use inventory is Active and will be migrated");
|
||||||
|
else
|
||||||
|
progress.Append("Info: v7 Use inventory is OFF, not migrating inventory");
|
||||||
|
var a = await util.GetAsync("global-biz-setting");
|
||||||
|
dynamic d = a.ObjectResponse["data"];
|
||||||
|
d.useInventory = V7UseInventory;
|
||||||
|
await util.PutAsync("global-biz-setting", d);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion Global settings
|
||||||
|
|
||||||
|
|
||||||
#region Parts
|
#region Parts
|
||||||
@@ -2049,6 +2063,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
private async System.Threading.Tasks.Task ExportPurchaseOrders(ProgressForm progress)
|
private async System.Threading.Tasks.Task ExportPurchaseOrders(ProgressForm progress)
|
||||||
{
|
{
|
||||||
if (!progress.KeepGoing) return;
|
if (!progress.KeepGoing) return;
|
||||||
|
if (!V7UseInventory) return;
|
||||||
var ObjectTypeName = "PurchaseOrder";
|
var ObjectTypeName = "PurchaseOrder";
|
||||||
progress.Op("Start Purchase orders export");
|
progress.Op("Start Purchase orders export");
|
||||||
progress.SubOp("");
|
progress.SubOp("");
|
||||||
|
|||||||
Reference in New Issue
Block a user