calculate hours per payroll, finish js refractor