PdcApplication.GetVATCodeAndPercentage
Declaration
GetVATCodeAndPercentage( strCalcNr As String, strMatNr As String, intMatID As Integer, strRelNr As String, ByRef outVATCode As String, ByRef outVATPercentage As Double)
Description
This function uses a standard procedure from pdc to retrieve a VAT code and percentage based on a set of optional parameters. You need to fill in at least 1 of the input parameters. The results of the function will be passed back through the 2 ByRef parameters.
Notes
This function takes all of the pdc settings into account and tries to retrieve a VAT code and percentage based on whichever parameters you enter, so it is possible for example to only pass a caluclation number and leave the rest empty.
Code example
This example shows how to retrieve a VAT code and percentage based on only a customer number and put the results in a result object.
Dim strVATCode As String = ""
Dim dblVATPercentage As Double = 0.0
PDC.App.GetVATCodeAndPercentage("", "", 0, CustomerNumber, strVATCode, dblVATPercentage)
result.VATCode = strVATCode
result.VATPercentage = dblVATPercentage
Availability
Available since August 2020 (From version 5.6)