Time Cards with automatic overtime
I have a database for time cards and I need to add in overtime. I would like to have the database automaically calculate these but it seems like a multi level calculation and I haven't had luck in figuring it out.
It's a 2 parter:
I need to calculate anything over 8 hours in a day as time and a half and 12 hours as double time
anything over 40 hours in a week is time and a half.
I can easily get it to do 1 or the other but not both.
So for example:
Monday: 8 hours
Tuesday: 8 hours 2 OT
Wednesday: 8 hours 4 OT 1 DOT
Thursday: 8 hours
Friday: 8 hours 2 OT
(we have now hit 40 hours of regular time so automaically any hours worked are OT and over 8 is DOT)
Saturday: 8 OT 1 DOT
Sunday: Day off
Can anyone help me with this logic? Thanks