Issue 169: patch to truncate total cost
Status:  Fixed
Owner:
Closed:  May 2010
Reported by rogerpack2005, Feb 21, 2009
What steps will reproduce the problem?
1. set tax to calculate a float, like 6.55
2. get an order that doesn't round evenly
3. check the output of order#total

What is the expected output? What do you see instead?
the total should be truncated to two decimals, in case [ex:] a promotion 
gives a percentage off or what not.

authorize.net SIM requires 2 decimals, so this should help that to be the 
case always.

What version of the product are you using? On what operating system?
trunk.

truncate_cost.diff
630 bytes   View   Download
Feb 21, 2009
#1 rogerpack2005
except I'm not sure if truncate is the best option or not--what if people want tax to 
round up, for example. Hmm.
Feb 21, 2009
#2 solodex2...@gmail.com
Just to note, if you pass a tax or shipping cost to PayPal that has more than 2 
decimal places, PayPal will completely ignore it.  It is definitely worth truncating, 
because I had a couple of orders that were paid for but the shipping cost never got 
transferred.
Feb 21, 2009
#3 rogerpack2005
authorize.net SIM rejects the transaction if a value has more than two decimals.  
Perhaps we should add truncation in several locations [?]
-=r
May 4, 2010
Project Member #4 subim...@gmail.com
Roger, any chance of getting you to apply / test this patch on trunk?
Owner: rogerdpack
Labels: -Priority-Medium Priority-High
May 4, 2010
#5 rogerpack2005
sure
May 4, 2010
#6 rogerpack2005
committed r225
May 4, 2010
Project Member #7 subim...@gmail.com
(No comment was entered for this change.)
Status: Fixed