This commit is contained in:
@@ -5259,12 +5259,12 @@ namespace AyaNovaQBI
|
||||
if (USE_INVENTORY)
|
||||
{
|
||||
var rstocklevel = await GetAsync($"part/stock-levels/{c.Id}");
|
||||
var partstocklevel = rstocklevel.ObjectResponse["data"].ToObject<PartStockLevel>();
|
||||
var partstocklevels = rstocklevel.ObjectResponse["data"].ToObject<List<PartStockLevel>>();
|
||||
var rinventorylevel = await GetAsync($"part/latest-inventory/{c.Id}");
|
||||
var partinventories = rstocklevel.ObjectResponse["data"].ToObject<List<PartInventory>>();
|
||||
|
||||
ca.QuantityOnHand.SetValue((double)partinventories.Sum(z => z.Balance));
|
||||
ca.ReorderPoint.SetValue((double)partstocklevel.MinimumQuantity);
|
||||
ca.ReorderPoint.SetValue((double)partstocklevels.Sum(z=>z.MinimumQuantity));
|
||||
}
|
||||
//------------------------
|
||||
|
||||
@@ -5329,7 +5329,7 @@ namespace AyaNovaQBI
|
||||
//crack the exception in case it's a generic dataportal one
|
||||
//and it is if it's got an inner exception of any kind
|
||||
if (ex.InnerException != null) ex = ex.InnerException;
|
||||
alErrors.Add("ImportAyaPart: QuickBooks won't allow import of " + sName + "\r\n" +
|
||||
alErrors.Add("ImportAyaPart: failed to import " + sName + "\r\n" +
|
||||
"Due to the following error:\r\n" + ex.Message);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user