This commit is contained in:
@@ -449,7 +449,7 @@ namespace AyaNovaQBI
|
||||
}
|
||||
|
||||
|
||||
public static async Task<bool> InitializeQBI()
|
||||
public static async Task<bool> InitializeQBI(StringBuilder initErrors)
|
||||
{
|
||||
//COPY most of this code from qbi v7 becuase it has a lot of edge cases in it and it's complex and thorough, but break it into abstracted bits so can be replicated in other accounting add-on's more easily
|
||||
|
||||
@@ -459,11 +459,14 @@ namespace AyaNovaQBI
|
||||
if (d.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
|
||||
return false;
|
||||
|
||||
//Fetch AyaNova license
|
||||
var r=await GetAsync("license");
|
||||
todo: need to be able to check via route if has licensefeature, code is already in license biz object, just need exposed to route for logged in users only under license/has-feature
|
||||
|
||||
//Check if licensed
|
||||
var r = await GetAsync("license/has-feature/XQBI");
|
||||
if (!r.ObjectResponse["data"].Value<bool>())
|
||||
{
|
||||
initErrors.AppendLine("This AyaNova server is not licensed to use QBI");
|
||||
return false;
|
||||
}
|
||||
|
||||
//check if build date is within licensed date (how did I do that automated build date thing?)
|
||||
// copy timestamp.cs and the createtimestamp.exe utility from v7 qbi and create build event to run it here and do same thing
|
||||
//check that AyaNova version matches required minimum for this QBI (
|
||||
|
||||
Reference in New Issue
Block a user