Month Wise Leave Allocation

Hi Everyone,
While going through HR Module, I noticed that the leaves are allocated on monthly basis however you are entitled for let say 12 EL and 8 CL in a year but these leaves are allocated on month basis like:
EL 1 per month
CL 0.67 per month

Now, what is the work-around for this in ERPNext because here we need to allocate the leaves in total not month wise.

Regards
Ruchin Sharma

I think this algorithm is fine for the same:

var i=1;
//for example DOJ is 15/03/2014 and current date is 12/10/2015
if (current_year_number>doj_year_number) 
{
  for (i=1; i<month_number_of_current_date;i++); //for month
 //after the loop
    if(day_number_of_date_of_joining>15) //if the employee joins after 15
  {
     i=i-0.5;
   }
}

if (day_of_current_date>15)
   {
	i=i-0.5 //if the current date is less than 15 then leave allocation for the month will be 0.5
   }
current_leave_balance = i

@rmehta @neilLasrado @anand @nabinhait @saurabh6790
Can anyone of you please look into it and correct me if I am wrong.
Also, I appreciate if anyone of you can help me using date functions to extract month_number, year_number, current_day from the date.

In HR Module Allow to Use Calander Year · Issue #1938 · frappe/erpnext · GitHub coming soon.

@ruchin78 maybe an opportunity to take with management to allocate leaves yearly. Seems really evil that you can’t take a long leave in the first half of the year!

1 Like

@ruchin78 Any idea about month wise leave application is present or not in Version 10 or 11