RFC: US Payroll 2019
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.
|State and other Wage||130+|
|State and other Rules||150+|
|Company Contribution Wage||420+|
|Company Contribution Rules||440|
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
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.)
date_fromDate From (can be empty, but direct matches preferred)
date_toDate To (can be empty, but direct matches preferred)
company_idCompany (can be empty)
codeCode (identifier that will be part of the API to fetch rates.
payslip_limitPayslip Limit (potential limit per payslip)
year_limitYear Limit (potential limit per year)
<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....
|US Federal||IRS Publication 15|
|California||2019 Withholding Schedules - Method B|
|Kansas||Selected Kansas Tax Rates with Statutory Citation|
|Missouri||All Tax Tables|
|North Carolina||NC - 30|
|Ohio||Employer Withholding Taxes - Percentage Method|