1 Reply Latest reply on Oct 2, 2014 12:37 PM by philmodjunk

    Timesheet

    AimeeOldenburg

      Title

      Timesheet

      Post

      Ok, I have been searching for over a week trying to find a simple way to create this, but I am officially stumped.

      Basically, I need to create a timesheet for our crew. We run on a semi-monthly payroll, periods being 1-15 & 16-31. Our crew automatically gets paid overtime for anything worked over 40 hours a week (which means I usually have to pull time from the previous pay period if the current pay period started in the middle of the week). They also automatically get paid overtime on weekends, regardless of the number of hours worked. I do not need this to calculate the actual pay, just the total number of hours for regular and overtime pay. 

      They are also allowed two unpaid breaks per day, so there are three log in/log out fields per day. I already have the calculations to add the time for the day together, but am stumped when it comes to calculating whether the week has reached 40 hours or to have it automatically know if the day of the week is on a weekend.

      Anybody have any ideas how to accomplish this?

        • 1. Re: Timesheet
          philmodjunk

          Do you have a table where each record records the time worked by one employee for a period of time not greater than one day? (several per day are OK).

          If so, you can set up a self join relationship that matches these records to all records by the same employee for the same week provided that you have a date field in each record that records the date for which that time was logged.

          1) Define a calculation field, cWeek with this expression:

          DateWorked - DayOfWeek ( DateWorked ) + 1

          Select Date as the result type.

          This calculates the date for Sunday of the same week so all records logged on the same week compute the same date in this field.

          2) Go to Manage | Database | Relationships and add a new Tutorial: What are Table Occurrences? of your WorkLog table by selecting the existing "box" and clicking the duplicate button (two green plus signs). Link them in this type of relationship:

          WorkLog::_fkEmployeeID = WorkLog 2::_fkEmployeeID AND
          WorkLog::cWeek = WorkLog 2::cWeek

          3) now a calculation field can be defined such as:

          Sum ( WorkLog 2::Hours )

          to compute the total hours worked over the bast calendar week for the employee that logged the work in the current WorkLog record.

          Caulkins Consulting, Home of Adventures In FileMaking