This commit is contained in:
2022-07-01 19:58:12 +00:00
parent f61fa815b8
commit e86992f295
2 changed files with 13 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ namespace AyaNovaQBI
async private void MainForm_Load(object sender, EventArgs e) async private void MainForm_Load(object sender, EventArgs e)
{ {
//Initialize //Initialize
StringBuilder initErrors = new StringBuilder(); StringBuilder initErrors = new StringBuilder();
if (await util.InitializeQBI(initErrors) == false) if (await util.InitializeQBI(initErrors) == false)
@@ -47,6 +47,7 @@ namespace AyaNovaQBI
//} //}
} }
grid.Visible = true; grid.Visible = true;
MessageBox.Show("DONE / OK");
// grid.DataSource = util.GetInvoiceableItems(); // grid.DataSource = util.GetInvoiceableItems();
} }

View File

@@ -786,8 +786,14 @@ namespace AyaNovaQBI
"in order to integrate AyaNova with QuickBooks.\r\n\r\n" + "in order to integrate AyaNova with QuickBooks.\r\n\r\n" +
"These settings can be changed later.", "These settings can be changed later.",
"Setup wizard", MessageBoxButtons.OK, MessageBoxIcon.Information); "Setup wizard", MessageBoxButtons.OK, MessageBoxIcon.Information);
await IntegrationLog("ValidateSettings: there are no QBI settings made - prompting user for all preferences now");
} }
if(ForceReset)
await IntegrationLog("ValidateSettings: forced reset of all QBI settings initiated");
#region confirm company file #region confirm company file
ApproveCompanyFile s0 = new ApproveCompanyFile(); ApproveCompanyFile s0 = new ApproveCompanyFile();
@@ -797,7 +803,7 @@ namespace AyaNovaQBI
if (s0.ShowDialog() == DialogResult.Cancel) if (s0.ShowDialog() == DialogResult.Cancel)
{ {
await IntegrationLog("PFC: User cancelled when shown company file currently open - " + QCompanyFile); await IntegrationLog("ValidateSettings: User cancelled when shown company file currently open - " + QCompanyFile);
return pfstat.Cancel; return pfstat.Cancel;
@@ -822,6 +828,7 @@ namespace AyaNovaQBI
goto PRESTATUSOK; goto PRESTATUSOK;
} }
//We've arrived here because there is no valid setting for Pre workorder status //We've arrived here because there is no valid setting for Pre workorder status
//or it's the first time through and needs to be selected on way or another //or it's the first time through and needs to be selected on way or another
SetWOStatus s1 = new SetWOStatus(); SetWOStatus s1 = new SetWOStatus();
@@ -1251,9 +1258,6 @@ namespace AyaNovaQBI
} }
SetMemoField s5 = new SetMemoField(); SetMemoField s5 = new SetMemoField();
s5.DialogTitle = "AyaNova QBI setup - Set Memo field?"; s5.DialogTitle = "AyaNova QBI setup - Set Memo field?";
s5.OptionTitle = "Invoice memo field"; s5.OptionTitle = "Invoice memo field";
@@ -1316,9 +1320,10 @@ namespace AyaNovaQBI
//Save if changes made //Save if changes made
if (QDat.IsDirty) if (QDat.IsDirty)
{ {
await IntegrationLog("ValidateSettings: QBI settings modified by user, saving now");
QBIntegration.IntegrationData = Newtonsoft.Json.JsonConvert.SerializeObject(QDat); QBIntegration.IntegrationData = Newtonsoft.Json.JsonConvert.SerializeObject(QDat);
ApiResponse r = await PutAsync("integration", Newtonsoft.Json.JsonConvert.SerializeObject(QBIntegration)); ApiResponse r = await PutAsync("integration", Newtonsoft.Json.JsonConvert.SerializeObject(QBIntegration));
QBIntegration = r.ObjectResponse["data"].ToObject<Integration>(); QBIntegration.Concurrency = r.ObjectResponse["data"]["concurrency"].Value<uint>();
////Case 299 ////Case 299
//QBI.AIObject = QDat.XMLData; //QBI.AIObject = QDat.XMLData;
////QBI.AIObject=QDat; ////QBI.AIObject=QDat;
@@ -1326,6 +1331,7 @@ namespace AyaNovaQBI
//QBI = (Integration)QBI.Save(); //QBI = (Integration)QBI.Save();
QDat.IsDirty = false; QDat.IsDirty = false;
} }
await IntegrationLog($"ValidateSettings: QBI main integration data that will be used for this session \"{QBIntegration.IntegrationData}\" ");
return pfstat.OK; return pfstat.OK;
} }