Skip to content

RFC: US Payroll 2019

Conventions:

All years will go away. In general, older rules and categories will be updated to newer ones (i.e. 2018) prior to installation. Install will delete old rules/categories and rename the (2018) ones to no-longer include (2018).

Rules will either include last year and current year calculations, OR provide some other mechanisms for providing years.

Sequencing:

Rule Sequence
BASIC 1
GROSS 100
Federal Wage 120+
State and other Wage 130+
Federal Rules 140+
State and other Rules 150+
NET 200
Company Contribution Wage 420+
Company Contribution Rules 440

Naming:

EE: US-CA State Disability Insurance
^ EE (Employee) ER (Employer)
    ^ Localization
          ^ Rule summary
Wage: US-CA State Disability Insurance
^ Wage to base rule off of
      ^ Rule name from above

Coding:

EE_US_CA_SDI

Rates:

In earlier versions, if a company rate was needed, it was stored on res.company. There are numerous issues with this approach, but one of the biggest is that with say 10 states active, every year we're adding ~10 fields to a base model. (Compounded by the fact that some states have several different rates.)

New object hr.payroll.rate:

  • date_from Date From (can be empty, but direct matches preferred)
  • date_to Date To (can be empty, but direct matches preferred)
  • company_id Company (can be empty)
  • rate Rate
  • code Code (identifier that will be part of the API to fetch rates.
  • payslip_limit Payslip Limit (potential limit per payslip)
  • year_limit Year Limit (potential limit per year)

Basic API:

<hr.payslip>.get_rate(code) => <hr.payroll.rate> based on code parameter and payslip's dates, company etc.

Rules will call 'get_rate' with set codes, thus they must exist.

Needed rates will be created by localization. For example, if CA needs a 'company' rate for something. It will create an instance of hr.payroll.rate with the code, and current default rate, but be light on dates etc. Marked no-update so that end users can update their own rates without getting overridden.

Demo data/tests will provide current year rates and will set appropriate dates etc. to deterministically pull the 'test' rate objects.

It is theoretically possible to extend this idea to provide 'per-employee' rates for various things....

Withholding Tables

State Withholding Documentation
US Federal IRS Publication 15
California 2019 Withholding Schedules - Method B
Florida
Kansas Selected Kansas Tax Rates with Statutory Citation
Missouri All Tax Tables
North Carolina NC - 30
New Jersey
New York NYS-50-T-NYS
Ohio Employer Withholding Taxes - Percentage Method
Pennsylvania
Virginia
Washington
Texas
Edited by Jared Kipe