taxableWages
A function which returns the taxable wages for the requested tax, passing all parameter information in a single call. Parameters are the same as for the compute function.
value = taxableWages ( $taxname, $earnings, $ytdearnings, $filingstatus, $exemptions, $stateexemptions, $payperiods, $paydate, $misc, $aux, $ytdtax )
- value - A float result.
- $taxname - A string naming the specific tax from the table to be computed.
- $earnings - Gross earnings for the current pay period.
- $ytdearnings - Year-to-date earnings prior to the current pay period.
- $filingstatus - Numeric value representing the employee's filing status for this tax. (see filingstatus)
- $exemptions - Total from Form W-4 Step 3, line 3.
- $stateexemptions - State exemptions claimed by the employee.
- $payperiods - Number representing the total number of pay periods in a year.
- $paydate - A Date object representing the check date. Default is current date.
- $misc - A numeric value required by some formulas. When this field is required, the tax object will have specific instructions in the $miscellaneous_instructions field. (see tax)
- $aux - A numeric value required by some formulas. When this field is required, the tax object will have specific instructions in the $auxiliary_instructions field. (see tax)
- $ytdtax - Year-to-date tax amount withheld for this tax prior to the current period.
This function returns the employee’s taxable wages. For many taxes, this is the same as the current period earnings. For taxes with a wage limit, however, it could be less.
When there is a wage limit, computed as:
min($earnings, max(0, (wage_limit - $ytdearnings)))