Looking for tax on item
I want to know how much tax is charged on an item. I know that the Id is in SalesVATGroup and I want to find the Tax in OVTG. But OVTG is no part of the DI-API. What should I do?
Jakob Sandholm replied
Maybe this will do the trick? Replace "myCodeValue" with the actual code:
Dim oRecordSet As SAPbobsCOM.Recordset Dim taxRate As Double '// Getting an initialized Recordset object oRecordSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset) '// Performing the select statement '// The query result will be loaded '// into the Recordset object oRecordSet.DoQuery("SELECT Rate FROM OVTG WHERE Code = 'myCodeValue'") taxRate = oRecordSet.Fields.Item(0).Value