I am developing a leave application system & i want to have a functionality that if an employee applies for a leave & his leave is not approved by his reporting manager within 3 days of the application date then an automatic approval should be generated & a mail should be send parallely to the employee who has applied for the leave & also to the reporting manager & duration of 3 days should not include saturday's,sunday's & national holidays.Please send me some replies which can solve this issue.
What's the actual question? How to send mail? How to check the database for dates three days in the past to determine who gets emails?
Joined: Jul 21, 2010
the actual question is:
if I am the employee & I am applying for a leave say for example I post my application on 22/07/2010,for a leave of 7days from dates 02/08/2010 till 08/08/2010,
1. at the time of application it should check the calendar & display that 07/08/2010 & 08/08/2010 are saturday & sunday,so can't apply for leave on these days.
2. as I have applied on 22/07/2010 & my reporting manager dosen't responds to it in next three working days,then by default it should calculate the next three working days i.e. by 27/08/2010, the application should be approved by not counting the Saturday & Sunday i.e. 24 & 25 july & approve the leave on 27/08/2010 early morning & a mail should be triggered parallely to the applicant as well as the reporting manager.
Run a daily job to sweep the database looking for appropriate dates.
You know how to find what day it is, you know how to decide if weekends come into play, I would assume you have a way of knowing what holidays you have to pay attention to: given all that, can you think of a way to decide what date you need to check for?
Joined: Jul 21, 2010
the main problem is:
We don't know how to calculate the weekends & national holidays in the duration of the leave applied for
How to match the calender for excluding weekends for auto approval scheduling of mails.
How to do it from front-end in java class the scheduling of validation & auto-approval mails.