Umbraco v6.1.6
uCommerce v6.0.0.14094
Razor store v3.0.1.14013
Currently experiencing a slight issue with property values from the PurchaseOrder object. For example, I have a product which is 0.63 excluding Tax / VAT (at 20%). Including VAT it is 0.76 - I work out this figure manually in our current cart.
The issue occurs taking into account quantity. 3x of the above product should work to 2.28 using banker's notation (i.e. rounding up), but it resolves to 2.27 (and this is the cost passed through to our payment provider as well), which is a penny off.
Think I've tracked this down to the order line object, which contains the product price at 0.63 and the VAT of the order line at 0.126 (which is correct). The VAT isn't rounded up by the looks of it when the total cost of the order line is worked out - (0.63 + 0.126 = 0.756) * 3 = 2.268, which is then rounded up to 2.27, as opposed to (0.63 + 0.13 = 0.76) * 3 = 2.28.
Really, my question is - is this an issue? Or is it by design? I just need to get back to our client with an explanation - I know rounding has occur with dealing with things like VAT and you obviously can't charge customers fractions!
I am too finding this an issue, even more so when you have discount percentages applied to an order line and gets worst when an orderline has a quantity of more than 1.
Its all down to the basket pipeline when it calculates the various parts to provide discount applied and subtotals. These are all done to 4 decimal places where as we would display the different parts to 2 decimal places.
The great part about uCommerce is that you can change how the basket is calculated by creating your own replacing uCommerce's modules by changing the basket pipeline config file to point to your calculation modules .
I have already created my own calculation modules which means that discounts are calculated as how we want it to.
Hi guys. I think an upgrade to the latest version of uCommerce will fix this issue for you. I am aware that there were an rounding error in one of the tasks that was recently fixed.
Rounding issues?
Hi guys
Umbraco v6.1.6 uCommerce v6.0.0.14094 Razor store v3.0.1.14013
Currently experiencing a slight issue with property values from the PurchaseOrder object. For example, I have a product which is 0.63 excluding Tax / VAT (at 20%). Including VAT it is 0.76 - I work out this figure manually in our current cart.
The issue occurs taking into account quantity. 3x of the above product should work to 2.28 using banker's notation (i.e. rounding up), but it resolves to 2.27 (and this is the cost passed through to our payment provider as well), which is a penny off.
Think I've tracked this down to the order line object, which contains the product price at 0.63 and the VAT of the order line at 0.126 (which is correct). The VAT isn't rounded up by the looks of it when the total cost of the order line is worked out - (0.63 + 0.126 = 0.756) * 3 = 2.268, which is then rounded up to 2.27, as opposed to (0.63 + 0.13 = 0.76) * 3 = 2.28.
Really, my question is - is this an issue? Or is it by design? I just need to get back to our client with an explanation - I know rounding has occur with dealing with things like VAT and you obviously can't charge customers fractions!
Cheers Mike
I am too finding this an issue, even more so when you have discount percentages applied to an order line and gets worst when an orderline has a quantity of more than 1.
Its all down to the basket pipeline when it calculates the various parts to provide discount applied and subtotals. These are all done to 4 decimal places where as we would display the different parts to 2 decimal places.
The great part about uCommerce is that you can change how the basket is calculated by creating your own replacing uCommerce's modules by changing the basket pipeline config file to point to your calculation modules .
I have already created my own calculation modules which means that discounts are calculated as how we want it to.
Thanks, Mike
Cheers Mike, you wouldn't happen to know the interface I need to implement to achieve the above?
You need to implement UCommerce.Pipelines.IPipelineTask<PurchaseOrder>.
Thanks, Mike
Hi guys. I think an upgrade to the latest version of uCommerce will fix this issue for you. I am aware that there were an rounding error in one of the tasks that was recently fixed.
You can read about extending uCommerce here: http://docs.ucommerce.net
Cheers
//Morten
is working on a reply...