diff --git a/AyaNovaQBI/ApproveCompanyFile.Designer.cs b/AyaNovaQBI/ApproveCompanyFile.Designer.cs
index 5bddbca..03ecb84 100644
--- a/AyaNovaQBI/ApproveCompanyFile.Designer.cs
+++ b/AyaNovaQBI/ApproveCompanyFile.Designer.cs
@@ -98,6 +98,7 @@
this.Controls.Add(this.lblCompany);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ApproveCompanyFile";
+ this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "ApproveCompanyFile";
this.Load += new System.EventHandler(this.ApproveCompanyFile_Load);
diff --git a/AyaNovaQBI/AyaNovaQBI.csproj b/AyaNovaQBI/AyaNovaQBI.csproj
index 62e595d..2d551a9 100644
--- a/AyaNovaQBI/AyaNovaQBI.csproj
+++ b/AyaNovaQBI/AyaNovaQBI.csproj
@@ -129,6 +129,12 @@
SetQBInvoiceTemplate.cs
+
+ Form
+
+
+ SetQBTerms.cs
+
Form
@@ -185,6 +191,9 @@
SetQBInvoiceTemplate.cs
+
+ SetQBTerms.cs
+
SetWOStatus.cs
diff --git a/AyaNovaQBI/SetInfoOnly.Designer.cs b/AyaNovaQBI/SetInfoOnly.Designer.cs
index ce6002a..9086e95 100644
--- a/AyaNovaQBI/SetInfoOnly.Designer.cs
+++ b/AyaNovaQBI/SetInfoOnly.Designer.cs
@@ -84,6 +84,7 @@
this.Controls.Add(this.btnCancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "SetInfoOnly";
+ this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SetInfoOnly";
this.Load += new System.EventHandler(this.SetQBClass_load);
diff --git a/AyaNovaQBI/SetQBChargeAs.Designer.cs b/AyaNovaQBI/SetQBChargeAs.Designer.cs
index 6d95f9b..d8d6768 100644
--- a/AyaNovaQBI/SetQBChargeAs.Designer.cs
+++ b/AyaNovaQBI/SetQBChargeAs.Designer.cs
@@ -107,6 +107,7 @@
this.Controls.Add(this.btnCancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "SetQBChargeAs";
+ this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SetQBChargeAs";
this.Load += new System.EventHandler(this.SetQBChargeAsLoad);
diff --git a/AyaNovaQBI/SetQBClass.Designer.cs b/AyaNovaQBI/SetQBClass.Designer.cs
index 7d99ff0..34569d1 100644
--- a/AyaNovaQBI/SetQBClass.Designer.cs
+++ b/AyaNovaQBI/SetQBClass.Designer.cs
@@ -107,6 +107,7 @@
this.Controls.Add(this.btnCancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "SetQBClass";
+ this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SetQBClass";
this.Load += new System.EventHandler(this.SetQBClass_load);
diff --git a/AyaNovaQBI/SetQBInvoiceTemplate.Designer.cs b/AyaNovaQBI/SetQBInvoiceTemplate.Designer.cs
index bb2d1c1..281f7dc 100644
--- a/AyaNovaQBI/SetQBInvoiceTemplate.Designer.cs
+++ b/AyaNovaQBI/SetQBInvoiceTemplate.Designer.cs
@@ -107,6 +107,7 @@
this.Controls.Add(this.btnCancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "SetQBInvoiceTemplate";
+ this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SetQBInvoiceTemplate";
this.Load += new System.EventHandler(this.SetQBClass_load);
diff --git a/AyaNovaQBI/SetQBTerms.Designer.cs b/AyaNovaQBI/SetQBTerms.Designer.cs
new file mode 100644
index 0000000..1c9badd
--- /dev/null
+++ b/AyaNovaQBI/SetQBTerms.Designer.cs
@@ -0,0 +1,128 @@
+namespace AyaNovaQBI
+{
+ partial class SetQBTerms
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.btnOK = new System.Windows.Forms.Button();
+ this.btnCancel = new System.Windows.Forms.Button();
+ this.lblTitle = new System.Windows.Forms.Label();
+ this.lblDescription = new System.Windows.Forms.Label();
+ this.lblStatus = new System.Windows.Forms.Label();
+ this.cbQBTerms = new System.Windows.Forms.ComboBox();
+ this.SuspendLayout();
+ //
+ // btnOK
+ //
+ this.btnOK.Location = new System.Drawing.Point(550, 368);
+ this.btnOK.Name = "btnOK";
+ this.btnOK.Size = new System.Drawing.Size(75, 23);
+ this.btnOK.TabIndex = 6;
+ this.btnOK.Text = "OK";
+ this.btnOK.UseVisualStyleBackColor = true;
+ this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
+ //
+ // btnCancel
+ //
+ this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnCancel.Location = new System.Drawing.Point(4, 368);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.TabIndex = 5;
+ this.btnCancel.Text = "Cancel";
+ this.btnCancel.UseVisualStyleBackColor = true;
+ //
+ // lblTitle
+ //
+ this.lblTitle.Dock = System.Windows.Forms.DockStyle.Top;
+ this.lblTitle.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblTitle.Location = new System.Drawing.Point(0, 0);
+ this.lblTitle.Name = "lblTitle";
+ this.lblTitle.Size = new System.Drawing.Size(637, 30);
+ this.lblTitle.TabIndex = 7;
+ //
+ // lblDescription
+ //
+ this.lblDescription.Dock = System.Windows.Forms.DockStyle.Top;
+ this.lblDescription.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblDescription.Location = new System.Drawing.Point(0, 30);
+ this.lblDescription.Name = "lblDescription";
+ this.lblDescription.Size = new System.Drawing.Size(637, 165);
+ this.lblDescription.TabIndex = 8;
+ //
+ // lblStatus
+ //
+ this.lblStatus.AutoSize = true;
+ this.lblStatus.Dock = System.Windows.Forms.DockStyle.Top;
+ this.lblStatus.Location = new System.Drawing.Point(0, 195);
+ this.lblStatus.Name = "lblStatus";
+ this.lblStatus.Size = new System.Drawing.Size(0, 13);
+ this.lblStatus.TabIndex = 10;
+ //
+ // cbQBTerms
+ //
+ this.cbQBTerms.Dock = System.Windows.Forms.DockStyle.Top;
+ this.cbQBTerms.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.cbQBTerms.FormattingEnabled = true;
+ this.cbQBTerms.Location = new System.Drawing.Point(0, 208);
+ this.cbQBTerms.Name = "cbQBTerms";
+ this.cbQBTerms.Size = new System.Drawing.Size(637, 21);
+ this.cbQBTerms.TabIndex = 11;
+ //
+ // SetQBTerms
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.btnCancel;
+ this.ClientSize = new System.Drawing.Size(637, 403);
+ this.Controls.Add(this.cbQBTerms);
+ this.Controls.Add(this.lblStatus);
+ this.Controls.Add(this.lblDescription);
+ this.Controls.Add(this.lblTitle);
+ this.Controls.Add(this.btnOK);
+ this.Controls.Add(this.btnCancel);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+ this.Name = "SetQBTerms";
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "SetQBTerms";
+ this.Load += new System.EventHandler(this.SetQBClass_load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button btnOK;
+ private System.Windows.Forms.Button btnCancel;
+ private System.Windows.Forms.Label lblTitle;
+ private System.Windows.Forms.Label lblDescription;
+ private System.Windows.Forms.Label lblStatus;
+ private System.Windows.Forms.ComboBox cbQBTerms;
+ }
+}
\ No newline at end of file
diff --git a/AyaNovaQBI/SetQBTerms.cs b/AyaNovaQBI/SetQBTerms.cs
new file mode 100644
index 0000000..5d535ab
--- /dev/null
+++ b/AyaNovaQBI/SetQBTerms.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+
+namespace AyaNovaQBI
+{
+ public partial class SetQBTerms : Form
+ {
+ public SetQBTerms()
+ {
+ InitializeComponent();
+ }
+
+
+ public string DialogTitle { get; set; }
+
+ public string OptionTitle { get; set; }
+
+ public string OptionDescription { get; set; }
+
+
+ public DataTable QBTerms { get; set; }
+ public string SelectedQBTerm { get; set; }
+
+
+ private void SetQBClass_load(object sender, EventArgs e)
+ {
+ Text = DialogTitle;
+ lblDescription.Text = OptionDescription;
+ lblTitle.Text = OptionTitle;
+ btnCancel.Text = util.AyaTranslations["Cancel"];
+ btnOK.Text = util.AyaTranslations["OK"];
+
+ cbQBTerms.DataSource = QBTerms;
+ cbQBTerms.DisplayMember = "FullName";
+ cbQBTerms.ValueMember = "ID";
+ if (SelectedQBTerm == "")
+ cbQBTerms.SelectedIndex = 0;
+ else
+ this.cbQBTerms.SelectedValue = SelectedQBTerm;
+
+ lblStatus.Text = "QuickBooks invoice terms default";
+
+ }
+
+
+ private void btnOK_Click(object sender, EventArgs e)
+ {
+
+ DialogResult = DialogResult.OK;
+ Close();
+ }
+ }
+}
diff --git a/AyaNovaQBI/SetQBTerms.resx b/AyaNovaQBI/SetQBTerms.resx
new file mode 100644
index 0000000..29dcb1b
--- /dev/null
+++ b/AyaNovaQBI/SetQBTerms.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/AyaNovaQBI/SetWOStatus.Designer.cs b/AyaNovaQBI/SetWOStatus.Designer.cs
index 67886f5..e24343d 100644
--- a/AyaNovaQBI/SetWOStatus.Designer.cs
+++ b/AyaNovaQBI/SetWOStatus.Designer.cs
@@ -107,6 +107,7 @@
this.Controls.Add(this.btnCancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "SetWOStatus";
+ this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SetWOStatus";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SetWOStatus_FormClosing);
diff --git a/AyaNovaQBI/util.cs b/AyaNovaQBI/util.cs
index 49c184f..e30bad4 100644
--- a/AyaNovaQBI/util.cs
+++ b/AyaNovaQBI/util.cs
@@ -1140,67 +1140,67 @@ namespace AyaNovaQBI
#endregion
- // #region QB Terms
+ #region QB Terms
- // //Validate any existing
- // //case 3228 added extra condition set everything is false
- // if (SetEverything == false && !string.IsNullOrEmpty(QDat.TermsDefault))
- // {
- // //if something is set but there are no terms
- // //then just clear it and move along
- // if (QBTerms.Rows.Count == 1)
- // {
- // QDat.TermsDefault = "";
- // goto TermsOK;
- // }
+ //Validate any existing
+ //case 3228 added extra condition set everything is false
+ if (SetEverything == false && !string.IsNullOrEmpty(QDat.TermsDefault))
+ {
+ //if something is set but there are no terms
+ //then just clear it and move along
+ if (QBTerms.Rows.Count == 1)
+ {
+ QDat.TermsDefault = "";
+ goto TermsOK;
+ }
- // //Something is set and there *are* terms so
- // //let's validate it...
- // if (QBTerms.Rows.Contains(QDat.TermsDefault))
- // {
- // if (!SetEverything)
- // goto TermsOK;
- // }
- // else
- // {
- // MessageBox.Show("The QuickBooks default terms previously set for invoicing\r\n" +
- // "no longer appears to be valid. You will next be prompted to re-select it.");
- // }
- // }
+ //Something is set and there *are* terms so
+ //let's validate it...
+ if (QBTerms.Rows.Contains(QDat.TermsDefault))
+ {
+ if (!SetEverything)
+ goto TermsOK;
+ }
+ else
+ {
+ MessageBox.Show("The QuickBooks default terms previously set for invoicing\r\n" +
+ "no longer appears to be valid. You will next be prompted to re-select it.");
+ }
+ }
- // //We've arrived here because there is no setting for Terms
- // //Or the user want's to change it
- // //and there are some defined in QB
- // SetQBTerms termsdialog = new SetQBTerms();
- // termsdialog.DialogTitle = "AyaNova QBI setup - Customer default invoice terms";
- // termsdialog.OptionTitle = "Default terms";
- // termsdialog.OptionDescription = "QBI needs to know what QuickBooks terms you want \r\n" +
- // "QBI to set for customers imported from AyaNova.\r\n\r\n" +
- // "When an invoice for a customer is created the selected terms will be applied.\r\n\r\n" +
- // "This setting is required.";
- // termsdialog.QBTerms = QBTerms;
+ //We've arrived here because there is no setting for Terms
+ //Or the user want's to change it
+ //and there are some defined in QB
+ SetQBTerms termsdialog = new SetQBTerms();
+ termsdialog.DialogTitle = "AyaNova QBI setup - Customer default invoice terms";
+ termsdialog.OptionTitle = "Default terms";
+ termsdialog.OptionDescription = "QBI needs to know what QuickBooks terms you want \r\n" +
+ "QBI to set for customers imported from AyaNova.\r\n\r\n" +
+ "When an invoice for a customer is created the selected terms will be applied.\r\n\r\n" +
+ "This setting is required.";
+ termsdialog.QBTerms = QBTerms;
- // termsdialog.SelectedQBTerm = QDat.TermsDefault;
+ termsdialog.SelectedQBTerm = QDat.TermsDefault;
- // if (termsdialog.ShowDialog() == DialogResult.Cancel)
- // {
- // return pfstat.Cancel;
+ if (termsdialog.ShowDialog() == DialogResult.Cancel)
+ {
+ return pfstat.Cancel;
- // }
- // else
- // QDat.TermsDefault = termsdialog.SelectedQBTerm;
- // termsdialog.Dispose();
- // termsdialog = null;
+ }
+ else
+ QDat.TermsDefault = termsdialog.SelectedQBTerm;
+ termsdialog.Dispose();
+ termsdialog = null;
- //TermsOK:
+ TermsOK:
- // #endregion
+ #endregion
// #region ToBePrinted
// //No validation possible