Most calls to round() have been removed in recent commits so that prices with more than two decimal places are correctly handled. However, rounding code still remains in uc_quote.js so shipping prices are always rounded to 2dp. This can cause minor calculation errors in the order preview pane when prices with greater precision are needed such as by uc_vat. For an example see xibun's post at http://drupal.org/node/600478#comment-2141954

Patch attached that removes the calls to Math.round(). This doesn't seem to cause any adverse effects, I'm not really sure why the calls were there in the first place.

CommentFileSizeAuthor
uc_quote-remove-rounding.patch2.45 KBlongwave

Comments

xibun’s picture

Status: Needs review » Reviewed & tested by the community

Patch tested -> problem fixed. Brilliant, thanks longwave!

I've looked at the original code and the patch, too me it looks good.

Island Usurper’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for finding and fixing that, longwave. Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.