This commit is contained in:
@@ -235,8 +235,13 @@ namespace AyaNova.PlugIn.V8
|
||||
private async System.Threading.Tasks.Task CreateSubstitute(Guid id, RootObjectTypes desiredType)
|
||||
{
|
||||
//create the simplest possible version of this object desired
|
||||
dynamic d = new JObject();
|
||||
string sName = MissingDataNamePrefix + " " + id.ToString();
|
||||
d.name = sName;//usually this will suffice, for the rare cases it doesn't add to the correct property below, the name property will be ignored if it's not applicable
|
||||
string route = "";
|
||||
switch (desiredType)
|
||||
{
|
||||
//set route and make dynamic object
|
||||
case RootObjectTypes.Part:
|
||||
{
|
||||
|
||||
@@ -249,12 +254,18 @@ namespace AyaNova.PlugIn.V8
|
||||
break;
|
||||
case RootObjectTypes.Client:
|
||||
{
|
||||
route = "customer";
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Error: CreateSubstitute (source id: " + id.ToString() + " for type: " + desiredType.ToString() + ") THIS TYPE NOT CODED YET");
|
||||
}
|
||||
|
||||
//post route and dynamic object, insert into map and return
|
||||
var rMainObject = await util.PostAsync("customer", d.ToString(Formatting.None));//test formatting none, if works then propogate everywhere
|
||||
long RavenId = util.IdFromResponse(rMainObject);
|
||||
Addv7v8IdMap(id, RavenId);
|
||||
}
|
||||
|
||||
|
||||
@@ -294,7 +305,7 @@ namespace AyaNova.PlugIn.V8
|
||||
private bool V7UseInventory = false;
|
||||
private List<long> Allv8WarehouseIds = new List<long>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3157,7 +3168,7 @@ namespace AyaNova.PlugIn.V8
|
||||
dwipr.workOrderItemId = ravenwoitemid;
|
||||
dwipr.quantity = wipr.Quantity;
|
||||
dwipr.partId = await Getv7v8IdMap(wipr.PartID, RootObjectTypes.Part);
|
||||
|
||||
|
||||
dwipr.partWarehouseId = await Getv7v8IdMap(wipr.PartWarehouseID, RootObjectTypes.PartWarehouse);
|
||||
|
||||
poitemtowoitempartrequest pto = PoItemPartRequestMap.FirstOrDefault(z => z.v7woitempartrequestid == wipr.ID);
|
||||
|
||||
Reference in New Issue
Block a user