gamonoid / issues

0 stars 0 forks source link

Non Working Days Leaves #138

Open gamonoid opened 9 years ago

gamonoid commented 9 years ago

Original report by Devraj Raut (Bitbucket: devraj_raut, GitHub: Unknown).


My Company Policy states that Long Leaves which include any Public Holidays or Weekends which are over lapped, are counted as Leaves. For Eg. 5 Days Leave from Friday to Tuesday (Sunday is counted as a Leave). So 5 Leaves are Deducted.

Can u help me out to change this logic in the code?

Thanks a Lot!!

gamonoid commented 9 years ago

Original comment by Devraj Raut (Bitbucket: devraj_raut, GitHub: Unknown).


Could You pls respond to the above mentioned issue. I would really appreciate it. Thanks!!

gamonoid commented 9 years ago

Original comment by Devraj Raut (Bitbucket: devraj_raut, GitHub: Unknown).


Thanks for the Reply. Can u pls give me some kind of suggestion of what Logic i need to implement and in exactly which function should i modify to suit my needs?

The Logic i Need to implement is Any Non Working Day coming in between an Applied Leave Period should be counted as a Full Working Day

Or

The Total number of Leaves applied for, should be Incremented by the number of Non Working Days present in between the Range of Applied Leaves.

Can u Help me out in Applying this Logic. This feature can be Implemented in the Leave Module as an Optional Setting for Organizations who have this requirement. Many Organizations in India have this rule.

Kindly Note.

Thank You!

gamonoid commented 9 years ago

Original comment by Thilina Hasantha (Bitbucket: thilina, GitHub: thilina).


Currently this is not directly supported. But as a work around you can remove holidays and make Saturday and Sundays working days through WorkDays tab.

But if you want to change it the proper way you may have to edit leave module and do changes to following function for getting available leave count for an employee

https://github.com/thilinah/icehrm/blob/master/modules/leaves/api/LeavesActionManager.php#L407

Since this is a very specific requirement we wont be able to integrate this to leave module