>>.NET

ComputeTax Method

Returns the tax amount for the requested tax, passing all parameter information in a single call.

Syntax

value = object.ComputeTax(DataFilename, SelectedTax, Earnings, YTDEarnings, Exemptions, StateEx, FilingStatus, Miscellaneous, Auxiliary, Supplemental, Periods)

Part
Description
objectA TaxControl object
valueA numeric result
DataFilenameA string expression indicating the file name for the tax table data (see DataFilename).
SelectedTaxA string expression naming the specific tax from the table to be computed (see SelectedTax).
EarningsA numeric expression which evaluates to the employee's earnings for this pay period (see Earnings).
YTDEarningsA numeric expression which evaluates to the employee's year-to-date earnings prior to this pay period (see YTDEarnings).
ExemptionsA numeric expression which evaluates to the employee's federal exemptions (see Exemptions).
StateExA numeric expression which evaluates to the employee's state exemptions (see StateExemptions).
FilingStatusA FilingStatus constant indicating the employee's tax filing status (see FilingStatus).
MiscellaneousA numeric expression used in some tax formulas(see Miscellaneous).
AuxiliaryA numeric expression used in some tax formulas (see Auxiliary).
SupplementalA numeric expression which evaluates to non-zero(True) if the current earnings should be considered as supplemental pay, or zero(False) if they should not (see Supplemental).
PeriodsA numeric expression which evaluates to the number of pay periods in one year (see PayPeriodsPerYear).

Remarks

This method provides a way to calculate a tax within one method call. This may be useful for circumstances where a "stateless" object is desirable. All values which affect tax computation are included in the method call. This call does not alter any previously set property values. Performance is severely impacted when using this call if the 'DataFilename' value is changed, as the entire tax table is loaded.

See Also: TaxAmount