PurchaseOrders

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrder 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 GetPurchaseOrderRecordCount(Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As Integer

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get All PurchaseOrder. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' NOTE: IF YOU HAVE TOO MANY RECORDS GET PurchaseOrder 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 GetAllPurchaseOrder(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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrder By TxnIDs. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' NOTE: IF YOU HAVE TOO MANY RECORDS GET PurchaseOrder BY DATERANGE
    ''' </summary>
    ''' <param name="TxnIDs">TxnIDs of the PurchaseOrder. If it is one TxnIDs, just add one TxnID to the List(Of String)</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 GetPurchaseOrderByTxnIDs(ByVal TxnIDs As List(Of String), 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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrder By RefNumbers. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' NOTE: IF YOU HAVE TOO MANY RECORDS GET PurchaseOrder BY DATERANGE
    ''' </summary>
    ''' <param name="RefNumbers">RefNumbers of the PurchaseOrder. If it is one RefNumbers, just add one RefNumbers to the List(Of String)</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 GetPurchaseOrderByRefNumbers(ByVal RefNumbers As List(Of String), 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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrder Modified Date Range. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' </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 GetPurchaseOrderModifiedDateRange(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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrder Txn Date Range. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' </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 GetPurchaseOrderTxnDateRange(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 PurchaseOrder)

   ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrder Txn Date Macro. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' </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 GetPurchaseOrderTxnDateMacro(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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrderBy Entity ListIDs. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' An entity refers to a person on the QuickBooks Customer list, Vendor list, Employee list, or Other Names list
    ''' </summary>
    ''' <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 GetPurchaseOrderByEntityListIDs(ByVal ListIDs As List(Of 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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrderBy Entity FullNames. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' An entity refers to a person on the QuickBooks Customer list, Vendor list, Employee list, or Other Names list
    ''' </summary>
    ''' <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 GetPurchaseOrderByEntityFullNames(ByVal FullNames As List(Of 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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrderBy Entity ListIDWithChildren. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' An entity refers to a person on the QuickBooks Customer list, Vendor list, Employee 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 GetPurchaseOrderByEntityListIDWithChildren(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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrderBy Entity FullNameWithChildren. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' An entity refers to a person on the QuickBooks Customer list, Vendor list, Employee 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 GetPurchaseOrderByEntityFullNameWithChildren(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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrderBy Account ListIDs. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' 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 account’s account number.
    ''' If an account name must contain a number that does not match its own account number, have the QuickBooks user change the account’s name slightly, for example to 2050a.
    ''' </summary>
    ''' <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 GetPurchaseOrderByAccountListIDs(ByVal ListIDs As List(Of 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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrderBy Account ListIDs. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' 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 account’s account number.
    ''' If an account name must contain a number that does not match its own account number, have the QuickBooks user change the account’s name slightly, for example to 2050a.
    ''' </summary>
    ''' <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 GetPurchaseOrderByAccountFullNames(ByVal FullNames As List(Of 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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrderBy Account ListIDs. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' 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 account’s account number.
    ''' If an account name must contain a number that does not match its own account number, have the QuickBooks user change the account’s 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 GetPurchaseOrderByAccountListIDWithChildren(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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrderBy Account ListIDs. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' 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 account’s account number.
    ''' If an account name must contain a number that does not match its own account number, have the QuickBooks user change the account’s 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 GetPurchaseOrderByAccountFullNameWithChildren(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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrder By RefNumber Match. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' NOTE: IF YOU HAVE TOO MANY RECORDS GET PurchaseOrder BY DATERANGE
    ''' </summary>
    ''' <param name="RefNumber">RefNumber of the PurchaseOrder. 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 GetPurchaseOrderByRefNumberMatch(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 PurchaseOrder)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get PurchaseOrder By RefNumber Range. Returns List(Of PurchaseOrder)
    ''' In case of error returns: new List(Of PurchaseOrder)
    ''' NOTE: IF YOU HAVE TOO MANY RECORDS GET PurchaseOrder 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 GetPurchaseOrderByRefNumberRange(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 PurchaseOrder)

    ''' <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 DeletePurchaseOrderFromQuickBooksByTxnID(ByVal TxnID As String, Optional ByRef errorMsg As String = "") As Boolean

    ''' <summary>
    ''' It will add a new PurchaseOrder to PurchaseOrderList.
    ''' </summary>
    ''' <param name="_ListID">to add new records to QB set ListID to a temporal one</param>
    ''' <param name="_Operation">set to empty, update, add, or delete</param>
    ''' <param name="errorMsg">returned error message</param>
    Public Function AddToPurchaseOrderList(_TxnID As String, Optional ByVal _TimeCreated As String = "", Optional ByVal _TimeModified As String = "", Optional ByVal _EditSequence As String = "", Optional ByVal _TxnNumber As String = "", Optional ByVal _VendorRef_ListID As String = "", Optional ByVal _VendorRef_FullName As String = "", Optional ByVal _ClassRef_ListID As String = "", Optional ByVal _ClassRef_FullName As String = "", Optional ByVal _InvSiteRef_ListID As String = "", Optional ByVal _InvSiteRef_FullName As String = "", Optional ByVal _InvSiteLocRef_ListID As String = "", Optional ByVal _InvSiteLocRef_FullName As String = "", Optional ByVal _ShipToEntityRef_ListID As String = "", Optional ByVal _ShipToEntityRef_FullName As String = "", Optional ByVal _TemplateRef_ListID As String = "", Optional ByVal _TemplateRef_FullName As String = "", Optional ByVal _TxnDate As String = "", Optional ByVal _RefNumber As String = "", Optional ByVal _VendorAddress_Addr1 As String = "", Optional ByVal _VendorAddress_Addr2 As String = "", Optional ByVal _VendorAddress_Addr3 As String = "", Optional ByVal _VendorAddress_Addr4 As String = "", Optional ByVal _VendorAddress_Addr5 As String = "", Optional ByVal _VendorAddress_City As String = "", Optional ByVal _VendorAddress_State As String = "", Optional ByVal _VendorAddress_PostalCode As String = "", Optional ByVal _VendorAddress_Country As String = "", Optional ByVal _VendorAddress_Note As String = "", Optional ByVal _ShipAddress_Addr1 As String = "", Optional ByVal _ShipAddress_Addr2 As String = "", Optional ByVal _ShipAddress_Addr3 As String = "", Optional ByVal _ShipAddress_Addr4 As String = "", Optional ByVal _ShipAddress_Addr5 As String = "", Optional ByVal _ShipAddress_City As String = "", Optional ByVal _ShipAddress_State As String = "", Optional ByVal _ShipAddress_PostalCode As String = "", Optional ByVal _ShipAddress_Country As String = "", Optional ByVal _ShipAddress_Note As String = "", Optional ByVal _TermsRef_ListID As String = "", Optional ByVal _TermsRef_FullName As String = "", Optional ByVal _DueDate As String = "", Optional ByVal _ExpectedDate As String = "", Optional ByVal _ShipMethodRef_ListID As String = "", Optional ByVal _ShipMethodRef_FullName As String = "", Optional ByVal _FOB As String = "", Optional ByVal _TotalAmount As String = "", Optional ByVal _CurrencyRef_ListID As String = "", Optional ByVal _CurrencyRef_FullName As String = "", Optional ByVal _ExchangeRate As String = "", Optional ByVal _TotalAmountInHomeCurrency As String = "", Optional ByVal _Memo As String = "", Optional ByVal _VendorMsg As String = "", Optional ByVal _IsToBePrinted As String = "", Optional ByVal _IsToBeEmailed As String = "", Optional ByVal _IsTaxIncluded As String = "", Optional ByVal _SalesTaxCodeRef_ListID As String = "", Optional ByVal _SalesTaxCodeRef_FullName As String = "", Optional ByVal _Other1 As String = "", Optional ByVal _Other2 As String = "", Optional ByVal _IsManuallyClosed As String = "", Optional ByVal _IsFullyReceived As String = "", Optional ByVal _CustomField1 As String = "", Optional ByVal _CustomField2 As String = "", Optional ByVal _CustomField3 As String = "", Optional ByVal _CustomField4 As String = "", Optional ByVal _CustomField5 As String = "", Optional ByVal _CustomField6 As String = "", Optional ByVal _CustomField7 As String = "", Optional ByVal _CustomField8 As String = "", Optional ByVal _CustomField9 As String = "", Optional ByVal _CustomField10 As String = "", Optional ByVal _CustomField11 As String = "", Optional ByVal _CustomField12 As String = "", Optional ByVal _CustomField13 As String = "", Optional ByVal _CustomField14 As String = "", Optional ByVal _CustomField15 As String = "", Optional ByVal _ExternalGUID As String = "", Optional ByVal _UserData As String = "", Optional ByVal _Operation As String = "", Optional ByRef errorMsg As String = "") As PurchaseOrder

Powered by BetterDocs