Back to Documentation pageMixed Pay on Day in and Day Out


Situation

The client (Ashton) has a mix of day and night shifts.
Employee's roll between day and night shifts.
They can also be Rostered out of their normal pattern onto either day or night.

If they work a night shift, they may be rostered to work the following day shift. 

They usually work the day shift on Saturday, followed by the night shift on Sunday night. (The night shift is paid on day out, ie the Monday.)

They usually work on Tuesday night, are off on Wednesday, and then work Thursday Day Shift.

Tip : The reduced data set showing this setup in action can be found here.

Configuration

We made 3 payroll shifts;

  • D1 is a Day only shift, and is used when Rostering the person onto a day shift.
  • N1 is a Night only shift, and is used to Roster the employee onto the night shift.
  • R1 is their normal rolling shift.

D1

This is a very normal day shift. 7 day week cycle, with every day set to use a typical daily shift. Nothing special about this shift.

N1

This is a fairly standard night shift. 

  •  Because the employee can work a night, immediately followed by a day, the Must be Out By time is set to 31:00 (ie 7am) which is before the day shift starts.
  • The night shift has the option Pay on Day Out ticked on.

R1

This one is the complicated one, because of the rolling. It has the following interesting points;

  • The main time line has the following day splits;
  • 0  Saturday
  • 24 ?
  • 36 Sun Night
  • 60 Mon Night
  • 84 Tue Night
  • 120 Thursday
  • 144 Friday

Notice the "short" day between Saturday and Sunday Night, which is left unnamed.  Also notice the very long Tuesday Night which is 36 hours long. (It includes Tuesday night, and Wednesday Day shifts.)

  •  There is an additional line, Line 1,which is only 12 hours long. The start of the line is at 24, the end is at 36. Labeled Sun this shift takes care of any work that the employee works on the Sunday morning. Notice that this shift ends on the same boundary as where the Sunday Night shifts starts.
  • There is a Macro attached to the shift which looks like this;

at after selecting shift
  if PayoutRoll = 1
    useline = 1
    PayoutRoll = 2
  end

at error
  if err:code = 9
    ignoreerror = 1
  end

 

  • Pay on Day Out is set at the Daily Level option is ticked on.

A1 and A2 are normal day shifts.

A7 and A4 are night shifts. These two shifts have Pay on Day Out ticked on.

S1 is the "Short Day Shift" and L1 is the Long day shift.

Discussion

The Macro

at after selecting shift
  if PayoutRoll = 1
    useline = 1
    PayoutRoll = 2
  end

When the employee rolls from a day shift to a night shift then by default all time worked on the Sunday (during the day) will be added to the night shift, and paid on the Monday.

However in our example the client wanted there to be the possibility of a Saturday Day Shift, a shortened Sunday Day shift (paid on Sunday), followed by a Sunday night shift (paid on Monday).

This was accomplished using the above part of the script. Firstly we test PayoutRoll. This is set to 1 when the processor detects that the employee is going from day to night.  In this case we use this to force the processing to move to Line 1.  Line 1 contained the shortened Sunday Day Shift.

Notice also that PayoutRoll is explicitly set to 2. If it is left as 1 then the processor will automatically clear the hours, and insert a blank record for this day.

 

 

This page last updated on 30 April 2002