laravelshoppingcart
laravelshoppingcart copied to clipboard
Rounding error when adding condition per item

based on the screenshot above. you will see the subtotal is wrong. how to fixed this.
getPriceSumWithConditions() should output 3.09 but its rounding to 3.08
0.97 * 1.06 = 1.0282 we round this to 1.03
i have quantity 3 so, 1.03 * 3 = 3.09
================= but the package calculate like this 0.97 * 1.06 * 3 = 3.0846 round to 3.08
please help thanks
This issue is still there. I started figuring out why this happening & I comes to know that there is a apply method inside Darryldecode\Cart\CartCondition class.

This result variable should be wrapped inside round($result, 2) so it round up the amount up to 2 decimal. Any suggestion on this would be appreciated.