[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

Problems with decimals

Asked by corbinn in ColdFusion Application Server

Tags: decimals, problems, lte

I am using county codes to determine how much sales tax to charge for merchandise but for some strange reason it is not coming up with the correct answer.  They select their county on the first page and on the second page it shows them the subtotal, tax (if applicable), shipping/handling and the Total.

Here is my code for the tax and shipping/handling:

<cfif #form.county# eq 0181 or 0321 or 0481 or 0441 or 0431 or 0511 or 0561 or 0711 or 0861 or 0831 or 1021 or 1131 or 1231 or 1811 or 1911 or 2111 or 2411 or 2511 or 2541 or 2611 or 2781 or 2911 or 3121 or 3481 or 3501 or 3551 or 3561 or 3621 or 3881 or 3911 or 4241 or 4321 or 4411 or 4511 or 4691 or 4611 or 4641 or 4921 or 5081 or 5111 or 5421 or 5621 or 5721><cfset event98_qty = (sub_total * '.08')></cfif>
<cfif #form.county# eq 0221><cfset event98_qty = (sub_total * '.085')></cfif>
<cfif #form.county# eq 0621 or 1421><cfset event98_qty = (sub_total * '.0825')></cfif>
<cfif #form.county# eq 0911 or 1521 or 2221 or 2321><cfset event98_qty = (sub_total * '.0775')></cfif>
<cfif #form.county# eq 1611 or 1711 or 1781 or 1721 or 2011 or 3281 or 3251 or 3261 or 4091 or 4111 or 4131 or 5281 or 5211 or 5311><cfset event98_qty = (sub_total * '.07')></cfif>
<cfif #form.county# eq 2811><cfset event98_qty = (sub_total * '.08625')></cfif>
<cfif #form.county# eq 8051 or 5521 or 6861 or 6511><cfset event98_qty = (sub_total * '.08375')></cfif>
<cfif #form.county# eq 3081 or 3091 or 3014 or 3016><cfset event98_qty = (sub_total * '.095')></cfif>
<cfif #form.county# eq 1311 or 3321><cfset event98_qty = (sub_total * '.08125')></cfif>
<cfif #form.county# eq 3721 or 5561><cfset event98_qty = (sub_total* '.07875')></cfif>
<cfif #form.county# eq ""><cfset event98_qty = 0></cfif>
<!--- Shipping and handling Costs Below--->
<cfif sub_total LTE "15.00"><cfset event99_qty = 7.95></cfif>
<cfif sub_total GTE "15.01" LTE "30.00"><cfset event99_qty = 8.95></cfif>
<cfif sub_total GTE "30.01" LTE "45.00"><cfset event99_qty = 9.95></cfif>
<cfif sub_total GTE "45.01" LTE "60.00"><cfset event99_qty = 10.95></cfif>
<cfif sub_total GTE "60.01" LTE "75.00"><cfset event99_qty = 11.95></cfif>
<cfif sub_total GTE "75.01"><cfset event99_qty = 12.95></cfif>
<!---Total (Equation)--->
<cfset total = sub_total + event99_qty + event98_qty>

My code for the shipping costs is not adding up correctly as well.  I had something that had the sub_total of $23.50 and the shipping cost was $11.95
[+][-]10/11/06 08:43 AM, ID: 17707867Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/11/06 08:51 AM, ID: 17707937Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/11/06 09:06 AM, ID: 17708062Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: ColdFusion Application Server
Tags: decimals, problems, lte
Sign Up Now!
Solution Provided By: DanielSKim
Participating Experts: 2
Solution Grade: A
 
[+][-]10/11/06 10:17 AM, ID: 17708717Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/11/06 10:18 AM, ID: 17708723Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89