Rounding issue 3.90

Posted: March 21, 2017 at 2:37 AM Quote #185232
Hi all,

There is something wrong with "Rounding up with 0.05 intervals (0.06 round to 0.10)".
Test environment: clean installation 3.90
SQL: 2014

Test product: Fahrenheit 451 by Ray Bradbury
Price with default rounding: 27.00
Price with Rounding up with 0.05... : 27.05

What is more. Add to cart with default rounding looks as below:


While just changing rounding option cause cart would show:


Suddenly sub-total showing as 27.15, shipping rise to 0.05, tax to 0.10, and two discounts are showing just by changing rounding.

Regards,
Tomasz
This post/answer is useful
4
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
nopCommerce Solution Partner
https://www.nop4you.com - The biggest nopCommerce plugins marketplace
https://www.grandnode.com - Free, open source, multi platform e-commerce solution on NoSQL Database MongoDB
--------------------------------------------------------------------------------
Posted: March 21, 2017 at 3:08 AM Quote #185236
Hi Tomasz,

Thanks a lot for reporting. We'll investigate it soon (work item)
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Interested in the dedicated Premium support services provided by core developers? Please visit http://www.nopcommerce.com/supportservices.aspx

Regards,
Andrei Mazulnitsyn
Posted: September 28, 2017 at 3:31 AM Quote #193723
Done. Please see this commit for more details
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Interested in the dedicated Premium support services provided by core developers? Please visit http://www.nopcommerce.com/supportservices.aspx

Regards,
Sergey Koshelev
Posted: November 03, 2017 at 6:25 AM Quote #195646
Sergei-k wrote:
Done. Please see this commit for more details


Hello Sergei,

I was testing beta version and I found this:

As Tomek described, default rounding with price 27.05 works fine, but when I changed rounding to "Price with Rounding up with 0.05...", please look what I saw:

Note that product price is 27.05$. Product page:


And below is the view of shopping cart with applied "Price with Rounding up with 0.05...":


Best,
Patryk
This post/answer is useful
2
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
nopCommerce Solution Partner
https://www.nop4you.com - The biggest nopCommerce plugins marketplace
https://www.grandnode.com - Free, open source, multi platform e-commerce solution on NoSQL Database MongoDB
--------------------------------------------------------------------------------
Posted: November 03, 2017 at 7:12 AM Quote #195651
Thank you Patryk, I opened the ticket again, I'll check it.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Interested in the dedicated Premium support services provided by core developers? Please visit http://www.nopcommerce.com/supportservices.aspx

Regards,
Sergey Koshelev
Posted: November 08, 2017 at 9:11 AM Quote #195820
Hi. I checked this problem and fixed it. Please see this commit for more details
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Interested in the dedicated Premium support services provided by core developers? Please visit http://www.nopcommerce.com/supportservices.aspx

Regards,
Sergey Koshelev
Posted: November 09, 2017 at 2:30 AM Quote #195855
Sergei-k wrote:
Hi. I checked this problem and fixed it. Please see this commit for more details


Hello Sergei,

It's old commit, I guess you talked about this commit.

But I have doubts about this solution. What if we set price 27,10$ and choose "Price with Rounding up with 0.05..."?

Price before rounding: 27.10$
Price after "Rounding up with 0.05...": 27.15$.

Is it good solution? Of course 27,11$ should be rounded to 27.15$, 27.16$ to 27.20$, etc, if we choose this type of rounding. But I don't think, it should round 27.10$ to 27.15$.

Best,
Patryk
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
nopCommerce Solution Partner
https://www.nop4you.com - The biggest nopCommerce plugins marketplace
https://www.grandnode.com - Free, open source, multi platform e-commerce solution on NoSQL Database MongoDB
--------------------------------------------------------------------------------
Posted: November 09, 2017 at 3:21 AM Quote #195857
nop4you wrote:
Hi. I checked this problem and fixed it. Please see this commit for more details

Hello Sergei,

It's old commit, I guess you talked about this commit.

But I have doubts about this solution. What if we set price 27,10$ and choose "Price with Rounding up with 0.05..."?

Price before rounding: 27.10$
Price after "Rounding up with 0.05...": 27.15$.

Is it good solution? Of course 27,11$ should be rounded to 27.15$, 27.16$ to 27.20$, etc, if we choose this type of rounding. But I don't think, it should round 27.10$ to 27.15$.

Best,
Patryk


Hello Patryk. You are absolutely right, the problem was in the calculation algorithm itself, I rewrote this piece of code, please see the details here. Thank you very much for your help.
This post/answer is useful
2
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Interested in the dedicated Premium support services provided by core developers? Please visit http://www.nopcommerce.com/supportservices.aspx

Regards,
Sergey Koshelev
Posted: November 09, 2017 at 4:25 AM Quote #195860
Sergei-k wrote:

Hello Patryk. You are absolutely right, the problem was in the calculation algorithm itself, I rewrote this piece of code, please see the details here. Thank you very much for your help.


It seems to be ok now.

Best,
Patryk
This post/answer is useful
2
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
nopCommerce Solution Partner
https://www.nop4you.com - The biggest nopCommerce plugins marketplace
https://www.grandnode.com - Free, open source, multi platform e-commerce solution on NoSQL Database MongoDB
--------------------------------------------------------------------------------
Posted: June 24, 2019 at 9:59 AM Quote #238617
nopcommerce  3.90


Photo 1
https://subefotos.com/ver/?c6f49692495e8e212b4888e1bff4181eo.jpg


Photo 2
https://subefotos.com/ver/?ed9592e1f578a3d98ac49097183da6e0o.png



In the picture 1 we can see the options of rounding of decimals that brings nopcommerce. Which I have set in redodeo by default.

In photo 2 I show on the checkout page the calculation that nopcommerce performs:

1- Two products that count 15 each in total add up to 30.
2- 16% of 30 is 4.8.
3- 30 + 4.8 should give me exactly 34.8

The point is that in my nopcommerce I can not show or charge invoices with rounded amounts, I must charge what exactly of the sum of the totals and sub totals without any type of rounding.

what should I do?
can you help me?
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.
eCommerce CONFERENCE 2019
Learn more