Sometimes agencies have workers who are paid at an individually negotiated rate rather than at rates determined at the Rate Scheme / Vacancy or Placement level. With some configuration, IQX can accommodate such arrangements, even when the rules are complex.

In this example only some of the Agency's divisions have such an arrangement and only some of the workers participate. Additionally some (but not all) of the participating workers have agreed uplifts to their individual rates for Evening and Weekend work.

On some contracts workers are paid time and a quarter or time and a half of their base rates for certain periods rather than using the uplift amounts.

A further complication is that in some placements, the vacancy placement rates should be used regardless of the individual workers rates.

Setting the Workers' Rates

Three Applicant numeric questions are required, placed in the Payroll (-19) Display Group. In this example Question ID BPY is used for the Base Pay Rate, NEE for the Night Uplift and WEE for the Weekend Uplift.

Setting the Placement Override Option

A further single selection Placement question is needed to support this option:

Setting the calculation rules

The Temp Rate Modifier function (found under Maintenance | Database Functions | Temp Rate Modifier) can modify the pay and charge rates rate that IQX will use when pricing timesheets. The function takes as parameters various pieces of information including the rate calculated from the Rate Scheme, and any overrides set at the Vacancy or Placement level. It can then return a modified rate where required.

(IN PayOrChar CHAR(1),IN vacid CHAR(20),IN persid CHAR(20),IN placid CHAR(20),IN bandid CHAR(20),IN BaseRate DOUBLE)
RETURNS DOUBLE
BEGIN
rates
  DECLARE @UserID CHAR(50);
  DECLARE @TempBaseRate DOUBLE;
  DECLARE @TempEveningRate DOUBLE;
  DECLARE @TempWeekEndRate DOUBLE;
  DECLARE @DivisionName CHAR(50);
  DECLARE @UseTempBaseRate CHAR(4);
  DECLARE @PayrollFlag CHAR(20);
  IF PayOrChar = 'C' THEN RETURN BaseRate --Only Pay rates affected
  END IF;
  SELECT(SELECT UserID FROM Staff WHERE StaffID = UserStaffID),
    (SELECT Division.Name FROM Division KEY JOIN TempDesk KEY JOIN Vacancy WHERE VacancyID = vacid),
    (SELECT FIRST VALUE FROM tagvalue WHERE TagLocation = 'P' AND TagID = 'BPY' AND ID = persid ORDER BY taglocation ASC), --Get the employee base rate
    (SELECT FIRST VALUE FROM tagvalue WHERE TagLocation = 'P' AND TagID = 'NEE' AND ID = persid ORDER BY taglocation ASC), --Get the employee evening rate
    (SELECT FIRST VALUE FROM tagvalue WHERE TagLocation = 'P' AND TagID = 'WEE' AND ID = persid ORDER BY taglocation ASC), --Get the employee weekend rate
    (SELECT FIRST tagchoiceid FROM tagvalue WHERE TagLocation = 'L' AND TagID = 'PAY' AND ID = placid ORDER BY taglocation ASC) INTO @UserID, --Get the placement overide switch value
    @DivisionName,@TempBaseRate,@TempEveningRate,@TempWeekEndRate,
    @UseTempBaseRate FROM Dummy;
  IF
    @TempBaseRate IS NULL
    OR @UseTempBaseRate = 'NO' //Placement overide applies
    OR @DivisionName NOT IN( 'Division1','Division4') 
    OR @USERID NOT IN( 'TestUser1','TestUser2')
    -- if any of the above true then Temp base rate does not apply
  THEN
    RETURN BaseRate
  ELSE
    -- calculate the applicable base rate
    SET @PayrollFlag=(SELECT PayrollFlag FROM TempPayBand WHERE TempPayBandID = bandid);
    CASE
    WHEN @PayrollFlag = 'THLF' THEN RETURN round(@TempBaseRate*1.5,2) --Time + one half
    WHEN @PayrollFlag = 'TQTR' THEN RETURN round(@TempBaseRate*1.25,2) --Time + one quarter
    WHEN @PayrollFlag = 'EVE' THEN RETURN round(@TempBaseRate+isnull(@TempEveningRate,0),2) --Temps evening uplift 
    WHEN @PayrollFlag = 'NIGHT' THEN RETURN round(@TempBaseRate+isnull(@TempWeekEndRate,0),2) --Temps weekend uplift
    WHEN @PayrollFlag IN( 'EXP1','EXP2','HP') THEN RETURN BaseRate --Expenses and Holiday Pay etc excluded so use placement or vacancy rate
    ELSE
      RETURN round(@TempBaseRate,2) --Temp base rate applies
    END CASE
  END IF
END

Note the way the function exits immediately for charge rates to minimise processing, as the scheme does not effect charge rates. Also note how in this example the calculations are only made for certain test users to facilitate testing of the scheme. This clause or @USERID not in( 'TestUser1','TestUser2') would be removed for go live.

  • sa39-00.txt
  • Last modified: 2017/12/01 16:35
  • by 127.0.0.1