sa39-00

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
sa39-00 [2015/08/07 17:02] Justin Willeysa39-00 [2015/08/07 17:06] Justin Willey
Line 41: Line 41:
   select(select UserID from Staff where StaffID = UserStaffID),   select(select UserID from Staff where StaffID = UserStaffID),
     (select Division.Name from Division key join TempDesk key join Vacancy where VacancyID = vacid),     (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 = '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 = '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 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+    (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,     @DivisionName,@TempBaseRate,@TempEveningRate,@TempWeekEndRate,
     @UseTempBaseRate from Dummy;     @UseTempBaseRate from Dummy;
Line 50: Line 50:
     @TempBaseRate is null     @TempBaseRate is null
     or @UseTempBaseRate = 'NO' //Placement overide applies     or @UseTempBaseRate = 'NO' //Placement overide applies
-    or @DivisionName not in( 'Geneva Care','Geneva Iris','Geneva Northlink')  +    or @DivisionName not in( 'Division1','Division4')  
-    or @USERID not in( 'user','ANNAC','CAROLG'then+    or @USERID not in( 'TestUser1','TestUser2')
     -- if any of the above true then employee base rate does not apply     -- if any of the above true then employee base rate does not apply
 +  then
     return BaseRate     return BaseRate
   else   else
-    // calculate the applicable base rate+    -- calculate the applicable base rate
     set @PayrollFlag=(select PayrollFlag from TempPayBand where TempPayBandID = bandid);     set @PayrollFlag=(select PayrollFlag from TempPayBand where TempPayBandID = bandid);
     case     case
-    when @PayrollFlag = '02' then return round(@TempBaseRate*1.5,2) //Time + one half +    when @PayrollFlag = 'THLF' then return round(@TempBaseRate*1.5,2) --Time + one half 
-    when @PayrollFlag = '16' then return round(@TempBaseRate*1.25,2) //Time + one quarter +    when @PayrollFlag = 'TQTR' then return round(@TempBaseRate*1.25,2) --Time + one quarter 
-    when @PayrollFlag = '75' then return round(@TempBaseRate+isnull(@TempEveningRate,0),2) --Employees evening uplift  +    when @PayrollFlag = 'EVE' then return round(@TempBaseRate+isnull(@TempEveningRate,0),2) --Employees evening uplift  
-    when @PayrollFlag = '76' then return round(@TempBaseRate+isnull(@TempWeekEndRate,0),2) --Employees weekend uplift +    when @PayrollFlag = 'NIGHT' then return round(@TempBaseRate+isnull(@TempWeekEndRate,0),2) --Employees weekend uplift 
-    when @PayrollFlag in( '45','46','47','48','990','PETALL','EXPEN','ONCALL','SLEEPO') then return BaseRate --Expenses and Holiday Pay etc excluded so use placement or vacancy rate+    when @PayrollFlag in( 'EXP1','EXP2','HP') then return BaseRate --Expenses and Holiday Pay etc excluded so use placement or vacancy rate
     else     else
       return round(@TempBaseRate,2) --Employee base rate applies       return round(@TempBaseRate,2) --Employee base rate applies
Line 69: Line 70:
 end end
 </code> </code>
- 
- 
  • sa39-00.txt
  • Last modified: 2017/12/01 16:35
  • by 127.0.0.1