Calculating the value of a trade license fee

You can direct Infor Public Sector to calculate the value of a fee using a fee value formula. For example, you could write a formula that charges a base license fee of $100.00 plus an extra $50.00 for any child licenses associated with the license. You specify a fee value formula when you define a fee type. You first select Formula from the "Value" list in the Fee Type dialog box.

Fee value formulas use the oTradeLicense object (an instance of the Hansen.CDR.TradeLicense.iTradeLicense class) to set Value to a decimal value. For more information about this object and for sample code, click the Information tab in the Formula Editor.

Examples

This formula assesses a $10.00, $20.00, or $30.00 fee based on the license's priority.


Value = 0
If oTradeLicense.Priority.Code.ToUpper = "HIGH" Then
   Value = 30
Else If oTradeLicense.Priority.Code.ToUpper = "MED" Then
   Value = 20
Else
   Value = 10
End If

This formula assesses a $15.00 per hour handling fee for extra work done by any employee.


value = 0
dim oLicenseEmployee as Hansen.CDR.TradeLicense.ILicenseEmployee
For Each oLicenseEmployee in oTradeLicense.LicenseEmployees
  Value += oLicenseEmployee.TotalHours*15
Next oLicenseEmployee