[Suggestion] OrderTotal Rounding

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 лет назад
Hi,

Would be nice to have the ability to configure OrderTotal rounding.
Eg. in Sweden decimals (ören/cents) are not used anymore, and when using discount codes with percentage, the order total get decimals.
7 лет назад
Thanks. Right now you can customize it in the "RoundPrice" method of \Libraries\Nop.Services\Catalog\RoundingHelper.cs file. Replace 2 with 4. But it rounds all prices and totals

And do you suggest to round order total only?
7 лет назад
a.m. wrote:
And do you suggest to round order total only?


Yes, i want the order totals to look like this:


Sub-total: 10,00
Tax         2,50
Rounding:   0,50
----------------
Total:     13,00
7 лет назад
Hi Kenny,

Thanks. Please find this work item here
7 лет назад
Hi Kenny,

1. What order total will be in the following case? Sub-total: 10,00. Tax: 2,05
2. Is ceiling rounding (always up) used in Sweden? Or is it as described in this article ("Rounding with 1.00 intervals" section)
3. Do you display "Rounding" as separate line?
7 лет назад
a.m. wrote:
Hi Kenny,

1. What order total will be in the following case? Sub-total: 10,00. Tax: 2,05
2. Is ceiling rounding (always up) used in Sweden? Or is it as described in this article ("Rounding with 1.00 intervals" section)
3. Do you display "Rounding" as separate line?


Hello Andrei,
  I am answering the question per our conversation here

  1. For most of our (American) clients bankers rounding would apply, so it would round to the nearest even number based on how many decimals. So for us, as we use pennies, it would be $12.05.
  2. Majority of clients request the method described in the Wikipedia article, however there have been cases where the (always up) has been requested.
  3. We have yet to do this.
7 лет назад
Please consider also that VAT rounding might be different. There are some countries were VAT has to be rounded to the next higher decimal.
Moreover, amounts and prices may have different rounding needs, but this can be handled with the suggested parameter roundingprecision.

Rounding setup should be implemented per currency, having

Unit amount (price) rounding precision
Unit amount (price) rounding direction

Amount rounding precision
Amount rounding direction

VAT amount rounding precision
VAT amount rounding direction

To handle all possible rounding directions, there might be the need to overload Math.Round.
7 лет назад
Hi,

Can we have the round to be customized (option) if it is to up or down all the time, for example, if the total is 10.1, then i need it to be 11 not 10.
7 лет назад
Good morning Andrei,
  I took a look at the here (https://github.com/nopSolutions/nopCommerce/commits/issue-1424-OrderTotal_Rounding). I really like the idea of rounding per currency, and with the limited testing it looks like its working without a hitch.
  I am just wondering about configurable rounding precision. For example, a widget that cost $2.999 vs $2.99 doing a volume of 2,500 a day in a B2B scenario would be a difference of $23. Also, some clients prefer bankers rounding (Default Math.Round) and some prefer RoundAwayFromZero rounding. Is this something that might be included in release? We prefer avoiding core code changes whenever possible. Thanks.
7 лет назад
We implemented the ability to specify the rounding method for each currency according to the cash transactions rules. You can see the details of the implementation in this commit.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.