AlvarHanso
MIS
The purpose of the report is to show employee wages, both regular and overtime by property, then further broken down by department. This formula (@Job Rate) is used to calc and display the bill rate, which is then multiplied by the hours to get the amount (@amount). It asks what the {EPayHistDetail.detcode} is (1 = regular or 2 = overtime), then decides which payrate to use based on the {EPayHistDetail.jobcode}, looking at
the user defined rate fields {EInfo.user1,2,3, or 4}. If it is overtime {EPayHistDetail.detcode} = "2" then it is *1.5. The problem I am having is that most of the employees that show up only show overtime "({EPayHistDetail.detCode}) = "2"",
and not regular wages.
This only happens for employees with{EPayHistDetail.jobCode}= "1" for both detCodes. It seems like the first line of the code that checks for jobcode = "1" is not executing. Is there a better way to write this code, or is there some syntax wrong here? Thanks for the help.
Code:
If Left({EPayHistDetail.detCode},1) = "1" then
If Left({EPayHistDetail.jobCode},1) = "1" then tonumber({EInfo.user1})
else If Left({EPayHistDetail.jobCode},1) = "2" then tonumber({EInfo.user2})
else if Left({EPayHistDetail.jobCode},1) = "3" then tonumber ({EInfo.user3})
else if Left({EPayHistDetail.jobCode},1) = "4" then tonumber ({EInfo.user4})
else
If Left({EPayHistDetail.detCode},1) = "2" then
if Left({EPayHistDetail.jobCode},1) = "1" then tonumber({EInfo.user1})*1.5
else if Left({EPayHistDetail.jobCode},1) = "2" then tonumber({EInfo.user2})*1.5
else if Left({EPayHistDetail.jobCode},1) = "3" then tonumber ({EInfo.user3})*1.5
else if Left({EPayHistDetail.jobCode},1) = "4" then tonumber ({EInfo.user4})*1.5
the user defined rate fields {EInfo.user1,2,3, or 4}. If it is overtime {EPayHistDetail.detcode} = "2" then it is *1.5. The problem I am having is that most of the employees that show up only show overtime "({EPayHistDetail.detCode}) = "2"",
and not regular wages.
This only happens for employees with{EPayHistDetail.jobCode}= "1" for both detCodes. It seems like the first line of the code that checks for jobcode = "1" is not executing. Is there a better way to write this code, or is there some syntax wrong here? Thanks for the help.
Code:
If Left({EPayHistDetail.detCode},1) = "1" then
If Left({EPayHistDetail.jobCode},1) = "1" then tonumber({EInfo.user1})
else If Left({EPayHistDetail.jobCode},1) = "2" then tonumber({EInfo.user2})
else if Left({EPayHistDetail.jobCode},1) = "3" then tonumber ({EInfo.user3})
else if Left({EPayHistDetail.jobCode},1) = "4" then tonumber ({EInfo.user4})
else
If Left({EPayHistDetail.detCode},1) = "2" then
if Left({EPayHistDetail.jobCode},1) = "1" then tonumber({EInfo.user1})*1.5
else if Left({EPayHistDetail.jobCode},1) = "2" then tonumber({EInfo.user2})*1.5
else if Left({EPayHistDetail.jobCode},1) = "3" then tonumber ({EInfo.user3})*1.5
else if Left({EPayHistDetail.jobCode},1) = "4" then tonumber ({EInfo.user4})*1.5