-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
If there is one rule when it comes to handling anything financial, it's don't use floating point data types for money values. Instead, multiply by 10 until you no longer have floating point mathematics at all.
not-grocy's stock table currently has DECIMAL(15,2) as the price type. SQLite doesn't care what you throw at it; so it happily accepts all kinds of floats and saves them as the REAL data type.
bad, bad, bad, bad, bad.
Solution (for v5): re-do the database, I'm absolutely sure that this goes far further than just one column. Most probably all aggregations and mathematics in php are broken as well. Granted, not-grocy doesn't really need cent-accurate calculations for tracking etc. But good lord, I want this gone so bad.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
