ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Leave Balance on a specific date


#1

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?


#2

Hello,

Can anyone kindly suggest anything for this?

Is this kind of implementation possible?


#3

Hi, Employee Leave balance information can be obtained from the Employee Leave Balance report. You can filter our information for different dates.

If you want to restrict the Employee from taking leaves more than the ones allocated (negative leave balance), ensure that the Allow Negative Balance checkbox for that particular Leave Type is checked as shown.

Hope this helps.


#4

Hi,

Thanks for your response.

But in the case that I have mentioned, the employee leave balance is 1 when he is applying for the leave of 6th July (on 9th). But still the system should restrict, since the balance was added on 8th. For 6th, the balance is 0 not 1.


#5

Basically,

I want to restrict employees from applying backdated Compensatory Off leaves if they did not had sufficient comp off balance on that specific dates mentioned in the leave application.


#6

Hi @teamcodez i think you have to use code to create a validation for this functionality .


#7

Is there any existing function to get such kind of leave balance (as mentioned in the case) in erpnext?


#8

@teamcodez Although I am not a totally certain, I do not think there is a function to get an employee’s leave balance at a certain date