It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Simple Comparison Calculation

Simple Comparison Calculation

Postby kelley_mc on Thu Mar 12, 2009 1:39 am

I am trying to do what I think is a basic script and I have been searching the web for 2 days but I keep coming up empty with what I need to do. So I figured I would ask the experts. :) I would really like to thank everyone in advance for your help.

Here's my question, I built a basic form here: www.mynurserecruiter.com/calculator/3.htm

I would like the calculation to be the following:
Add:
Hourly Bill Rate (from form) x Contract Hours (from form)

Less:
Nurse Pay Rate (from form) x Contract Hours (from form)
Nurse Pay Rate (from form) x Contract Hours (from form) x .0765
Nurse Pay Rate (from form) x Contract Hours (from form) x .035
Nurse Pay Rate (from form) x Contract Hours (from form) x .05

Then display the net result in the "Expense of a Travel Nurse"

I am aware that the "Less" calculations can be combined but I would prefer to keep them separated in case I need to make any future changes. The amounts represent the pay rate, payroll taxes, workers comp and other benefits.

Thank you,
Kelley
kelley_mc
 
Posts: 4
Joined: Thu Mar 12, 2009 1:37 am

Re: Simple Comparison Calculation

Postby rangana on Thu Mar 12, 2009 6:45 am

Hi Kelley,

For the less, how do you want the value be displayed?

I assume these formula:
Nurse Pay Rate (from form) x Contract Hours (from form)
Nurse Pay Rate (from form) x Contract Hours (from form) x .0765
Nurse Pay Rate (from form) x Contract Hours (from form) x .035
Nurse Pay Rate (from form) x Contract Hours (from form) x .05

...expects you to get 4 different results.

Hoping to hear some response.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Re: Simple Comparison Calculation

Postby kelley_mc on Thu Mar 12, 2009 9:33 am

Thank you for the response. Actually, I only needs the net result displayed. So it should be the 1 addition, less all 4 values equals the net.

Thank you again.
kelley_mc
 
Posts: 4
Joined: Thu Mar 12, 2009 1:37 am

Re: Simple Comparison Calculation

Postby rangana on Thu Mar 12, 2009 9:54 am

I'm not sure I totally understand it.

Could you please re-iterate the formula.

...and please give example, for instance the input for "Hourly Bill Rate" is 5, and when the input of "Nurse pay rate" is 3, the value should be 10....or something along those lines.

That way, I would understand things much clearer :)
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Re: Simple Comparison Calculation

Postby kelley_mc on Thu Mar 12, 2009 9:59 am

Sure, thank you again.

If I used the following entries:
Hourly Billing Rate - 60
Contract Hours - 100
Nurse Pay Rate - 30

The Calculation Should Be: (60x100)-(30x100)-(30x100X.0765)-(30x100X.035)-(30x100x.05) = $2,515.00

I don't want to be difficult but now that I look at the display, is there any way to get the calculations to show? So in my example input of:
Hourly Billing Rate - 60
Contract Hours - 100
Nurse Pay Rate - 30

Could the display look like this?
Estimated Billings - $6,000.00
Estimated Pay - $3,000.00
Estimated Payroll Taxes - $229.50
Estimated Workers Comp - $105.00
Estimated Benefits - $150.00

Net Difference - $2,515,50
kelley_mc
 
Posts: 4
Joined: Thu Mar 12, 2009 1:37 am

Re: Simple Comparison Calculation

Postby rangana on Thu Mar 12, 2009 10:29 am

Sure, it can be designed to output as you desire, but how did you come up with those values? Those with "Estimated..."?

Also, could you please show us your code to where you're stumped.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Re: Simple Comparison Calculation

Postby kelley_mc on Thu Mar 12, 2009 11:53 am

Thank you. The estimate values are what will be calculated. For example, IF I enter the following on the form:
Hourly Billing Rate - 60
Contract Hours - 100
Nurse Pay Rate - 30

I would like the following to display:
Estimated Billings - $6,000.00
(this would be the input Hourly Billing Rate x the input Contract Hours)
Estimated Pay - $3,000.00
(this would be the input Contract Hours x the input Nurse Pay Rate)
Estimated Payroll Taxes - $229.50
(this would be the input Contract Hours x the input Nurse Pay Rate x .0765)
Estimated Workers Comp - $105.00
(this would be the input Contract Hours x the input Nurse Pay Rate x .035)
Estimated Benefits - $150.00
(this would be the input Contract Hours x the input Nurse Pay Rate x .05)
Net Difference - $2,515,50
(this would be the calculated Estimated Billings - calculated Estimated Pay - calculated Estimated Payroll Taxes - calculated Estimated Workers Comp - calculated Estimated Benefits)

Hopefully that makes sense. As for the code, I don't have the calculation code done at all. I couldn't make any good progress with it. All I have done was create the form which is here: http://www.mynurserecruiter.com/calculator/3.htm
kelley_mc
 
Posts: 4
Joined: Thu Mar 12, 2009 1:37 am

Re: Simple Comparison Calculation

Postby rangana on Thu Mar 12, 2009 2:54 pm

Yes it does. I'm confuse on how do you want the result be seen.

You only provided one textbox, and that is for "Expense for a travel nurse" - please elaborate a little further.

Also, this is not a free coding service forum, please show us where you're stumped so that you'll be able to gain inputs at the same time.

Hope that makes sense.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Re: Simple Comparison Calculation

Postby rangana on Fri Mar 13, 2009 1:46 am

I guess, you might want to update this thread as fixed. Reference:

http://codingforums.com/showthread.php?t=161028
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Re: Simple Comparison Calculation

Postby PKpangZer on Fri Sep 25, 2009 5:44 am

This is not a charge less coding account forum, amuse appearance us area you're addled so that you'll be able to accretion inputs at the aforementioned time.



_________________
Medical travel insurance
PKpangZer
 
Posts: 1
Joined: Fri Sep 25, 2009 4:53 am


Who is online

Users browsing this forum: No registered users and 8 guests