I found mention of trunc_decimal in another posting, did some looking... In the Order model, force_recalculate_total() sets total as Decimal based on the various parts (sub_total, shipping, tax) but does not truncate it.
_balance() does trunc_decimal()... that seems to be the difference. Bug? On Friday, October 5, 2012 12:18:41 PM UTC-5, Darren Hollenbeck wrote: > > I'm seeing the same thing: a one-cent difference in order.total and > order.balance... which, on the confirmation page in checkout process, ends > up saying their card will be charged for $0.01 more than the order total > due to this rounding difference. > > Anyone have knowledge if this is intended behavior? > > > On Thursday, August 2, 2012 2:28:51 AM UTC-5, Olivier Lauret wrote: >> >> Hi all, >> >> I have the following problem: >> >> order.sub_total = £4.16 >> TAX = 0.83 >> order.shopping_cost = £2.75 >> order.total = £7.74 >> But: >> order.balance = £7.75 >> >> The problem comes from the utils.numbers.trunc_decimal function which >> rounds up the order.total of 7.742. >> >> Is this a normal behaviour for the balance or am I missing one setting >> somewhere? >> >> Regards, >> Olivier >> > -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To view this discussion on the web visit https://groups.google.com/d/msg/satchmo-users/-/FtxesyH5PegJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
