I've been having an issue with a site where order totals aren't matching order balances in some orders (even if the order hasn't had any payments made on it yet, or if the payments are Purchase Orders, which don't affect the balance). At first I thought it was only ever $0.01 off, but now I see an order where the value is $0.15 off.

Regarding the $0.01 difference: I had a discussion (in IRC) with bojanz about this. He helped me figure out what is probably going on, which is that for the order total it seems the tax components are being rounded individually before being added to the total, whereas for the order balance they seem to be added together and then rounded up. Having two sales taxes applied leads to the extra penny if both are rounded up before being added together.

Anyhow, I wouldn't be surprised if I haven't given enough information here, but I'm just looking for a little guidance on where I might start looking. I am using commerce_discount with "%off Product discounts" and fixed discounts. I've attached a screenshot of one of the $0.01-discrepancy orders.

Thanks all!

CommentFileSizeAuthor
Commerce order different amounts.jpg102.17 KBagileadam
Support from Acquia helps fund testing for Drupal Acquia logo