Is there a way to change the default rounding behaviour of Craft Commerce? Here in Switzerland we always round to 5 cents, so amounts like 9.99 or 9.22 don't really exist. Here's an example:
- 9.99 must be rounded to 10.00
- 9.98 must be rounded to 10.00
- 9.97 must be rounded to 9.95
- 9.96 must be rounded to 9.95
- 9.95 must stay the same
- 9.94 must be rounded to 9.95
- 9.93 must be rounded to 9.95
- 9.92 must be rounded to 9.90
- 9.91 must be rounded to 9.90
Product Prices
The product prices we enter manually do follow the guidelines mentioned above, so we never get "odd" prices when putting products to the cart.
Shipping Costs
Shipping costs are also no problem (it's either free or fixed price shipping).
Taxes
Taxes are a problem for us since we use a tax rate of 7.7% which can lead to "odd" tax amounts (and this leads to "odd" total amounts).
Discounts
Discounts can also be a problem since they also sometimes lead to "odd" numbers (i.e. a 10% coupon on 14.85 is giving a discount result of -1.49 instead of -1.50).
So is there any way to change the rounding behaviour (either globally or for taxes only)? On the frontend part I think we could achieve that with the Twig filter "number_format", but we need the correct amounts also in the backend.