You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I have created plugin for using money painlessly in OctoberCMS that extends yours (it is waiting in Marketplace for approval, right now you can see it only on Github: https://github.com/initbizlab/oc-money-plugin).
Its main feature for now is a form widget that formats amount-input (on blur, using format defined in currency), dropdown with currencies in the field and is managing fraction digits so that the amount can be stored as integer in database.
But I am not writing here for advertising ;) I am just curious why you have not add such field as decimals or fraction_digits to your Currency model. For me it makes sense to store default precision in database, because we will know how many places are decimals while storing the amount as integer. Right now your plugin is enforcing users to use float or doubles for their amounts and this is not good practice (or am I missing something?).
My plugin updates your currencies table (adds the fraction_digits field) and wraps the functionality in such a way that users will not see integers, but nice formatted strings.
If you think it makes sense we should join forces here or just please remember about my plugin on your plugin updates :)
I was considering creating you PRs instead of writing new plugin, but I want to have full control over this code since I want to add more features that concerns money problems while developing.
The text was updated successfully, but these errors were encountered:
Hi.
I have created plugin for using money painlessly in OctoberCMS that extends yours (it is waiting in Marketplace for approval, right now you can see it only on Github: https://github.com/initbizlab/oc-money-plugin).
Its main feature for now is a form widget that formats amount-input (on blur, using format defined in currency), dropdown with currencies in the field and is managing fraction digits so that the amount can be stored as integer in database.
But I am not writing here for advertising ;) I am just curious why you have not add such field as
decimals
orfraction_digits
to yourCurrency
model. For me it makes sense to store default precision in database, because we will know how many places are decimals while storing the amount as integer. Right now your plugin is enforcing users to use float or doubles for their amounts and this is not good practice (or am I missing something?).My plugin updates your currencies table (adds the
fraction_digits
field) and wraps the functionality in such a way that users will not see integers, but nice formatted strings.If you think it makes sense we should join forces here or just please remember about my plugin on your plugin updates :)
I was considering creating you PRs instead of writing new plugin, but I want to have full control over this code since I want to add more features that concerns money problems while developing.
The text was updated successfully, but these errors were encountered: