This commit is contained in:
@@ -21,7 +21,21 @@ namespace AyaNovaQBI
|
||||
|
||||
public DataTable QBInvoiceTemplates { get; set; }
|
||||
|
||||
public string SelectedQBInvoiceTemplate { get => (string)cbQBItems.SelectedValue; set { } }
|
||||
|
||||
|
||||
public string SelectedQBInvoiceTemplate
|
||||
{
|
||||
get
|
||||
{
|
||||
return _selectedQBInvoiceTemplate;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_selectedQBInvoiceTemplate = value;
|
||||
}
|
||||
}
|
||||
private string _selectedQBInvoiceTemplate;
|
||||
|
||||
private void SetQBClass_load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -35,6 +49,11 @@ namespace AyaNovaQBI
|
||||
cbQBItems.DisplayMember = "FullName";
|
||||
cbQBItems.ValueMember = "ID";
|
||||
lblStatus.Text = "QuickBooks invoice template:";
|
||||
|
||||
if (string.IsNullOrWhiteSpace(_selectedQBInvoiceTemplate))
|
||||
cbQBItems.SelectedIndex = 0;
|
||||
else
|
||||
this.cbQBItems.SelectedValue = _selectedQBInvoiceTemplate;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,20 @@ namespace AyaNovaQBI
|
||||
|
||||
public DataTable QBTerms { get; set; }
|
||||
|
||||
public string SelectedQBTerm { get => (string)cbQBTerms.SelectedValue; set { } }
|
||||
|
||||
public string SelectedQBTerm
|
||||
{
|
||||
get
|
||||
{
|
||||
return _selectedQBTerm;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_selectedQBTerm = value;
|
||||
}
|
||||
}
|
||||
private string _selectedQBTerm;
|
||||
|
||||
private void SetQBClass_load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -996,7 +996,7 @@ namespace AyaNovaQBI
|
||||
|
||||
#region QB Transaction class
|
||||
//Validate any existing
|
||||
if (SetEverything == false && QDat.TransactionClass != null && QDat.TransactionClass != "")
|
||||
if (SetEverything == false && !string.IsNullOrWhiteSpace(QDat.TransactionClass))
|
||||
{
|
||||
//if something is set but there are no tr classes
|
||||
//then just clear it and move along
|
||||
@@ -1076,7 +1076,6 @@ namespace AyaNovaQBI
|
||||
"for now it is disabled and the default invoice template will be used";
|
||||
|
||||
s3a.ShowDialog();
|
||||
|
||||
goto TRInvoiceTemplateOK;
|
||||
}
|
||||
|
||||
@@ -1133,7 +1132,6 @@ namespace AyaNovaQBI
|
||||
"select < Use default > from the list below.\r\n\r\n" +
|
||||
"This setting is required.";
|
||||
s3b.QBInvoiceTemplates = QBInvoiceTemplates;
|
||||
|
||||
s3b.SelectedQBInvoiceTemplate = QDat.QBInvoiceTemplate;
|
||||
|
||||
if (s3b.ShowDialog() == DialogResult.Cancel)
|
||||
@@ -1195,7 +1193,6 @@ namespace AyaNovaQBI
|
||||
"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;
|
||||
|
||||
if (termsdialog.ShowDialog() == DialogResult.Cancel)
|
||||
@@ -1221,10 +1218,6 @@ namespace AyaNovaQBI
|
||||
goto TBPOK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
SetToBePrinted s4 = new SetToBePrinted();
|
||||
s4.DialogTitle = "AyaNova QBI setup - Set invoice to be printed?";
|
||||
s4.OptionTitle = "Invoice to be printed";
|
||||
@@ -1257,7 +1250,6 @@ namespace AyaNovaQBI
|
||||
goto SETMEMOOK;
|
||||
}
|
||||
|
||||
|
||||
SetMemoField s5 = new SetMemoField();
|
||||
s5.DialogTitle = "AyaNova QBI setup - Set Memo field?";
|
||||
s5.OptionTitle = "Invoice memo field";
|
||||
|
||||
Reference in New Issue
Block a user