diff --git a/AyaNovaQBI/MainForm.cs b/AyaNovaQBI/MainForm.cs index 1b4b7d2..0a9e324 100644 --- a/AyaNovaQBI/MainForm.cs +++ b/AyaNovaQBI/MainForm.cs @@ -19,7 +19,7 @@ namespace AyaNovaQBI async private void MainForm_Load(object sender, EventArgs e) { - + //Initialize StringBuilder initErrors = new StringBuilder(); if (await util.InitializeQBI(initErrors) == false) @@ -47,6 +47,7 @@ namespace AyaNovaQBI //} } grid.Visible = true; + MessageBox.Show("DONE / OK"); // grid.DataSource = util.GetInvoiceableItems(); } diff --git a/AyaNovaQBI/util.cs b/AyaNovaQBI/util.cs index c29e412..bd44f31 100644 --- a/AyaNovaQBI/util.cs +++ b/AyaNovaQBI/util.cs @@ -786,8 +786,14 @@ namespace AyaNovaQBI "in order to integrate AyaNova with QuickBooks.\r\n\r\n" + "These settings can be changed later.", "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 ApproveCompanyFile s0 = new ApproveCompanyFile(); @@ -797,7 +803,7 @@ namespace AyaNovaQBI 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; @@ -822,6 +828,7 @@ namespace AyaNovaQBI goto PRESTATUSOK; } + //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 SetWOStatus s1 = new SetWOStatus(); @@ -1251,9 +1258,6 @@ namespace AyaNovaQBI } - - - SetMemoField s5 = new SetMemoField(); s5.DialogTitle = "AyaNova QBI setup - Set Memo field?"; s5.OptionTitle = "Invoice memo field"; @@ -1316,9 +1320,10 @@ namespace AyaNovaQBI //Save if changes made if (QDat.IsDirty) { + await IntegrationLog("ValidateSettings: QBI settings modified by user, saving now"); QBIntegration.IntegrationData = Newtonsoft.Json.JsonConvert.SerializeObject(QDat); ApiResponse r = await PutAsync("integration", Newtonsoft.Json.JsonConvert.SerializeObject(QBIntegration)); - QBIntegration = r.ObjectResponse["data"].ToObject(); + QBIntegration.Concurrency = r.ObjectResponse["data"]["concurrency"].Value(); ////Case 299 //QBI.AIObject = QDat.XMLData; ////QBI.AIObject=QDat; @@ -1326,6 +1331,7 @@ namespace AyaNovaQBI //QBI = (Integration)QBI.Save(); QDat.IsDirty = false; } + await IntegrationLog($"ValidateSettings: QBI main integration data that will be used for this session \"{QBIntegration.IntegrationData}\" "); return pfstat.OK; }