Hi,
I am preparing an employee portal. As the employee logs in website he/she will be treated as present, if he has not logged in it will treated as absence.
This I have done. Now as he logs in I will compare with the previous day using datetime.add(-1) get the values and see whether he logged in the previous day. If not he will be required to fill out the reason of his absence. I will find out whether the day was sunday using day function. if so he will not be asked for any reason. Now my problem is if he puts leave more than one day Consider this situation an employee has taken leave on friday,saturday and sunday. saturday was some public holiday. Now only I have to ensure that friday was treated as absent not other days. Of course I will retrieve all the dates from where he last logged in.But how to proceed from now on.
Please give some idea.
Regards
cmrhema
I am preparing an employee portal. As the employee logs in website he/she will be treated as present, if he has not logged in it will treated as absence.
This I have done. Now as he logs in I will compare with the previous day using datetime.add(-1) get the values and see whether he logged in the previous day. If not he will be required to fill out the reason of his absence. I will find out whether the day was sunday using day function. if so he will not be asked for any reason. Now my problem is if he puts leave more than one day Consider this situation an employee has taken leave on friday,saturday and sunday. saturday was some public holiday. Now only I have to ensure that friday was treated as absent not other days. Of course I will retrieve all the dates from where he last logged in.But how to proceed from now on.
Please give some idea.
Regards
cmrhema
Comment