vendredi 22 mai 2015

how can i calculate how many hours an employee worked in the office,based on his every check-in, check-out time in a day, for an employee in rails?

iam implementing HR management system, which calculates the working hours of employee, for every check-in and check-out. an employee can check-in check-out as many times as he want in a day. here i want to calculate the time between all checkins and checkouts of each day, and i want to consider only this is the time he worked. instead of calculating the time difference between the first check-in and last-checkout. how can i implement this in rails? iam having employee model and check-in-out model and i implemented the has many relation, like an employee has many check-in check-outs and check-in check-out belongs to employee.

Aucun commentaire:

Enregistrer un commentaire