Money type #118
Replies: 3 comments
-
I don't think we should, at least not for the basic money column. If we need a multi-currency money column, we can implement that at a future date.
My thinking here is that we should have pre-loaded currencies of some sort to reduce friction for users, but also allow them to specify their own currencies in the Mathesar configuration.
I don't think we need to do this, since we won't have a column with multiple currencies.
I don't think we need to do this in the data layer, we should just have the currency code and the amount. The UI can do the formatting.
We should certainly use fixed precision. I think we can allow the precision to be configurable per-column, and our pre-loaded currency choices could have defaults set up. I'm assuming there's some library or dataset that includes these and we don't have to do our own research. e.g. https://datahub.io/core/currency-codes |
Beta Was this translation helpful? Give feedback.
-
I think it might be useful, but this will introduce several complexities. How will we be able to perform functional operations on the column like sum, avg?
Yes, allowing users use custom currency symbols will be useful. I do agree with Kriti that we will need to have a set of defaults.
My first points answers this question. I don't think it is needed.
I don't think we need to do this at the data layer. We can do it on the UI or the service layer. Will have to check for libraries to do this, if a stable library is available for the UI, which is also small in size, we can do it on the UI, or if a better library is available for python, we can do it on the service level.
I agree with Kriti's views on this. |
Beta Was this translation helpful? Give feedback.
-
I agree with multi-currency being too complex for Mathesar. The defaults for currency make sense. |
Beta Was this translation helpful? Give feedback.
-
In the roadmap, we have that we want to support a "money" type. The native PostgreSQL money type will be inappropriate for this, since we can't support more than one currency in that way on the same installation (the currency is set by the locale in which postgres is running). So, we'll need to make a custom money type. Questions we need to answer (or otherwise discharge) before it makes sense to implement are:
MONEY
type will format500000.000
to$500,000.00
(when in the defaultC
locale).Beta Was this translation helpful? Give feedback.
All reactions