Cancel Payrun
Cancel a DRAFT supplementary pay run.
Its pay items are deleted (kept for audit), its payslips deleted and its status set to
CANCELLED; its payment date is free for a new run. A MAIN run cannot be cancelled (409
INVALID_TRANSITION, params.reason NOT_SUPPLEMENTARY), nor a run that is approved or being
calculated (409 INVALID_TRANSITION, params.reason NOT_DRAFT). A supplementary run that
pays employees’ salary and statutory pay for the period (they were moved into it, or it
calculated them after the MAIN run was approved without their salary) is refused until they are
moved to another draft run: back to the MAIN run while it is a draft, to another supplementary
run once it is approved.
Alternatively, name exactly those employees in drop_standing_pay_for, for instance
for a supplementary run whose payment date has passed. Their salary and statutory pay
then leaves this run, which does not pay it: the next run of the period that
calculates them pays it (the MAIN run while it is a draft, otherwise the first
supplementary run that calculates them). Drop it only to pay it in a later period, for
instance as a back-pay item; to pay it in this one, move the employees first. The
response lists in unpaid_standing_pay_for those whose pay no run will now pay: once the
MAIN run is approved, every named employee except those holding pay items in another draft
run of the period, which pays it when calculated again; while it is a draft, those it does not
cover (in positive pay, employees holding no pay items in it). In net change it leaves
out an employee who started in the period, has no payment for it approved and no pay
items in another run of it: the next period’s MAIN run pays the period for them
unasked. Their payslips in the period’s other draft
runs are deleted with the cancel, so calculate those runs again before approving them;
the cancel is refused (409 RESULT_NOT_CALCULATED, params.reason
OTHER_RUN_CALCULATING) while one of those runs is being calculated for them. Any
other set of employees, including naming someone when the run holds nobody’s salary or
statutory pay, is refused (409). The body is optional; without it nobody is named.
Body
Exactly the employees whose salary and statutory pay for the period the run holds, or the cancel is refused; omit (or leave empty) when it holds nobody's. Naming them moves that pay out of this run, which does not pay it: the next run of the period that calculates them pays it (the MAIN run while it is a draft, otherwise the first supplementary run that calculates them). Drop it only to pay it in a later period: the response lists in unpaid_standing_pay_for those whose pay no run will now pay. To pay it in this period, move them to another draft run first.
Response
Successful Response
Those named in drop_standing_pay_for whose salary and statutory pay for the period no run will now pay: once the MAIN run is approved, all of them except those holding pay items in another draft run of the period, which pays it when calculated again; while it is a draft, those it does not cover (in positive pay, employees holding no pay items in it). Pay it in a later period, for instance as a back-pay item. Not listed, in net change: an employee who started in the period, has no payment for it approved and no pay items in another run of it. The next period's MAIN run pays the period for them unasked, so back pay would pay it twice. Empty when nobody was named or the MAIN run pays every named employee.