Bug Unwanted credits adjustments when editing user in admin CP

Status
Not open for further replies.

Jeremy

Customer
Not sure if this is actually coming from Credits or Shop, but there is an issue when editing a user's profile in the admin CP. For example, let's say an admin goes to edit a user's signature and they save the changes. In some cases, the user is getting an alert about "0 credits adjusted" and it shows the username of the admin who did it.

I tested and found that it happens when their credits contain a very long unrounded number in the database. I'm not sure which event(s) cause it to get like this in the first place, but I guess what happens is, when an admin saves their profile, it then tries to round the value, triggering the adjustment event.

Here is a starting amount of currency I was able to reproduce this with. I put this value in the user's credits column, went to their profile in the admin CP and saved, and the alert happened: 236.9999999999999432
 

Fillip H.

Staff member
Owner
Developer
There's essentially no way around this without placing a hard cap on the amount of decimals that can be applied to a transaction.

In the next version, I will put in place a hard cap of 8 decimals, which should help avoid this issue. I'm not sure what will happen during the conversion from double to decimal for these inaccurate floating points, but even if the rounding is still incorrect, it should fix itself in time.
 

DragonByte Technologies

Company Information
Staff member
Company Info
Hello @Jeremy,

We hope your ticket regarding DragonByte Credits has been addressed to your satisfaction. This ticket has now been scheduled to be closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 

DragonByte Technologies

Company Information
Staff member
Company Info
Hello @Jeremy,

As we have not heard back from you, your ticket regarding DragonByte Credits has now been closed.

If your ticket has not been resolved, please feel free to start a new support ticket and link back to this ticket.

If you have time, please leave a review on XenForo.com's Resource Manager.

Thank you.


- DragonByte Technologies, Ltd.
 
Status
Not open for further replies.

DragonByte Credits

XenForo 1.5.3+ XenForo 2.0.x XenForo 2.1.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
2,573
Customer rating
5.00 star(s) 3 ratings
Top