on 10-04-2017 10:24 PM
I have the following formula, I get the Division by zero errors message. The SThous, OT1hours , or OT2hours , any of them could be zero, but at least one of them is not zero.
if {Employee.qHourSal} = "H"
then
(({@STHours} + {@OT1Hours} + {@OT2Hours}) * {PayrollEarnings.qSTRate}) +{@Benefits}*(({@STHours} + {@OT1Hours} + {@OT2Hours})/({@STHours} + 1.5*{@OT1Hours} + 2*{@OT2Hours})) + {@AddlComp}
else
// S {@STWages} + {@Benefits} + {@AddlComp}
Why is you else condition commented out
Try
if {Employee.qHourSal} = "H"
then
(If {@STHours} + 1.5*{@OT1Hours} + 2*{@OT2Hours} = 0 then 0 else
(({@STHours} + {@OT1Hours} + {@OT2Hours}) * {PayrollEarnings.qSTRate}) +{@Benefits}*(({@STHours} + {@OT1Hours} + {@OT2Hours})/({@STHours} + 1.5*{@OT1Hours} + 2*{@OT2Hours})) + {@AddlComp}
)
else
S {@STWages} + {@Benefits} + {@AddlComp}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.