I have created leave application for Privilege leave for the dates 1 jul to 3 jul ,there was sunday on jul 2 and i disabled flag “Include holidays within leaves as leaves” . using this configuration i am able to apply total 2 days leave but it doesn’t allow mark present for jul 2 it only takes on leave status. so what is the benefit of this feature .
@poojavadher what version are you on? This was fixed back in v14 & 13 too.
frappe:develop
← ruchamahabal:fix-holiday
opened 07:51AM - 24 Jan 22 UTC
## Steps to replicate:
- Create a Leave Type with **Include holidays within l… eaves as leaves** disabled
<img width="1296" alt="holidays" src="https://user-images.githubusercontent.com/24353136/150738055-54f4846a-e095-4574-b62b-95d94d9d091f.png">
- Create a Leave Application that has holidays in between.
<img width="1296" alt="leaves" src="https://user-images.githubusercontent.com/24353136/150741505-a98286d1-b68f-427e-a25e-b4957d621b18.png">
- Since the above setting is disabled, the holidays in between should not be considered as leaves but holidays.
- Even though the **Total Leave Days** are calculated correctly (after excluding holidays), attendance is marked for 6 days (holidays included) with the status "On Leave"
## Fix:
Honour **Include holidays within leaves as leaves** while marking attendance too, and not just while calculating Total Leave Days.
<img width="1296" alt="leave-das" src="https://user-images.githubusercontent.com/24353136/150742324-0938ea59-a2df-4edd-b7b5-3a5b53231c00.png">
P.S: These had no side effects like affecting leave balance because total leave days are/were calculated fine. Just attendance marking was corrected.
Versions:
ERPNext: v14.35.1 (HEAD)
Frappe Framework: v14.45.0 (HEAD)
Frappe HR: v14.10.1 (HEAD)