This commit is contained in:
@@ -155,7 +155,7 @@ namespace AyaNovaQBI
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
if (a.ObjectResponse != null && a.ObjectResponse.ContainsKey("error"))
|
||||
{
|
||||
|
||||
@@ -507,7 +507,7 @@ namespace AyaNovaQBI
|
||||
|
||||
|
||||
//BUILD DATE VERSION ALLOWED?
|
||||
if(ALicense.maintenanceExpiration < Timestamp.BuildAt)
|
||||
if (ALicense.maintenanceExpiration < Timestamp.BuildAt)
|
||||
{
|
||||
initErrors.AppendLine("NOT LICENSED!\r\n\r\nThis QBI plugin was built " +
|
||||
Timestamp.BuildAt.ToString("g") + "\r\n" +
|
||||
@@ -544,7 +544,7 @@ namespace AyaNovaQBI
|
||||
public static async Task<bool> IntegrationCheck(StringBuilder initErrors)
|
||||
{
|
||||
//Check for integration object at server, if not there then create one if have sufficient rights
|
||||
//check if inactive
|
||||
|
||||
ApiResponse r = null;
|
||||
try
|
||||
{
|
||||
@@ -563,19 +563,22 @@ namespace AyaNovaQBI
|
||||
}
|
||||
else
|
||||
{
|
||||
//Exists, fetch it and we're done here
|
||||
//Exists, fetch it check if active then we're done here
|
||||
r = await GetAsync($"integration/{QBI_INTEGRATION_ID}");
|
||||
QBIntegration = r.ObjectResponse["data"].ToObject<Integration>();
|
||||
|
||||
if (!QBIntegration.Active)
|
||||
{
|
||||
initErrors.AppendLine("QBI Integration is currently deactivated and can not be used\r\nThis setting can be changed in AyaNova in the Administration section -> Integrations -> QuickBooks Desktop integration record\r\nSet to active and save to enable QBI");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}catch(Exception ex)
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
initErrors.AppendLine("Error fetching QBI Integration object");
|
||||
initErrors.AppendLine(ex.Message);
|
||||
@@ -585,8 +588,8 @@ namespace AyaNovaQBI
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user