madman411 Posted September 9, 2013 Posted September 9, 2013 I'm trying to simplify a manual calculation I'm having to perform right now. The company I am with pays employees a day rate ("rate") rather than hourly. No matter what the employee is guaranteed 12 hours of pay per day (sometimes the day rate is for 10 hours). The rate needs to be broken down into an 8-hour ("first 8") hourly rate + time and a half ("remaining") for the remaining 4 hours (or 2 hours if the rate is for 10) to equal the overall day rate. The duration of the day ("duration") is a set of radio boxes. How can this calculation be set up?
eos Posted September 9, 2013 Posted September 9, 2013 Let ( [ theDuration = 12 ; // your field here thePay = 120 ; // your field here overtimeFactor = 1.5 ; theRemaining = theDuration - 8 ; hoursFactored = ( theRemaining * overtimeFactor ) + 8 ; hourlyRateFactored = thePay / hoursFactored ; first8Pay = 8 * hourlyRateFactored ; remainingPay = theRemaining * hourlyRateFactored * overtimeFactor ] ; "First8 = " & Round ( first8Pay ; 2 ) & ", remaining = " & Round ( remainingPay ; 2 ) )
madman411 Posted September 9, 2013 Author Posted September 9, 2013 Thanks for your prompt response, eos. Can you clarify which field this calculation would be applied to? I was under the impression several fields would need separate calculations depending on what part of the rate was being calculated.
eos Posted September 9, 2013 Posted September 9, 2013 The text result was just for demo. You could choose one field (e.g. first8) to use the calculation (and then of course specify the variable first8Pay as the result), and calculate the other with the expression paymentField - first8.
madman411 Posted September 10, 2013 Author Posted September 10, 2013 The text result was just for demo. You could choose one field (e.g. first8) to use the calculation (and then of course specify the variable first8Pay as the result), and calculate the other with the expression paymentField - first8. Perfect. Thank you!
Recommended Posts
This topic is 4150 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now