Welcome Guest, Not a member yet? Register   Sign In
flexi cart - A comprehensive shopping cart library for CodeIgniter

[eluser]koichirose[/eluser]
@haseydesign

I'm afraid I didn't explain what I meant correctly.
Yes, I am saving prices in the cart without taxes (82.64).
I thought that setting the discount calculation method to '1', would produce the following:
82.644 + vat (21%) = 100
discount: 10% of 100 = 10

Instead, you explained that the calculated discount is 8.26 in both cases (with calculation method = 1 and = 2).

So this is happening:
82.644 + vat (21%) = 100
discount: 10% of 82.644 = 8.26
discount with vat: 8.26 + vat (21%) = 9.994, which becomes 9.99 instead of 10.

So I think that to solve the issue I'd have to allow 3 decimals in the discount calculation:
discount: 10% of 82.644 = 8.264
discount with vat: 8.264 + vat (21%) = 9.999 which becomes 10.00 correctly.

Can this be done? I couldn't track down where the discount rounding happens.

Thank you for all your work Smile


Messages In This Thread
flexi cart - A comprehensive shopping cart library for CodeIgniter - by El Forum - 02-18-2013, 06:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB