hobbzilla Posted February 20, 2004 Posted February 20, 2004 (edited) Credit class & gift voucher Problem. I would post it in the other thread but it is now at almost 100 pages long and I fear it would get lost. Sub-Total: $6.25 Discount Coupons:FIFTY: -$3.13 United States Postal Service (1 x 1.04lbs) (Priority (2 - 3 Days)): $3.95 AR TAX 8.0%: $0.57 Total: $7.65 Perhaps anybody can shed some light on the situation. The Total as listed individually should be $7.64 a difference of 1? I have my sort values: Discount Coupons 2 Gift Vouchers 740 Shipping 3 Sub-Total 1 Tax 4 Total 900 and Discount Coupons config set: Include Shipping=false Include Tax=false Re-calculate Tax=Standard Tax Class= none Edited February 20, 2004 by hobbzilla Quote
♥kymation Posted February 21, 2004 Posted February 21, 2004 This required a bit of fun and games with a pocket calculator to figure out. The computer is really right, and it's all due to roundoff error. That discount that you are applying is 50%, so the amount is really 3.125, it's just being rounded to 3.13 by the display. Adding everything up, the amount that the tax is being applied to is 7.075, and 8% of that is 0.566. The fraction of a cent is rounded up to make it 0.57 in the display. The fun comes when this is all added up to 7.641, which is automatically rounded up to 7.65. I wouldn't worry too much about this. It won't happen very often, and most customers won't notice (or care about) the extra penny. If you really feel the need to fix it, the code could be modified to round down on the discount only, and to round everything else up. This would take some effort (understatement). Have you checked your state tax code for what is taxed? Some states require you to calculate tax before adding any discounts or coupons, and most do not tax shipping. I'm not familiar with the tax laws in every state, so I really don't know what's right for you. If you have checked and what you are doing is correct, then please just ignore me. Regards Jim Quote See my profile for a list of my addons and ways to get support.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.