''' <summary>
''' QuickBooks connection needs to be open first.
''' Get Invoice Record Count. Returns number of records in QuickBooks
''' In case of error returns: will return -1
''' </summary>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceRecordCount(Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As Integer
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get All Invoice. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' NOTE: IF YOU HAVE TOO MANY RECORDS GET Invoice BY DATERANGE
''' </summary>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetAllInvoice(Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get Invoice By TxnIDs. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' NOTE: IF YOU HAVE TOO MANY RECORDS GET Invoice BY DATERANGE
''' </summary>
''' <param name="TxnID">TxnID of the Invoice</param>
''' <param name="TxnIDs">TxnIDs of the Invoice</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceByTxnIDs(ByVal TxnID As String, Optional ByVal TxnIDs As List(Of String) = Nothing, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get Invoice By RefNumbers. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' NOTE: IF YOU HAVE TOO MANY RECORDS GET Invoice BY DATERANGE
''' </summary>
''' <param name="RefNumber">RefNumber of the Invoice</param>
''' <param name="RefNumbers">RefNumbers of the Invoice</param>
''' <param name="RefNumberCaseSensitive">set to true to check for Case Sensitive spelling</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceByRefNumbers(ByVal RefNumber As String, Optional ByVal RefNumbers As List(Of String) = Nothing, Optional ByVal RefNumberCaseSensitive As Boolean = False, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get Invoice Modified Date Range. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' </summary>
''' <param name="FromModifiedDate">FromDate</param>
''' <param name="ToModifiedDate">ToDate</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceModifiedDateRange(ByVal FromModifiedDate As DateTime, ByVal ToModifiedDate As DateTime, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get Invoice Txn Date Range. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' </summary>
''' <param name="FromTxnDate">FromDate</param>
''' <param name="ToTxnDate">ToDate</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceTxnDateRange(ByVal FromTxnDate As DateTime, ByVal ToTxnDate As DateTime, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get Invoice Txn Date Macro. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' </summary>
''' <param name="DateMacro">qbDateMacro enum. Values(All, Today, ThisWeek, ThisWeekToDate, ThisMonth, ThisMonthToDate, ThisCalendarQuarter, ThisCalendarQuarterToDate, ThisFiscalQuarter, ThisFiscalQuarterToDate, ThisCalendarYear, ThisCalendarYearToDate, ThisFiscalYear, ThisFiscalYearToDate, Yesterday, LastWeek, LastWeekToDate, LastMonth, LastMonthToDate, LastCalendarQuarter, LastCalendarQuarterToDate, LastFiscalQuarter, LastFiscalQuarterToDate, LastCalendarYear, LastCalendarYearToDate, LastFiscalYear, LastFiscalYearToDate, NextWeek, NextFourWeeks, NextMonth, NextCalendarQuarter, NextCalendarYear, NextFiscalQuarter, NextFiscalYear)</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceTxnDateMacro(ByVal DateMacro As qbDateMacro, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get InvoiceBy Entity ListIDs. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' An entity refers to a person on the QuickBooks Customer list, Vendor list, Invoice list, or Other Names list
''' </summary>
''' <param name="ListID">Entities ListID</param>
''' <param name="ListIDs">Entities ListIDs</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceByEntityListIDs(ByVal ListID As String, Optional ByVal ListIDs As List(Of String) = Nothing, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get InvoiceBy Entity FullNames. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' An entity refers to a person on the QuickBooks Customer list, Vendor list, Invoice list, or Other Names list
''' </summary>
''' <param name="FullName">Entities FullName</param>
''' <param name="FullNames">Entities FullNames</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceByEntityFullNames(ByVal FullName As String, Optional ByVal FullNames As List(Of String) = Nothing, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get InvoiceBy Entity ListIDWithChildren. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' An entity refers to a person on the QuickBooks Customer list, Vendor list, Invoice list, or Other Names list
''' </summary>
''' <param name="ListIDWithChildren">Entity ListIDWithChildren</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceByEntityListIDWithChildren(ByVal ListIDWithChildren As String, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get InvoiceBy Entity FullNameWithChildren. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' An entity refers to a person on the QuickBooks Customer list, Vendor list, Invoice list, or Other Names list
''' </summary>
''' <param name="FullNameWithChildren">Entity FullNameWithChildren</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceByEntityFullNameWithChildren(ByVal FullNameWithChildren As String, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get InvoiceBy Account ListIDs. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' Filters according to the account name or ListID. If the "Use account numbers" preference is enabled in the QuickBooks company file, you can specify an account number (instead of an account name) for FullName and get the account you're looking for.
''' But if numbers have been used as account names, confusion could arise. For example, if you queried for an account named 2050, and 2050 happened to be the account number of a totally different account, the query would not return what you asked for (the account named 2050), but instead would return the account with the account number 2050.
''' This problem will not happen if the "Use account numbers" preference Is turned off in the QuickBooks file, Or the account name exactly matches the account number. (In this Case, query would Return the correct account either way.)
''' To avoid this problem:
''' Do not name an account using a number unless the number exactly matches the accounts account number.
''' If an account name must contain a number that does not match its own account number, have the QuickBooks user change the accounts name slightly, for example to 2050a.
''' </summary>
''' <param name="ListID">Entities ListID</param>
''' <param name="ListIDs">Entities ListIDs</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceByAccountListIDs(ByVal ListID As String, Optional ByVal ListIDs As List(Of String) = Nothing, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get InvoiceBy Account ListIDs. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' Filters according to the account name or ListID. If the "Use account numbers" preference is enabled in the QuickBooks company file, you can specify an account number (instead of an account name) for FullName and get the account you're looking for.
''' But if numbers have been used as account names, confusion could arise. For example, if you queried for an account named 2050, and 2050 happened to be the account number of a totally different account, the query would not return what you asked for (the account named 2050), but instead would return the account with the account number 2050.
''' This problem will not happen if the "Use account numbers" preference Is turned off in the QuickBooks file, Or the account name exactly matches the account number. (In this Case, query would Return the correct account either way.)
''' To avoid this problem:
''' Do not name an account using a number unless the number exactly matches the accounts account number.
''' If an account name must contain a number that does not match its own account number, have the QuickBooks user change the accounts name slightly, for example to 2050a.
''' </summary>
''' <param name="FullName">Entities FullName</param>
''' <param name="FullNames">Entities FullNames</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceByAccountFullNames(ByVal FullName As String, Optional ByVal FullNames As List(Of String) = Nothing, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get InvoiceBy Account ListIDs. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' Filters according to the account name or ListID. If the "Use account numbers" preference is enabled in the QuickBooks company file, you can specify an account number (instead of an account name) for FullName and get the account you're looking for.
''' But if numbers have been used as account names, confusion could arise. For example, if you queried for an account named 2050, and 2050 happened to be the account number of a totally different account, the query would not return what you asked for (the account named 2050), but instead would return the account with the account number 2050.
''' This problem will not happen if the "Use account numbers" preference Is turned off in the QuickBooks file, Or the account name exactly matches the account number. (In this Case, query would Return the correct account either way.)
''' To avoid this problem:
''' Do not name an account using a number unless the number exactly matches the accounts account number.
''' If an account name must contain a number that does not match its own account number, have the QuickBooks user change the accounts name slightly, for example to 2050a.
''' </summary>
''' <param name="ListIDWithChildren">Account ListIDWithChildren</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceByAccountListIDWithChildren(ByVal ListIDWithChildren As String, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get InvoiceBy Account ListIDs. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' Filters according to the account name or ListID. If the "Use account numbers" preference is enabled in the QuickBooks company file, you can specify an account number (instead of an account name) for FullName and get the account you're looking for.
''' But if numbers have been used as account names, confusion could arise. For example, if you queried for an account named 2050, and 2050 happened to be the account number of a totally different account, the query would not return what you asked for (the account named 2050), but instead would return the account with the account number 2050.
''' This problem will not happen if the "Use account numbers" preference Is turned off in the QuickBooks file, Or the account name exactly matches the account number. (In this Case, query would Return the correct account either way.)
''' To avoid this problem:
''' Do not name an account using a number unless the number exactly matches the accounts account number.
''' If an account name must contain a number that does not match its own account number, have the QuickBooks user change the accounts name slightly, for example to 2050a.
''' </summary>
''' <param name="FullNameWithChildren">Account FullNameWithChildren</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceByAccountFullNameWithChildren(ByVal FullNameWithChildren As String, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get Invoice By RefNumber Match. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' NOTE: IF YOU HAVE TOO MANY RECORDS GET Invoice BY DATERANGE
''' </summary>
''' <param name="RefNumber">RefNumber of the Invoice. If it is one RefNumbers, just add one RefNumbers to the List(Of String)</param>
''' <param name="MatchCriterion">qbMatchCriterion enum. Values(StartsWith, Contains, EndsWith)</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceByRefNumberMatch(ByVal RefNumber As String, ByVal MatchCriterion As qbMatchCriterion, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Get Invoice By RefNumber Range. Returns List(Of Invoice)
''' In case of error returns: new List(Of Invoice)
''' NOTE: IF YOU HAVE TOO MANY RECORDS GET Invoice BY DATERANGE
''' </summary>
''' <param name="FromRefNumber">FromRefNumber</param>
''' <param name="ToRefNumber">ToRefNumber</param>
''' <param name="IncludeLineItems">includes line items</param>
''' <param name="IncludeLinkedTxns">includes Txns Linked</param>
''' <param name="PaidStatus">qbPaidStatus enum. Values(All [DEFAULT], PaidOnly, NotPaidOnly)</param>
''' <param name="MaxReturned">max number of records to get</param>
''' <param name="errorMsg">returned error message</param>
Public Function GetInvoiceByRefNumberRange(ByVal FromRefNumber As String, ByVal ToRefNumber As String, Optional ByVal IncludeLineItems As Boolean = False, Optional ByVal IncludeLinkedTxns As Boolean = False, Optional ByVal PaidStatus As qbPaidStatus = qbPaidStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Invoice)
''' <summary>
''' It will delete the record from QuickBooks.
''' Once deleted, there is no way to retrieve
''' </summary>
''' <param name="TxnID">to add new records to QB set TxnID to a temporal one</param>
''' <param name="errorMsg">returned error message</param>
Public Function DeleteInvoiceFromQuickBooksByTxnID(ByVal TxnID As String, Optional ByRef errorMsg As String = "") As Boolean
''' <summary>
''' It will add Invoices to QuickBooks.
''' Operation field needs to be set update, add, or delete to update QuickBooks
''' if the Operation is empty, fields will be skipped
''' Returns a List(Of Invoice) updated by QuickBooks
''' </summary>
''' <param name="_Invoice">the record that you want to be updated in QuickBooks</param>
''' <param name="_InvoiceList">add all the record to the list that you want to be updated in QuickBooks</param>
Public Function UpdateQuickBooks(ByVal _Invoice As Invoice, Optional ByVal _InvoiceList As List(Of Invoice) = Nothing) As List(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Starts record-data block. Returns a Queue(Of Invoice)
''' After calling this method you need to call ContinueRecordAndDataBlock
''' In case of error returns: new Queue(Of Invoice)
''' </summary>
''' <param name="MaxReturnedPerRequest">max number of records to get per request</param>
''' <param name="TotalRecordNumber">total record number that can be query from QuickBooks</param>
''' <param name="ReturnedRecordNumber">record number already returned</param>
''' <param name="RemainingRecordNumber">Remaining Record Number after each call</param>
''' <param name="errorMsg">returned error message</param>
Public Function StartRecordAndDataBlock(ByVal MaxReturnedPerRequest As Integer, Optional ByRef errorMsg As String = "", Optional ByRef TotalRecordNumber As Integer = 0, Optional ByRef ReturnedRecordNumber As Integer = 0, Optional ByRef RemainingRecordNumber As Integer = 0) As Queue(Of Invoice)
''' <summary>
''' QuickBooks connection needs to be open first.
''' Continue record-data block. Returns a Queue(Of Invoice)
''' Call this method until RemainingRecordNumber zero or less
''' In case of error returns: new Queue(Of Invoice)
''' </summary>
''' <param name="TotalRecordNumber">total record number that can be query from QuickBooks</param>
''' <param name="ReturnedRecordNumber">record number already returned</param>
''' <param name="RemainingRecordNumber">Remaining Record Number after each call</param>
''' <param name="errorMsg">returned error message</param>
Public Function ContinueRecordAndDataBlock(Optional ByRef errorMsg As String = "", Optional ByRef TotalRecordNumber As Integer = 0, Optional ByRef ReturnedRecordNumber As Integer = 0, Optional ByRef RemainingRecordNumber As Integer = 0) As Queue(Of Invoice)
Invoice
Public linkedTxnList As New List(Of LinkedTxn)
Public invoiceLineRetList As New List(Of InvoiceLineRet)
Public invoiceLineGroupRetList As New List(Of InvoiceLineGroupRet)
Public TxnID As String = ""
Public TimeCreated As String = ""
Public TimeModified As String = ""
Public EditSequence As String = ""
Public TxnNumber As String = ""
Public CustomerRef_ListID As String = ""
Public CustomerRef_FullName As String = ""
Public ClassRef_ListID As String = ""
Public ClassRef_FullName As String = ""
Public ARAccountRef_ListID As String = ""
Public ARAccountRef_FullName As String = ""
Public TemplateRef_ListID As String = ""
Public TemplateRef_FullName As String = ""
Public TxnDate As String = ""
Public RefNumber As String = ""
Public BillAddress_Addr1 As String = ""
Public BillAddress_Addr2 As String = ""
Public BillAddress_Addr3 As String = ""
Public BillAddress_Addr4 As String = ""
Public BillAddress_Addr5 As String = ""
Public BillAddress_City As String = ""
Public BillAddress_State As String = ""
Public BillAddress_PostalCode As String = ""
Public BillAddress_Country As String = ""
Public BillAddress_Note As String = ""
Public ShipAddress_Addr1 As String = ""
Public ShipAddress_Addr2 As String = ""
Public ShipAddress_Addr3 As String = ""
Public ShipAddress_Addr4 As String = ""
Public ShipAddress_Addr5 As String = ""
Public ShipAddress_City As String = ""
Public ShipAddress_State As String = ""
Public ShipAddress_PostalCode As String = ""
Public ShipAddress_Country As String = ""
Public ShipAddress_Note As String = ""
Public IsPending As String = ""
Public IsFinanceCharge As String = ""
Public PONumber As String = ""
Public TermsRef_ListID As String = ""
Public TermsRef_FullName As String = ""
Public DueDate As String = ""
Public SalesRepRef_ListID As String = ""
Public SalesRepRef_FullName As String = ""
Public FOB As String = ""
Public ShipDate As String = ""
Public ShipMethodRef_ListID As String = ""
Public ShipMethodRef_FullName As String = ""
Public Subtotal As String = ""
Public ItemSalesTaxRef_ListID As String = ""
Public ItemSalesTaxRef_FullName As String = ""
Public SalesTaxPercentage As String = ""
Public SalesTaxTotal As String = ""
Public AppliedAmount As String = ""
Public BalanceRemaining As String = ""
Public CurrencyRef_ListID As String = ""
Public CurrencyRef_FullName As String = ""
Public ExchangeRate As String = ""
Public BalRemainingInHomeCurrency As String = ""
Public Memo As String = ""
Public IsPaid As String = ""
Public CustomerMsgRef_ListID As String = ""
Public CustomerMsgRef_FullName As String = ""
Public IsToBePrinted As String = ""
Public IsToBeEmailed As String = ""
Public IsTaxIncluded As String = ""
Public CustSalesTaxCodeRef_ListID As String = ""
Public CustSalesTaxCodeRef_FullName As String = ""
Public SuggestedDiscountAmount As String = ""
Public SuggestedDiscountDate As String = ""
Public Other As String = ""
Public CustomField1 As String = ""
Public CustomField2 As String = ""
Public CustomField3 As String = ""
Public CustomField4 As String = ""
Public CustomField5 As String = ""
Public CustomField6 As String = ""
Public CustomField7 As String = ""
Public CustomField8 As String = ""
Public CustomField9 As String = ""
Public CustomField10 As String = ""
Public CustomField11 As String = ""
Public CustomField12 As String = ""
Public CustomField13 As String = ""
Public CustomField14 As String = ""
Public CustomField15 As String = ""
Public ExternalGUID As String = ""
Public UserData As String = ""
Public Operation As String = ""