Test 1 - Paid Before Hired
Today, we'll be looking for any employees who were paid before their hire date. Some payroll systems require that an employee's record, which includes the employee's hire date and number, exist before any payments can be processed and issued. But what if there isn't such a control in place? Or what if there is a control, but it isn't working effectively? Our test today will identify any employees who were paid before their hire date, which will ensure that our payment process control is working effectively.
Risk
Unauthorized payments made to employees before their official start date may be the result of fraud or a flaw in the process for establishing payroll records for new employees.
Objective
Identify any employees who were paid before their hire date.
Analyzing Data
-
In order to compare pay dates (Payroll table) to employees' hired dates (Empmast table), we'll need to be able to compare and analyze both fields, so let's create a relationship between the Payroll table (parent) and the Empmast table, using Employee Number as the key field. We'll also want some additional information, such as the name of the employee involved and their job title, for the employees involved in any issues that we identify, so this is a relationship that will come in handy for other Payroll tests in the series.
Show me
OPEN Empmast
INDEX ON empno TO Empmast_on_empno
OPEN Payroll
DEFINE RELATION empno WITH Empmast INDEX Empmast_on_empno
-
Now, in our related Payroll table, we're going to apply a filter to identify any issues where employees were paid before their hire date:
-
paydate < empmast.hiredate
Show me
OPEN Empmast
INDEX ON empno TO Empmast_on_empno
OPEN Payroll
DEFINE RELATION empno WITH Empmast INDEX Empmast_on_empnoOPEN Payroll
SET FILTER TO paydate < empmast.hiredate
COUNT
-
Conclusion
It's not very likely that employees will be paid before their hire date, especially if the payroll system itself prevents payroll payments from being made unless there is an employee record with a hire date. However, this is an extremely easy test to perform and ensures that the process is working correctly. A more likely issue than payments made before an employee's hire date is payments made after an employee's termination date, which we'll look at in our next test.