hi everyone,
i am facing a sitution, in developing an employee system. plz help me coding following problem, i have not been able to write a suitable code for it.
An employee fills in a leave request, a record is created for the request. This request doc goes to his supervisor for approval. In case he does not reply within say 5 "working days", then his case is escalated to someone higher in the org. hierarchy. So we need to calculate the escalation period automatically, and send mails as and when appropriate.
Then the system picks up all the unapproved requests, calculates the time elapsed (ie time since no action has been taken on the request), ...
.and if its elapsed 5 "working days", it shoots a mail to the concerned authority. Now these working days can be Mon-Fri or Mon-Sat.
this is the situation i am facing, but i am unable to code it properly,
plz help me with a suitable code.
** Moved to Volunteer section**
Infolock
very difficult code - program
Moderator: General Moderators
-
gaurav_sting
- Forum Newbie
- Posts: 19
- Joined: Sat Mar 27, 2004 3:45 am
- Location: Delhi
you are going to need some way to fire the check event, to test the time elapsed and whether it was checked or not...You could
a. rely on users to trigger something, perhaps when they login --> not bad if you can determine the level of activiity is enough to trigger this event every day / hour?
b. a cron job set to run at a certain time each day / hour --> best option
c. run the check manually? --> bad idea, why waste your time
Once you id the route you want to take...code the page and implement it...then check itself isn't that hard when you use datediff or one of the other date time functions that mysql offers...
a. rely on users to trigger something, perhaps when they login --> not bad if you can determine the level of activiity is enough to trigger this event every day / hour?
b. a cron job set to run at a certain time each day / hour --> best option
c. run the check manually? --> bad idea, why waste your time
Once you id the route you want to take...code the page and implement it...then check itself isn't that hard when you use datediff or one of the other date time functions that mysql offers...