Pay rates based on hours worked

Hi,

Sort of new to Freeway, I tried 5 a while back and am now back with 7 and have what I would imagine to be an awkward one!

Basically I want a form to be able to work out total pay, but I want it to be intelligent.

There are 3 pay rates:
Mon-Sat 9am-5pm
Mon-Sat 5pm-9am (Exception with saturday, this only extends to midnight)
Sun & Bank Hol

What I would love is to have a table with days of the week and two time entry fields, one start, one end.

If I enter monday to friday 9-5 it automatically works out based on rate 1.
But then if I change it to say I worked until 7pm on wednesday I want it to automatically adjust the total pay based on the two hours worked at the higher rate.

I do not want to have to choose different rates, or enter a total amount of overtime hours, I want it to just work it out.

I have no issue with a lot of back end work, so if I have to enter the pay rate for every single hour of every day and then it knows what it needs to, then thats fine.

Also, I have no problem if the data in the time entry has to be in an extremely specific format.

Please bare in mind you are dealing with a novice here so try to spell things out as much as possible! Don’t assume anything :slight_smile:

Thanks folks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Alex,

What you describe is perfectly do-able, but it’s not a Freeway task.
This would require custom JavaScript or server-side (probably PHP)
coding. If it’s important that people couldn’t hack the form and force
it to tell you (or whoever’s actually making payments) an inflated
figure then server-side is important, even if it’s just to verify the
amount. But JavaScript run in the browser would be dynamic and
immediate, updating totals without needing requests sent back to the
server and results returned.

It can certainly be integrated fully into a Freeway site, but it’s not
something you’d make in Freeway.

It could be a good way to get up to speed with these languages
(JavaScript and/or PHP), but you’ll need to have a fair chunk of time to
devote to the exploration and a burning inner desire to learn this level
of coding. Or, perhaps, a bit of budget to give to someone who can write
it for you. It’s not a massive task, but it’s definitely more complex
than the JavaScript that controls traditional rollover effects.

k

On 13 Nov 2014, at 8:10, Alex Lyons wrote:

Basically I want a form to be able to work out total pay, but I want
it to be intelligent.

There are 3 pay rates:
Mon-Sat 9am-5pm
Mon-Sat 5pm-9am (Exception with saturday, this only extends to
midnight)
Sun & Bank Hol


Keith Martin
Technical Editor, MacUser magazine
Senior Lecturer, LCC (University of the Arts London)


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi, I don’t think Freeway standard is capable of doing things you asked. It
has no spreadsheet capabilities. I think you should implement a third party
script. Or perhaps theres a wizzkid among us? Andries
Op 13 nov. 2014 09:10 schreef “Alex Lyons” email@hidden:

Hi,

Sort of new to Freeway, I tried 5 a while back and am now back with 7 and
have what I would imagine to be an awkward one!

Basically I want a form to be able to work out total pay, but I want it to
be intelligent.

There are 3 pay rates:
Mon-Sat 9am-5pm
Mon-Sat 5pm-9am (Exception with saturday, this only extends to midnight)
Sun & Bank Hol

What I would love is to have a table with days of the week and two time
entry fields, one start, one end.

If I enter monday to friday 9-5 it automatically works out based on rate 1.
But then if I change it to say I worked until 7pm on wednesday I want it
to automatically adjust the total pay based on the two hours worked at the
higher rate.

I do not want to have to choose different rates, or enter a total amount
of overtime hours, I want it to just work it out.

I have no issue with a lot of back end work, so if I have to enter the pay
rate for every single hour of every day and then it knows what it needs to,
then thats fine.

Also, I have no problem if the data in the time entry has to be in an
extremely specific format.

Please bare in mind you are dealing with a novice here so try to spell
things out as much as possible! Don’t assume anything :slight_smile:

Thanks folks


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Keith,

Thanks for that.

This is going to be a mockup site, not live, so functionality does not have to be 100%. If it required an update button initially that would’t be an issue.

However that level of learning and coding is beyond me and my time availability…

Basically there is a system that I believe is extremely outdated in terms of looks and functionality, and I would prefer a new HTML5 site that has the core functionality but done very well.

This pay feature is something that is vital but taking very long to build in to the existing system as it is breaking a lot of other features that aren’t necessary.

I want to go to the people in charge with an at least partly functional new version that is simple but works…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Well, as Keith said, either you have the time and inclination to learn this (and what you have described does not sound terribly difficult on the face of it, however I am speaking as someone who has coded from scratch for the past 17 years) or you need to splash out for someone else to write it for you.

Here’s how I would start this. Make a table, lay out your form inside it. Don’t bother too very much at this stage with how the thing looks, just sketch out the movable parts. Take care when naming your form fields, so they follow a predictable pattern. Use the Name field in the third tab of the Inspector (while the field is selected) to make these changes. So something like mondayStart, mondayEnd, tuesdayStart etc. Even better would be to nest the names, so you had monday[start], monday[end] etc.

Make an HTML box with a default value in it ($0.00) where you want the result to appear. If you want the form to just calculate on the fly, then you can skip the submit button, but if you want the user to press a control to re-calculate the results, then add that button.

Upload the test form to a public URL somewhere, and if one of us has a moment, we could possibly get you started with the JavaScript. Working with time in JavaScript is not impossible, but it is also not as straightforward as some other languages I can think of. (Ruby’s time handling, especially with the goodies provided by ActiveSupport in Rails is one of the very best. Time.now + 4.days is valid Ruby code.) This reminds me, there is a port of the ActiveSupport library from Ruby to JavaScript, so you may be able to get away with this after all.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options