close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Tax rate is rounded up in ecart

Thread begun 7/28/2009 12:05 pm by eric284736 | Last modified 8/17/2009 8:29 am by Ray Borduin | 5640 views | 15 replies |

eric284736

Tax rate is rounded up in ecart

Hi,

We have a tax rate of 0.0975 for CA residents and it appears that the tax is rounded up. Is this because the force decimals is checked for currency?

An example on an order of $305, the tax should be 29.74, but it is $30.

thx
Eric

Sign in to reply to this post

Ray BorduinWebAssist

I don't think so. I would have to look at the code, but it should actually have the exact rate without rounding by default, so I'm not sure exactly what is happening.

Sign in to reply to this post
Did this help? Tips are appreciated...

eric284736

Hi Ray,

What page do you need in order to see the code?

thx
Eric

Sign in to reply to this post

Ray BorduinWebAssist

I would want to see the code where the amount is displayed, and I would want to see the function definition in the ecart include file where the rate is defined.

Sign in to reply to this post
Did this help? Tips are appreciated...

eric284736

this is the page eCart1_VB.asp

thanks,
Eric

Attached Files
cart-VB.txt
Sign in to reply to this post

Ray BorduinWebAssist

Odd... are any of your other charges rounded as well?


<%
function WAEC_eCart1_SalesTax()
totalTax = 0
if (true AND ((WA_eCart_GetTaxableTotal(eCart1) > 0) AND (cStr(Session("eCartCheckoutForm_shipping_state_province")) = "CA"))) then
totalTax = totalTax + (WA_eCart_GetTaxableTotal(eCart1) * cDbl(0.0975))'Result
end if
WAEC_eCart1_SalesTax = WA_eCart_FormatNumber(totalTax, eCart1.ForceDecimalsC, eCart1.DecimalPlacesC)
end function
%>

was the code I was looking for from this file, as well as:

thisCart.ForceDecimalsW = false
thisCart.DecimalPlacesW = 2

This all looks correct to me though. What about where it is displayed? Maybe it is rounded incorrectly there? Is it accounted for in the grandtotal as the rounded value or is it correct in the grand total?

Sign in to reply to this post
Did this help? Tips are appreciated...

eric284736

Ray,

This is the code that displays on the confirm page and it displays the tax (incorrect):

<div class="eC_OrderSummary">
<table border="0" align="center" cellpadding="0" cellspacing="0" class="eC_CartSummary">
<%
'WA eCart Merchandizing Show Start
'ecart="eCart1"
if (WA_eCart_GetDiscounts(eCart1) > 0 OR WA_eCart_GetCharges(eCart1) > 0 OR WA_eCart_GetShipping(eCart1) > 0 OR WA_eCart_GetTax(eCart1) > 0) then
%>
<tr>
<td class="eC_Subtotal eC_SummaryLabel">Sub-total</td>
<td class="eC_Subtotal"><%=WA_eCart_DisplayMoney(eCart1, WA_eCart_TotalColumn(eCart1, "TotalPrice"))%></td>
</tr>
<%
'WA eCart Merchandizing Show End
'ecart="eCart1"
end if
%>
<%
'WA eCart Merchandizing Show Start
'ecart="eCart1"
if (WA_eCart_GetDiscounts(eCart1) > 0) then
%>
<tr>
<td class="eC_SummaryLabel">Discounts</td>
<td>-<%=WA_eCart_DisplayMoney(eCart1, WA_eCart_GetDiscounts(eCart1))%></td>
</tr>
<%
'WA eCart Merchandizing Show End
'ecart="eCart1"
end if
%>
<%
'WA eCart Merchandizing Show Start
'ecart="eCart1"
if (WA_eCart_GetCharges(eCart1) > 0) then
%>
<tr>
<td class="eC_SummaryLabel">Flower Delivery Charges</td>
<td><%=WA_eCart_DisplayMoney(eCart1, WA_eCart_GetCharges(eCart1))%></td>
</tr>
<%
'WA eCart Merchandizing Show End
'ecart="eCart1"
end if
%>
<%
'WA eCart Merchandizing Show Start
'ecart="eCart1"
if (WA_eCart_GetShipping(eCart1) > 0) then
%>
<tr>
<td class="eC_SummaryLabel">Shipping</td>
<td><%=WA_eCart_DisplayMoney(eCart1, WA_eCart_GetShipping(eCart1))%></td>
</tr>
<%
'WA eCart Merchandizing Show End
'ecart="eCart1"
end if
%>
<%
'WA eCart Merchandizing Show Start
'ecart="eCart1"
if (WA_eCart_GetTax(eCart1) > 0) then
%>
<tr>
<td class="eC_SummaryLabel">Tax</td>
<td><%=WA_eCart_DisplayMoney(eCart1, WA_eCart_GetTax(eCart1))%></td>
</tr>
<%
'WA eCart Merchandizing Show End
'ecart="eCart1"
end if
%>
<tr class="eC_SummaryFooter">
<td class="eC_SummaryLabel">Total:</td>
<td><%=WA_eCart_DisplayMoney(eCart1, WA_eCart_GrandTotal(eCart1))%></td>
</tr>
</table>
</div>

Sign in to reply to this post

Ray BorduinWebAssist

What about if you add:

<?php echo(WAEC_eCart1_SalesTax()); ?>

does that already have the amount rounded?

Sign in to reply to this post
Did this help? Tips are appreciated...

eric284736

Do I add that into the code block or do I replace the Get Tax code?

Sign in to reply to this post

Ray BorduinWebAssist

Just add it anywhere on the page... I still don't see where it could be rounded so I'm trying to pinpoint it.

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...