How to restrict the dates on leave application to holiday list

When user select a holiday list and try to select the dates. The dates should be restricted to the dates mentioned in the lists

Hi,

Are you looking for Leave Block Dates? Check Human Resources > Leaves and Holiday > Leave Block List

Best,
Prakash

Thank you Prakash for the reply.
I want following

  1. I have defined some dates in list when employees can take leave. For example,
    we have some fixed holidays which include say 26th Jan, 1st May, 15th August,
    etc. These dates are defined in a holiday list…say Fixed Holidays
  2. While applying leave, if employee select “Fixed Holidays” as holiday list
    then only the defined dates should be shown in From date and To date option.
    Please let me know how can this be done.
    Gopal

Please can you indicate where you defined the dates in list? It will throw more light on where the set the holidays.

Leave holidays are assigned to the employee. These dates are to be excluded from the leave type requested by an employee unless the Leave Type includes holidays within leaves as leave.

I am trying to figure out where the employee selects let’s say “Fixed Holidays”??

Refer to this for more info
https://erpnext.org/docs/user/manual/en/human-resources/leave

Hello,
I have defined dates in ……HR—>Holiday List. Here I created a new list and
then defined the dates.
Now my exception is that when an Employee try to apply for a leave he first
select ……Leave Type…………in that he select a list…say Fixed holiday………….then when
selecting the From and To dates he should be able to see only those dates which
are defined in that particular list.
Gopal

Hello

Any feedback on this?

Gopal

Sorry for my late response.

The employee does not choose the holiday list. It is assigned to the employee by HR. Please, do not confuse Holiday and Leave days. Holidays are days you define that you want to either include or exclude in the calculation of leave days an employee is entitled to.

In creating a leave type, you choose whether to include holidays as part of leave days

This is a sample holiday list which contains all Saturdays and Sundays as well as national holidays.

This holiday list is then assigned to the employee who will apply for the leave. It means these days will be ignored in counting leave days for the employee.

In this instance above, when the employee applies for leave, weekends and national holidays will not be counted as part of leave days.

For example, if the employee applies for leave from Friday 30-Mar-2018 to Friday 06-Apr-2018, it will be counted as 6 days and not 8 days because we have assigned the holiday list to this employee and so Saturday and Sunday will be ignored.

I hope this helps.

2 Likes

Hi Kevingee

Thank you for the response and detailed explanation. This helps a lot and
clears my doubts.

Can we define particular dates in Leave Type, so that when an employee
select leave type he sees only those dates in From and To dates?

Gopal

This is how leave management works in most systems.

The employee tells you when he/she wants to start the leave and when he/she wants to return to work.

So the employee selects the leave type, when to start (From), when to return to work (To), the system checks the outstanding balance on that particular leave and the number of days to be taken factoring in the days in the holiday list.

If you run a different kind of leave management, then you would have to develop your custom leave system. Other than that, you will have find a way to make the current system work for you.

Hope it helps.

We have a slightly different system in one or two cases. We can manager it.

Thank a lot kevingee for your support. Appreciate it.

Gopal

Sorry for beating this dead horse but I have a problem with employee leave applications.
This is what I thought that the ERP will handle like the leave application process.
I have all the weekends and national holidays defined for the current year, then assigned to the employee. The problem is that in the application form the total leave days are correct but in the “Monthly Attendance Sheet”, the holidays and weekends are ignored.
I can also confirm that for that defined type of leave “Include holidays within leaves as leaves” is unchecked.
The ERP and Frappe versions are 12:

Installed Apps

ERPNext: v12.18.0 (version-12)
Frappe Framework: v12.15.0 (version-12)

Is there anything that I might be missing or forgot to configure (jumping to v13 is planned for 2022)?

Cheers,
-Tiho