This commit is contained in:
2022-06-23 00:47:29 +00:00
parent eb2ebfde5b
commit 4b196e05cb
2 changed files with 15 additions and 12 deletions

View File

@@ -22,7 +22,7 @@ namespace AyaNovaQBI
/// <remarks>
/// Do not modify the definition of BuildAt as your changes will be discarded.
/// </remarks>
public static DateTime BuildAt { get { return new DateTime(637915141619134341); } } //--**
public static DateTime BuildAt { get { return new DateTime(637915168428123684); } } //--**
/// <summary>
/// The program that time stamped it.
/// </summary>

View File

@@ -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
}
}
}