This commit is contained in:
@@ -1042,103 +1042,103 @@ namespace AyaNovaQBI
|
||||
|
||||
TRCLASSOK:
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
// #region QB InvoiceTemplate
|
||||
// //Templates are only supported in xml 3 or greater (all countries)
|
||||
// //if Set everything (first run) then display a dialog about it
|
||||
// if (QVersion < 3 && SetEverything == true)
|
||||
// {
|
||||
#region QB InvoiceTemplate
|
||||
//Templates are only supported in xml 3 or greater (all countries)
|
||||
//if Set everything (first run) then display a dialog about it
|
||||
if (QVersion > 3 && SetEverything == true)
|
||||
{
|
||||
|
||||
// SetInfoOnly s3a = new SetInfoOnly();
|
||||
// s3a.DialogTitle = "AyaNova QBI setup - Invoice template";
|
||||
// s3a.OptionTitle = "Invoice template - NOT SUPPORTED";
|
||||
// s3a.OptionDescription =
|
||||
// "QBI can use a specific QuickBooks Invoice template for printing work orders.\r\n" +
|
||||
// "However, your version of QuickBooks does not support integrating this \r\n" +
|
||||
// "feature with 3rd party applications such as AyaNova QBI.\r\n" +
|
||||
SetInfoOnly s3a = new SetInfoOnly();
|
||||
s3a.DialogTitle = "AyaNova QBI setup - Invoice template";
|
||||
s3a.OptionTitle = "Invoice template - NOT SUPPORTED";
|
||||
s3a.OptionDescription =
|
||||
"QBI can use a specific QuickBooks Invoice template for printing work orders.\r\n" +
|
||||
"However, your version of QuickBooks does not support integrating this \r\n" +
|
||||
"feature with 3rd party applications such as AyaNova QBI.\r\n" +
|
||||
|
||||
// "Supported versions of QuickBooks for using Invoice templates with QBI are:\r\n\r\n" +
|
||||
// "U.S., Canadian or U.K. QuickBooks 2004 or newer\r\n\r\n" +
|
||||
"Supported versions of QuickBooks for using Invoice templates with QBI are:\r\n\r\n" +
|
||||
"U.S., Canadian or U.K. QuickBooks 2004 or newer\r\n\r\n" +
|
||||
|
||||
// "If you upgrade your QuickBooks in future you will be able to select this option\r\n" +
|
||||
// "for now it is disabled and the default invoice template will be used";
|
||||
"If you upgrade your QuickBooks in future you will be able to select this option\r\n" +
|
||||
"for now it is disabled and the default invoice template will be used";
|
||||
|
||||
// s3a.ShowDialog();
|
||||
s3a.ShowDialog();
|
||||
|
||||
// goto TRInvoiceTemplateOK;
|
||||
// }
|
||||
goto TRInvoiceTemplateOK;
|
||||
}
|
||||
|
||||
// //Subsequent, non-setup, runs with unsupported version
|
||||
// if (QVersion < 3)
|
||||
// goto TRInvoiceTemplateOK;
|
||||
//Subsequent, non-setup, runs with unsupported version
|
||||
if (QVersion < 3)
|
||||
goto TRInvoiceTemplateOK;
|
||||
|
||||
|
||||
// //Validate any existing
|
||||
// if (QDat.QBInvoiceTemplate != null && QDat.QBInvoiceTemplate != "")
|
||||
// {
|
||||
// //if something is set but there are no InvoiceTemplates
|
||||
// //then just clear it and move along
|
||||
// if (QBInvoiceTemplates.Rows.Count == 1)
|
||||
// {
|
||||
// QDat.QBInvoiceTemplate = "";
|
||||
// goto TRInvoiceTemplateOK;
|
||||
// }
|
||||
//Validate any existing
|
||||
if (QDat.QBInvoiceTemplate != null && QDat.QBInvoiceTemplate != "")
|
||||
{
|
||||
//if something is set but there are no InvoiceTemplates
|
||||
//then just clear it and move along
|
||||
if (QBInvoiceTemplates.Rows.Count == 1)
|
||||
{
|
||||
QDat.QBInvoiceTemplate = "";
|
||||
goto TRInvoiceTemplateOK;
|
||||
}
|
||||
|
||||
// //Something is set and there *are* tr InvoiceTemplates so
|
||||
// //let's validate it...
|
||||
// if (QBInvoiceTemplates.Rows.Contains(QDat.QBInvoiceTemplate))
|
||||
// {
|
||||
// if (!SetEverything)
|
||||
// goto TRInvoiceTemplateOK;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// MessageBox.Show("The QuickBooks Invoice Template 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* tr InvoiceTemplates so
|
||||
//let's validate it...
|
||||
if (QBInvoiceTemplates.Rows.Contains(QDat.QBInvoiceTemplate))
|
||||
{
|
||||
if (!SetEverything)
|
||||
goto TRInvoiceTemplateOK;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("The QuickBooks Invoice Template previously set for invoicing\r\n" +
|
||||
"no longer appears to be valid. You will next be prompted to re-select it.");
|
||||
}
|
||||
}
|
||||
|
||||
// //Perhaps there are no InvoiceTemplates, this is the default
|
||||
// //if not then don't prompt for it obviously :)
|
||||
// //also if it was empty and were not in first setup mode then
|
||||
// //don't bother prompting it might be the users choice.
|
||||
// //todo: make something besides and empty string to indicate
|
||||
// //deliberately non selected items
|
||||
// if (QBInvoiceTemplates.Rows.Count == 1 || SetEverything == false)
|
||||
// goto TRInvoiceTemplateOK;
|
||||
//Perhaps there are no InvoiceTemplates, this is the default
|
||||
//if not then don't prompt for it obviously :)
|
||||
//also if it was empty and were not in first setup mode then
|
||||
//don't bother prompting it might be the users choice.
|
||||
//todo: make something besides and empty string to indicate
|
||||
//deliberately non selected items
|
||||
if (QBInvoiceTemplates.Rows.Count == 1 || SetEverything == false)
|
||||
goto TRInvoiceTemplateOK;
|
||||
|
||||
|
||||
// //We've arrived here because there is no setting for InvoiceTemplates
|
||||
// //Or the user want's to change it
|
||||
// //and there are some defined in QB
|
||||
// SetQBInvoiceTemplate s3b = new SetQBInvoiceTemplate();
|
||||
// s3b.DialogTitle = "AyaNova QBI setup - Invoice template";
|
||||
// s3b.OptionTitle = "Invoice template";
|
||||
// s3b.OptionDescription = "QBI needs to know what QuickBooks Invoice template you want \r\n" +
|
||||
// "QBI to set for invoices created from Work orders.\r\n\r\n" +
|
||||
// "QuickBooks Invoice templates are used in QuickBooks to specify different print formats\r\n" +
|
||||
// "for invoices. If you do not use Invoice templates or are not sure what they are\r\n" +
|
||||
// "select < Use default > from the list below.\r\n\r\n" +
|
||||
// "This setting is required.";
|
||||
// s3b.QBInvoiceTemplates = QBInvoiceTemplates;
|
||||
//We've arrived here because there is no setting for InvoiceTemplates
|
||||
//Or the user want's to change it
|
||||
//and there are some defined in QB
|
||||
SetQBInvoiceTemplate s3b = new SetQBInvoiceTemplate();
|
||||
s3b.DialogTitle = "AyaNova QBI setup - Invoice template";
|
||||
s3b.OptionTitle = "Invoice template";
|
||||
s3b.OptionDescription = "QBI needs to know what QuickBooks Invoice template you want \r\n" +
|
||||
"QBI to set for invoices created from Work orders.\r\n\r\n" +
|
||||
"QuickBooks Invoice templates are used in QuickBooks to specify different print formats\r\n" +
|
||||
"for invoices. If you do not use Invoice templates or are not sure what they are\r\n" +
|
||||
"select < Use default > from the list below.\r\n\r\n" +
|
||||
"This setting is required.";
|
||||
s3b.QBInvoiceTemplates = QBInvoiceTemplates;
|
||||
|
||||
// s3b.SelectedQBInvoiceTemplate = QDat.QBInvoiceTemplate;
|
||||
s3b.SelectedQBInvoiceTemplate = QDat.QBInvoiceTemplate;
|
||||
|
||||
// if (s3b.ShowDialog() == DialogResult.Cancel)
|
||||
// {
|
||||
// return pfstat.Cancel;
|
||||
if (s3b.ShowDialog() == DialogResult.Cancel)
|
||||
{
|
||||
return pfstat.Cancel;
|
||||
|
||||
// }
|
||||
// else
|
||||
// QDat.QBInvoiceTemplate = s3b.SelectedQBInvoiceTemplate;
|
||||
// s3b.Dispose();
|
||||
// s3b = null;
|
||||
}
|
||||
else
|
||||
QDat.QBInvoiceTemplate = s3b.SelectedQBInvoiceTemplate;
|
||||
s3b.Dispose();
|
||||
s3b = null;
|
||||
|
||||
//TRInvoiceTemplateOK:
|
||||
TRInvoiceTemplateOK:
|
||||
|
||||
|
||||
// #endregion
|
||||
#endregion
|
||||
|
||||
// #region QB Terms
|
||||
|
||||
|
||||
Reference in New Issue
Block a user