Previous page

Next page

Process Actual Pay - Locking 'Best Practice' Solution

Summary

When you run Process Actual Pay, a lock occurs on the actualsperpaysequence database table. This lock occurs whenever a full process is run. The actualsperpaysequence has a PayProcessed column with True/False options so the lock allows the actuals to be flagged as “fully processed”. The lock prevents users from editing employee actuals before the full process is completed.

However, the locking process can cause problems in some situations so we recommend the following ‘best practice’ solution.

Solution

If you run Process Actual Pay with an active query, then the lock is not created so users can still access the pay while it is being processed and edit employee actuals. However, the resultant transactions may not reflect the edited values because the result depends on the timing of the edit:

  • If the employee’s actuals were edited before that employee was processed, then their transactions will reflect the new values.
  • If the employee’s actuals were edited after that employee was processed, then their transactions will not reflect the new values.

If this limitation is acceptable, then create a query to include all your employees, activate it, and run Process Actual Pay.

In the following example, Scheduler runs Process Actual Pay so you need to set up the query in the Schedule Rules.

  1. Create an employee query with the following clause: “Employee code is not empty”.
  2. Ensure that the query has Details tab | Security = “No”.
  3. In the appropriate Schedule Rules, edit the “Process Actual Pay” clause on the Action Clauses tab and select your new query in the Query field.

When the Schedule Rule runs, it will not lock the actualsperpaysequence table when Process Actual Pay is running. However, the actual pay will not be flagged as “fully processed” even though you have processed all employees. As a result, the pay will not have a green tick on the Pay Status form and you will not be able to close it.

You can solve this problem in two ways:

  • If Company Settings | T&A | Validate on close = “Yes”, actual pays must be “fully processed” before they can be closed. If you change Validate on close to “No”, you can close actual pays that do not have a green tick, but have been fully processed by the Scheduler.
  • Alternatively, just before you close the actual pay, you can deactivate the query and run Process Actual Pay again so the pay has a green tick and you can close it normally.