NOTE:
2020.0 and higher have added the option to include 27 and 53 pay periods in the employee record. The calculations will only be correct if the pay periods per year settings were correct for all paycheques starting Jan 1. See How to change the pay period number for an employee.