Print Page | Close Window

Confirm2 Tax Rate Rounding

Printed From: SalesCart
Category: Legacy Products
Forum Name: SalesCart Standard / PRO / SQL
Forum Description: All questions pertaining to SalesCart Standard, PRO and SQL should be posted here.
URL: http://forum.salescart.com/forum/forum_posts.asp?TID=495
Printed Date: April/27/24 at 12:04am
Software Version: Web Wiz Forums 11.04 - http://www.webwizforums.com


Topic: Confirm2 Tax Rate Rounding
Posted By: wesonline
Subject: Confirm2 Tax Rate Rounding
Date Posted: November/17/05 at 11:19am
In Confirm2.asp at the very bottom of the page in the GRAND SUMMARY OF CHARGES the REGULAR TAX RATE displays as 8.299999%. In the online order system I entered my state tax rate as 0.083. How can I round the displayed tax rate to 8.30%?



Replies:
Posted By: Selahbooks
Date Posted: November/17/05 at 3:09pm
I had the same problem in the SalesCart NET version although it was fixed in the next release. I used the math.round function as a workaround to correctly display the tax rate.
In confirm2.asp where the Tax Rate is displayed try the following:

<% =math.round((TaxRate(2) * 100),2) %>

-------------
Mike


Posted By: Selahbooks
Date Posted: November/17/05 at 4:50pm
Just realized that the above works with ASP.NET but will cause an error in classic ASP.
Another option is to try:

<%= int((TaxRate(2) + .0005) * 1000)/10 %>

-------------
Mike


Posted By: wesonline
Date Posted: November/21/05 at 11:12am
Mike,

Thanks for the guidance. I have PRO and with your suggestions I found that the fix was the following:

<%= TaxRate(2) * 1000 / 10 %>

I ran a couple of dummy sales and it seems to be working.

Thanks agiain.

WES



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.04 - http://www.webwizforums.com
Copyright ©2001-2015 Web Wiz Ltd. - http://www.webwiz.co.uk