Calculate Payrun
Calculate a DRAFT pay run, MAIN or SUPPLEMENTARY, from the pay items stored in it.
Calculates the run’s employees, or the named employee_ids among them. A
SUPPLEMENTARY run’s employees are those holding pay items in it, and so are a positive
pay MAIN run’s. A net change MAIN run’s are those holding pay items in it and every
member of its pay group on the pay calendar’s pay date that no supplementary run of
the period pays instead, with or without pay items: they are paid from standing
compensation. A run with nobody to calculate is refused (409 INVALID_TRANSITION,
params.reason NO_EMPLOYEES).
A run that is not DRAFT, one being calculated included, is refused with 409
INVALID_TRANSITION (params.reason NOT_DRAFT, params.from its status). A MAIN
run first takes its pay calendar’s current pay date, refused
(409 DUPLICATE_DEFINING_ATTRIBUTES, params.id the run holding it) while another run
of the calendar and pay group pays on that date. Answers with the calculation task, as
submit does; the run is PROCESSING until the task completes.
In a SUPPLEMENTARY run, an employee whose earnings total zero or less, or whose net pay would be negative, is not paid: the task’s results carry the error for them and no payslip is written, so approval is refused until their pay items change. A net pay of zero on positive earnings is paid, and the Bacs file leaves the employee out.
Body
The employees to calculate, each one of the run's employees. Omit to calculate all of them. A SUPPLEMENTARY run's employees are those holding pay items in it, and so are a positive pay MAIN run's. A net change MAIN run's are those holding pay items in it and the members of its pay group that no supplementary run of the period pays instead, paid from standing compensation.
1