>>PHP
taxableWages Function
Returns the calculated taxable wages.
Syntax
value = taxableWages($taxname, $earnings, $ytdarnings, $filingstatus, $exemptions, $stateexemptions, $payperiods, $paydate, $misc, $aux, $ytdtax)
Part | Description |
value | A numeric result |
$taxname | A string naming the specific tax from the table to be computed. For a list of valid tax names, see the taxList function. |
$earnings | Earnings for the current pay period. |
$ytdarnings | Year-to-date earnings prior to the current period. |
$filingstatus | Numeric value representing the employee's $filingstatus |
$exemptions | Federal exemptions claimed on the employee's W-4. |
$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. |
$misc | A numerica value required by some formulas. The application database should associate one $misc value for each withheld tax for each employee. When this field is required, the tax object will have specific instructions in the $miscellaneous_instructions field. |
$aux | A numerica value required by some formulas. The application database should associate one $aux value for each withheld tax for each employee. When this field is required, the tax object will have specific instructions in the $auxiliary_instructions field. |
$ytdtax | Year-to-date tax amount withheld for the tax prior to the current period. |
Remarks |
---|
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)))