Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currency Separator #103

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

mchev
Copy link

@mchev mchev commented Jun 6, 2024

You can now update the default separators of a currency in /admin/settings/preferences

Closes #86

@gdarko gdarko self-requested a review June 6, 2024 21:29
Copy link

@gdarko gdarko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @mchev -

That looks good but upon some research on this topic i realized that the current currency structure we have in the APP doesn't reflect the reality because, currencies can have different separator based on the region which is boomer.

https://en.wikipedia.org/wiki/Decimal_separator
https://docs.oracle.com/cd/E19455-01/806-0169/overview-9/

I propose something like this.

  1. Keep currency_thousand_separator and currency_decimal_separator for each currency as defaults.
  2. Make the company settings for Thousand and Decimal separator optional and add a hint that if users fills those, they override the default currency settings which is "." and ",".
  3. Store Thousand and Decimal separator in the company_settings table as overrides
  4. If company_settings contains thousand and decimal operator, use those. This is probably best to be implemented everywhere where the new CurrencyResource() instance is created.

Step 4 is probably most difficult because there are more instances of CurrencyResource pulling values from currencies table.

Do you have any other suggestion?

Best,
Darko

@gdarko gdarko linked an issue Jun 7, 2024 that may be closed by this pull request
@mchev
Copy link
Author

mchev commented Jun 7, 2024

I wondered about this too, but I assumed that an instance of InvoiceShelf would not be shared between several countries.
But maybe that's not true.

In that case, you effectively have to add the values to the company_settings and overwrite where necessary.

It's another job and I won't have enough time to modify all this in the next few days.

@gdarko
Copy link

gdarko commented Jun 7, 2024

No worries, @mchev - Let's keep it open and we can even delay it for the next releases.

For now, leave it to me and i will try to handle it in the following days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Currency Separator Selection
2 participants