Page 1 of 1

very difficult code - program

Posted: Tue Jun 15, 2004 11:55 pm
by gaurav_sting
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

Posted: Wed Jun 16, 2004 12:46 am
by snpo123
Thats kind of asking a lot, perhaps job hunt would be a better place to post this...

Posted: Wed Jun 16, 2004 12:57 am
by feyd
gaurav_sting, do you want someone to write this for you.. or for us to give suggestions and avenues of approach?

If you want someone to write it for you, are you willing to pay? How much? What kind of time frame to complete this is required?

Posted: Wed Jun 16, 2004 1:51 pm
by lostboy
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...