Ontario payroll deductions
wenmar_payroll_deductionsWorks out the deductions from one regular pay in Ontario by CRA's T4127 formulas (Option 1): federal and Ontario income tax, CPP, CPP2 and EI, the net pay, the employer's CPP, CPP2 and EI, and every T4127 factor used with what it means. Takes frequency (weekly, biweekly, semi-monthly or monthly) and gross, the gross pay for the period. federal_claim and provincial_claim are the TD1 claim amounts: left out, each is the basic personal amount (claim code 1), and 0 is claim code 0. pay_date (YYYY-MM-DD) chooses the tables; left out, it is today, and a day outside the tables held is an error that names their dates. ytd_cpp, ytd_cpp2, ytd_ei and ytd_pensionable are what was deducted and earned on earlier pays this calendar year. Money is a number or text such as "2400.00". Ontario only; not for a bonus, commission or retroactive pay. The answer is an estimate and the employer remains liable to CRA for what it deducts and remits: say so, and point to CRA's Payroll Deductions Online Calculator at pdoc_url.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gross | Yes | Gross pay for one pay period, in dollars. | |
| ytd_ei | No | EI deducted earlier this year. | |
| ytd_cpp | No | CPP (base and first additional) deducted earlier this year. | |
| pay_date | No | YYYY-MM-DD. Left out: today. | |
| province | No | Ontario only for now. Left out: ON. | |
| ytd_cpp2 | No | CPP2 deducted earlier this year. | |
| frequency | Yes | ||
| federal_claim | No | Federal TD1 claim amount. Left out: claim code 1. | |
| ytd_pensionable | No | Pensionable earnings earlier this year. | |
| provincial_claim | No | Ontario TD1ON claim amount. Left out: claim code 1. |