AP Invoices and Sales Taxes

Just starting out using the BOI and I am having trouble finding out how to create an AP Invoice with sales tax values.

When the option "Calculate Sales Tax in A/P Data Entry" is on then how do you set the tax values on an AP Invoice?

I've used the example APInvoices.vb (below) to create the invoice but can't find a way to set the tax details, the same way as using the Tax Detail button on an AP Invoice in Sage 100.

' Set security and create the A/P Invoice business object
oSS.nSetProgram(oSS.nLookupTask("AP_Invoice_ui"))
Dim AP_Invoice_bus As Object = oPVX.NewObject("AP_Invoice_bus", oSS)

' If batches are enabled for A/P Invoices create and use next new batch no.
If AP_Invoice_bus.nBatchEnabled = 1 Then
Dim AP_BatchNo As String = ""
AP_Invoice_bus.nSelectbatch(AP_BatchNo)
End If

' Set the A/P Invoice Header record
AP_Invoice_bus.nSetKeyValue("APDivisionNo$", "01")
AP_Invoice_bus.nSetKeyValue("VendorNo$", "ANDERS")
AP_Invoice_bus.nSetKeyValue("InvoiceNo$", "222222")
AP_Invoice_bus.nSetKey()

' Set column values for the header record
AP_Invoice_bus.nSetValue("InvoiceAmt", 222)
AP_Invoice_bus.nSetValue("DiscountAmt", 222)
AP_Invoice_bus.nSetValue("Comment$", "Truck Expenses via BOI")

' Create a new A/P Invoice Detail record
AP_Invoice_bus.oLines.nAddLine()

' Set the column values for the detail record
AP_Invoice_bus.oLines.nSetValue("AccountKey$", "660010000") ' account key for 660-01-00 Truck Expenses
AP_Invoice_bus.oLines.nSetValue("DistributionAmt", 200)

' Write the detail record (Memory file)
AP_Invoice_bus.oLines.nWrite()

' Create another A/P Invoice Detail record
AP_Invoice_bus.oLines.nAddLine()

' Set the column values for the detail record
AP_Invoice_bus.oLines.nSetValue("AccountKey$", "660010200") ' account key for 660-01-02 Truck expenses - West
AP_Invoice_bus.oLines.nSetValue("DistributionAmt", 22)

' Write the detail record (Memory file)
AP_Invoice_bus.oLines.nWrite()

' Write the header record which also commits the line records to disk
If CBool(AP_Invoice_bus.nWrite()) Then
Console.WriteLine("Invoice created successfully")
Else
Console.WriteLine(AP_Invoice_bus.sLastErrorMsg)
End If