Operation for number of Earn leave availed in the year
I have the requirement whereby Earn leave entitlement will be generated for the worker only if he has been present for at least 240 days in the year.
In case of the number of present days are less then 240, then if sum total of number of Present days and Earn leaves availed in the year equals 240 Earn leave entitlement should be generated.
I am able to get no. present days but am not sure how to get number of Earn leave availed and only in the current year.
Can I use operation "VARSTLRDxy"? If not then please suggest the appropriate operation.