sa39-00

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
sa39-00 [2015/08/07 16:49] – created Justin Willeysa39-00 [2017/12/01 16:35] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ===== Configuring IQX to use rates determined by Agency Worker not Vacancy / Placement ===== ===== Configuring IQX to use rates determined by Agency Worker not Vacancy / Placement =====
  
-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. +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. 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.  A further complication is that in some placements, the vacancy placement rates should be used regardless of the individual workers rates. 
Line 12: Line 14:
  
 {{ :payquestions.jpg?800 |}} {{ :payquestions.jpg?800 |}}
 +
 +=== Setting the Placement Override Option ===
 +
 +A further single selection Placement question is needed to support this option:
 +
 +{{ :placementquestion.jpg?800 |}}
 +
 +=== 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.
 +
 +<code SQL>
 +(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
 +</code>
 +
 +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.1438966160.txt.gz
  • Last modified: 2017/11/16 21:57
  • (external edit)