This commit is contained in:
2022-07-01 19:01:02 +00:00
parent 71b6249a33
commit 7365f74250
6 changed files with 38 additions and 55 deletions

View File

@@ -39,27 +39,27 @@
//
this.lblCompany.Dock = System.Windows.Forms.DockStyle.Top;
this.lblCompany.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCompany.Location = new System.Drawing.Point(0, 0);
this.lblCompany.Location = new System.Drawing.Point(16, 16);
this.lblCompany.Name = "lblCompany";
this.lblCompany.Size = new System.Drawing.Size(522, 30);
this.lblCompany.Size = new System.Drawing.Size(490, 30);
this.lblCompany.TabIndex = 0;
this.lblCompany.Text = "A company";
//
// lblPath
//
this.lblPath.Dock = System.Windows.Forms.DockStyle.Top;
this.lblPath.Location = new System.Drawing.Point(0, 30);
this.lblPath.Location = new System.Drawing.Point(16, 46);
this.lblPath.Name = "lblPath";
this.lblPath.Size = new System.Drawing.Size(522, 37);
this.lblPath.Size = new System.Drawing.Size(490, 37);
this.lblPath.TabIndex = 1;
//
// lblExplain
//
this.lblExplain.Dock = System.Windows.Forms.DockStyle.Top;
this.lblExplain.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblExplain.Location = new System.Drawing.Point(0, 67);
this.lblExplain.Location = new System.Drawing.Point(16, 83);
this.lblExplain.Name = "lblExplain";
this.lblExplain.Size = new System.Drawing.Size(522, 23);
this.lblExplain.Size = new System.Drawing.Size(490, 23);
this.lblExplain.TabIndex = 2;
this.lblExplain.Text = "AyaNova QBI will work with this company file";
//
@@ -98,6 +98,7 @@
this.Controls.Add(this.lblCompany);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ApproveCompanyFile";
this.Padding = new System.Windows.Forms.Padding(16);
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "ApproveCompanyFile";

View File

@@ -26,7 +26,8 @@ namespace AyaNovaQBI
public DataTable QBItems { get; set; }
public string SelectedQBItem { get; set; }
public string SelectedQBItem { get => (string)cbQBItems.SelectedValue; set { } }
//private string _selectedQBItem;
private void SetQBChargeAsLoad(object sender, EventArgs e)
{

View File

@@ -20,8 +20,8 @@ namespace AyaNovaQBI
public DataTable QBClasses { get; set; }
public string SelectedQBClass { get; set; }
public string SelectedQBClass { get => (string)cbQBClasses.SelectedValue; set { } }
private void SetQBClass_load(object sender, EventArgs e)
{

View File

@@ -20,8 +20,8 @@ namespace AyaNovaQBI
public DataTable QBInvoiceTemplates { get; set; }
public string SelectedQBInvoiceTemplate { get; set; }
public string SelectedQBInvoiceTemplate { get => (string)cbQBItems.SelectedValue; set { } }
private void SetQBClass_load(object sender, EventArgs e)
{

View File

@@ -20,8 +20,8 @@ namespace AyaNovaQBI
public DataTable QBTerms { get; set; }
public string SelectedQBTerm { get; set; }
public string SelectedQBTerm { get => (string)cbQBTerms.SelectedValue; set { } }
private void SetQBClass_load(object sender, EventArgs e)
{

View File

@@ -910,14 +910,7 @@ namespace AyaNovaQBI
//Validate any existing
if (SetEverything == false && QDat.MiscExpenseChargeAs != null && QDat.MiscExpenseChargeAs != "")
{
//if(QBItems.Rows.Contains(QDat.MiscExpenseChargeAs))
goto MISCCHARGEASOK;
// else
// {
// MessageBox.Show("The QuickBooks Item previously set for invoicing Misc. Expense items\r\n" +
// "No longer appears to be valid. You will next be prompted to re-select a valid \r\n" +
// "QuickBooks Item.");
// }
}
@@ -949,14 +942,7 @@ namespace AyaNovaQBI
//Validate any existing
if (SetEverything == false && QDat.WorkorderItemLoanChargeAs != null && QDat.WorkorderItemLoanChargeAs != "")
{
//if(QBItems.Rows.Contains(QDat.MiscExpenseChargeAs))
goto LOANCHARGEASOK;
// else
// {
// MessageBox.Show("The QuickBooks Item previously set for invoicing Misc. Expense items\r\n" +
// "No longer appears to be valid. You will next be prompted to re-select a valid \r\n" +
// "QuickBooks Item.");
// }
}
@@ -1012,10 +998,6 @@ namespace AyaNovaQBI
//also if it was empty and were not in first setup mode then
//don't bother prompting it might be the users choice.
//case 3228 commented out the following as it's a bad idea
//if (QBClasses.Rows.Count == 1 || SetEverything == false)
// goto TRCLASSOK;
//We've arrived here because there is no setting for transaction classes
//but there are some defined in QB
@@ -1309,16 +1291,19 @@ namespace AyaNovaQBI
// #endregion
// //Save if changes made
// if (QDat.IsDirty)
// {
//Save if changes made
if (QDat.IsDirty)
{
QBIntegration.IntegrationData = Newtonsoft.Json.JsonConvert.SerializeObject(QDat);
ApiResponse r = await PutAsync("integration", Newtonsoft.Json.JsonConvert.SerializeObject(QBIntegration));
QBIntegration = r.ObjectResponse["data"].ToObject<Integration>();
////Case 299
//QBI.AIObject = QDat.XMLData;
////QBI.AIObject=QDat;
//QBI = (Integration)QBI.Save();
// QDat.IsDirty = false;
// }
QDat.IsDirty = false;
}
return pfstat.OK;
}
@@ -1615,7 +1600,6 @@ namespace AyaNovaQBI
w.Ops = "Reading from QuickBooks...";
w.Step = "Classes";
await PopulateQBClassCacheAsync();
@@ -2853,8 +2837,6 @@ namespace AyaNovaQBI
#endregion quickbooks Vendors
#region QuickBooks "accounts"
@@ -3116,7 +3098,7 @@ namespace AyaNovaQBI
#endregion quickbooks Terms
#endregion
#endregion QB api helper methods end
#region AyaNova cached lists
public async static Task PopulateAyaListCache()
@@ -3256,7 +3238,6 @@ namespace AyaNovaQBI
#endregion ayanova parts
#region AyaNova WorkOrder STATUS list
private static List<WorkOrderStatus> _woStatuslist = null;