This commit is contained in:
@@ -3468,7 +3468,17 @@ namespace AyaNova.Biz
|
||||
};
|
||||
if (await pib.CreateAsync(pi) == null)
|
||||
{
|
||||
AddError(ApiErrorCode.API_SERVER_ERROR, "generalerror", $"Error updating inventory ({pi.Description}):{pib.GetErrorsAsString()}");
|
||||
if (pib.HasErrors)
|
||||
{
|
||||
foreach (var e in pib.Errors)
|
||||
{
|
||||
if (e.Code == ApiErrorCode.INSUFFICIENT_INVENTORY)
|
||||
AddError(e.Code, "Quantity", e.Message);
|
||||
else
|
||||
AddError(e.Code, e.Target, e.Message);
|
||||
}
|
||||
}
|
||||
//AddError(ApiErrorCode.API_SERVER_ERROR, "generalerror", $"Error updating inventory ({pi.Description}):{pib.GetErrorsAsString()}");
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user