Issue: error of violation of primary key constraint PK_EC_EMPLOYEE_STAT_DEDUCTION is being generated


When executing the steps below, the error of violation of primary constraint PK_EC_EMPLOYEE_STAT_DEDUCTIONS is generated:


1. Payroll\Year End\Create Statutory Deductions
2. Select December 31st of this year
3. Hit TAB (information will auto populate)
4. Submit



Error similar to the one bellow happens:



RESOLUTION:

The issue is relating to having two records with open end dates. 

Go to Payroll\Employee\Statutory Deductions, search for employee whose number is being shown in the error message and add an end date of 1st of January of the current year, for example 2023-01-01, and run the process again.