Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
sa39-00 [2015/08/07 17:00] – Justin Willey | sa39-00 [2015/08/07 17:06] – Justin Willey | ||
---|---|---|---|
Line 29: | Line 29: | ||
returns double | returns double | ||
begin | begin | ||
- | -- declare rv double; | + | rates |
- | -- function modified for Geneva Healthcare by GJW 2015-08-07 to apply rules for care workers with own contracted | + | |
declare @UserID char(50); | declare @UserID char(50); | ||
declare @TempBaseRate double; | declare @TempBaseRate double; | ||
Line 38: | Line 37: | ||
declare @UseTempBaseRate char(4); | declare @UseTempBaseRate char(4); | ||
declare @PayrollFlag char(20); | declare @PayrollFlag char(20); | ||
- | if PayOrChar = ' | + | if PayOrChar = ' |
end if; | end if; | ||
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 = ' | + | (select first value from tagvalue where TagLocation = ' |
- | (select first value from tagvalue where TagLocation = ' | + | (select first value from tagvalue where TagLocation = ' |
- | (select first value from tagvalue where TagLocation = ' | + | (select first value from tagvalue where TagLocation = ' |
- | (select first tagchoiceid from tagvalue where TagLocation = ' | + | (select first tagchoiceid from tagvalue where TagLocation = ' |
@DivisionName, | @DivisionName, | ||
@UseTempBaseRate from Dummy; | @UseTempBaseRate from Dummy; | ||
Line 51: | Line 50: | ||
@TempBaseRate is null | @TempBaseRate is null | ||
or @UseTempBaseRate = ' | or @UseTempBaseRate = ' | ||
- | or @DivisionName not in( 'Geneva Care',' | + | or @DivisionName not in( 'Division1',' |
- | or @USERID not in( 'user',' | + | or @USERID not in( 'TestUser1',' |
-- 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 | ||
- | | + | |
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, | + | when @PayrollFlag = 'THLF' then return round(@TempBaseRate*1.5, |
- | when @PayrollFlag = '16' then return round(@TempBaseRate*1.25, | + | when @PayrollFlag = 'TQTR' then return round(@TempBaseRate*1.25, |
- | when @PayrollFlag = '75' then return round(@TempBaseRate+isnull(@TempEveningRate, | + | when @PayrollFlag = 'EVE' then return round(@TempBaseRate+isnull(@TempEveningRate, |
- | when @PayrollFlag = '76' then return round(@TempBaseRate+isnull(@TempWeekEndRate, | + | when @PayrollFlag = 'NIGHT' then return round(@TempBaseRate+isnull(@TempWeekEndRate, |
- | when @PayrollFlag in( '45',' | + | when @PayrollFlag in( 'EXP1',' |
else | else | ||
- | return round(@TempBaseRate, | + | return round(@TempBaseRate, |
end case | end case | ||
end if | end if | ||
end | end | ||
</ | </ | ||
- | |||
- |