Balance tracker uses floats for amount and balance fields, which can lead to nasty bugs.

http://pixeljets.com/blog/storing-monetary-amounts-db-use-decimals-not-f...

Comments

sergeypavlenko’s picture

You're absolutely right, correct to use "DECIMAL". How to leave decimal places for operations with the balance? I think the 4 characters will be enough. What do you think? If we decide that question, I could write a patch.

sergeypavlenko’s picture

Status: Active » Reviewed & tested by the community

Fixed. Changed type for fields. Commit d18c6c9.

sergeypavlenko’s picture

Status: Reviewed & tested by the community » Fixed

Have passed 2 weeks, no misspellings found, the bug is closed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.