Suppose an employees gets a Compensatory Off allocated on 2nd of July(for example).
Available Compensatory Off Balance= 1
The employee again gets a new Comp Off on 8th.
New Comp Off Balance = 2
The employee was absent on 4th and 6th.
On 9th, The employee creates a Leave Application for 4th of July because he was absent that day.
Comp Off Balance after the deduction= 1
But if the employee tries to apply a leave application for 6th now, the system should restrict since the balance on 6th is 0.
How can I get leave balance of an employee on a specific date?