This commit is contained in:
@@ -22,7 +22,7 @@ namespace AyaNovaQBI
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Do not modify the definition of BuildAt as your changes will be discarded.
|
/// Do not modify the definition of BuildAt as your changes will be discarded.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static DateTime BuildAt { get { return new DateTime(637915141619134341); } } //--**
|
public static DateTime BuildAt { get { return new DateTime(637915168428123684); } } //--**
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The program that time stamped it.
|
/// The program that time stamped it.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -507,7 +507,7 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
|
|
||||||
//BUILD DATE VERSION ALLOWED?
|
//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 " +
|
initErrors.AppendLine("NOT LICENSED!\r\n\r\nThis QBI plugin was built " +
|
||||||
Timestamp.BuildAt.ToString("g") + "\r\n" +
|
Timestamp.BuildAt.ToString("g") + "\r\n" +
|
||||||
@@ -544,7 +544,7 @@ namespace AyaNovaQBI
|
|||||||
public static async Task<bool> IntegrationCheck(StringBuilder initErrors)
|
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 for integration object at server, if not there then create one if have sufficient rights
|
||||||
//check if inactive
|
|
||||||
ApiResponse r = null;
|
ApiResponse r = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -563,19 +563,22 @@ namespace AyaNovaQBI
|
|||||||
}
|
}
|
||||||
else
|
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}");
|
r = await GetAsync($"integration/{QBI_INTEGRATION_ID}");
|
||||||
QBIntegration = r.ObjectResponse["data"].ToObject<Integration>();
|
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;
|
return true;
|
||||||
}catch(Exception ex)
|
}
|
||||||
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
initErrors.AppendLine("Error fetching QBI Integration object");
|
initErrors.AppendLine("Error fetching QBI Integration object");
|
||||||
initErrors.AppendLine(ex.Message);
|
initErrors.AppendLine(ex.Message);
|
||||||
@@ -585,8 +588,8 @@ namespace AyaNovaQBI
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user