Discussion Forum: Thread 339509

 Author: Stellar View Messages Posted By Stellar
 Posted: May 10, 2023 07:30
 Subject: Rounding Error again
 Viewed: 70 times
 Topic: Technical Issues
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

Stellar (3485)

Location:  Spain, Comunidad Valenciana
Member Since Contact Type Status
Sep 24, 2015 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Stellar Bricks
BrickLink Discussions Moderator (?)
Got and order (#22110759) that has a rounding error in the order list page of
Bricklink, here are some images of the details in various sources, I thought
this was solved some months ago, but might be just the fix on the XML.
 










 Author: peregrinator View Messages Posted By peregrinator
 Posted: May 10, 2023 07:34
 Subject: Re: Rounding Error again
 Viewed: 32 times
 Topic: Technical Issues
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

peregrinator (770)

Location:  USA, New Jersey
Member Since Contact Type Status
Jan 21, 2003 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Faber Family Bricks
In Technical Issues, Stellar writes:
  Got and order (#22110759) that has a rounding error in the order list page of
Bricklink, here are some images of the details in various sources, I thought
this was solved some months ago, but might be just the fix on the XML.

It doesn't look like a rounding error to me - the sum is taken after
rounding on the order page(s), while the XML gives the sum without rounding.
I think the way the XML does it is not quite right - if you display e.g. additional
charges rounded, then those charges should be applied/summed rounded as well.
 Author: Stellar View Messages Posted By Stellar
 Posted: May 10, 2023 07:52
 Subject: Re: Rounding Error again
 Viewed: 28 times
 Topic: Technical Issues
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

Stellar (3485)

Location:  Spain, Comunidad Valenciana
Member Since Contact Type Status
Sep 24, 2015 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Stellar Bricks
BrickLink Discussions Moderator (?)
In Technical Issues, peregrinator writes:
  In Technical Issues, Stellar writes:
  Got and order (#22110759) that has a rounding error in the order list page of
Bricklink, here are some images of the details in various sources, I thought
this was solved some months ago, but might be just the fix on the XML.

It doesn't look like a rounding error to me - the sum is taken after
rounding on the order page(s), while the XML gives the sum without rounding.
I think the way the XML does it is not quite right - if you display e.g. additional
charges rounded, then those charges should be applied/summed rounded as well.

Now I think it is not rounding error exactly, just the way total is calculated,
the rounding is done good for 23,4048 to 23,40, but that is not what is used
everywhere else, the total in the other places is a sum of the already rounded
values which shows:

13,74 + 0,17 + 9,5 = 23,41...
 Author: psusaxman2000 View Messages Posted By psusaxman2000
 Posted: May 10, 2023 09:16
 Subject: Re: Rounding Error again
 Viewed: 31 times
 Topic: Technical Issues
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

psusaxman2000 (291)

Location:  USA, Pennsylvania
Member Since Contact Type Status
Apr 19, 2020 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Bricktopulous
In Technical Issues, Stellar writes:
  Got and order (#22110759) that has a rounding error in the order list page of
Bricklink, here are some images of the details in various sources, I thought
this was solved some months ago, but might be just the fix on the XML.

If you just have your store only use two decimal places, you won't run into
rounding errors. Rounding takes place in different location depending on the
applications. Sometime this is before addition and sometimes after which is
likely to cause problems when multiple systems are involved.