Niluki Peters 27.Nov.09 05:55 AM a Web browser Notes Client7.0.1 FP1All Platforms
This is a over time approval work flow
there are two rangers one is double and other is normal if is normal the hours(A) should be multiply by
1.5 if double it should be multiply by 2.
hours taken as a Number field ,2 decimals separate by ( : )
eg:- 3:00
5.00 N 7:30
5.00 D 10:00
I have used this script below. Every things comes neatly, the problem is if the answer is 12:00 for Approved Hrs it calculate as 0.00 they should be able to enter 12 hrs overtime. Please help me with this.
If normal Then
noamt=Format(hrsarr(n),"0.00")
Lval = Strleft(noamt, ".") *60
Rval = Right(noamt, 2)
NewTime=Timenumber(0,((Lval+Rval)*1.5),0)
NewVal=Format(NewTime,"hh:mm")
nratearr(n)=NewVal
Else
nratearr(n)=cdoc.fldThrs(n)*2
noamt=Format(hrsarr(n),"0.00")
Lval = Strleft(noamt, ".") *60
Rval = Right(noamt, 2)
NewTime=Timenumber(0,((Lval+Rval)*2),0)
NewVal=Format(NewTime,"hh:mm")
nratearr(n)=NewVal
End If
'**************