Payroll - Check for Previous Period which did not run before
I have an employee who was terminated hence payroll was not run for him from his poiint of termination, i.e. he was terminated from period 03, 04, 05 onwards.
Now currently it is period 06,... I wish to run payroll for him, for his period 03, 04, 05, I need to be able to detect that I am running payroll for the 2 conditions:
1) That the period i'm running FOR (03,04,05) is before the currnet period.
2) And that for periods 03, 04, 05 I am running the payroll for this employee for the FIRST TIME.
Are there any commands in the schema that I can use to know this?