Hi STONE,
Thanks for your post. The reason you're getting this error is due to trying to finalise an employee in STP Phase 2 but they have been terminated in STP Phase 1.
What you will need to do to resolve this is remove the finalisation in the employee terminations tab, this is explained on this Help Article . Once you've done this you will need to redo the termination, this is explained on this Help Article.
Once you've done this, please run a $0.00 pay or send an update event to update the YTD figures.
Do let me know how you go.