ever-co / ever-gauzy

Ever® Gauzy™ - Open Business Management Platform (ERP/CRM/HRM/ATS/PM) - https://gauzy.co
https://gauzy.co
GNU Affero General Public License v3.0
2.27k stars 536 forks source link

Handling different currencies throughout Gauzy #404

Open rmagon opened 4 years ago

rmagon commented 4 years ago

Since we are allowing multiple currencies, wherever we are adding, subtracting any currency value, I am a little confused on how will we handle that?

For example: Let's say we have two Income: 5BGN and 5USD, like the screenshot below:

Screen Shot 2019-12-20 at 4 25 39 AM

Now, if we check the dashboard, it will show 10BGN as the total income, which is wrong.

Screen Shot 2019-12-20 at 4 25 49 AM

We'll need to decide how to handle any addition/subtraction when we have multiple currencies.

Suggestions:

  1. Either we keep different currency calculations separately and show them intuitively on the UI somehow?
  2. Or we create a conversion rate of sorts and convert the amount to a 'default' currency?
  3. Perhaps there is already something I'm unaware of?
  4. More suggestions, please 😄
evereq commented 4 years ago

@rmagon ok, so this is how I see this in near future:

At later stages, we can use a DB table with currency exchange rates (per day, between currency A and B) which will be used to do conversions between entered values in one currency to the currency which is the default for the company. Such exchange rates can be loaded from different APIs (mostly paid APIs), e.g.:

rmagon commented 4 years ago

Sounds good!

evereq commented 4 years ago

@rmagon yes, so basically we need to go over all pages/components and make sure currencies used according to the description in this ticket.

rmagon commented 4 years ago

Currency drop downs made read-only and it will default to the organization currency in create-mode in the following places:

  1. Income mutation popup
  2. Expense mutation popup
  3. Employee Recurring Expense
  4. Edit Employee > Rates
  5. Edit Organisation Recurring Expense
  6. Edit Organisation > Projects
Screen Shot 2020-01-31 at 2 33 39 PM

Added currency to the following tables:

  1. Income table - added currency to the value
  2. Expense table - added currency to the value
Screen Shot 2020-01-31 at 2 33 04 PM
rmagon commented 4 years ago

@evereq Now that all currency dropdowns default to the organization currency and have been disabled .. should we close this ticket or keep it open for future (part 2)?

evereq commented 4 years ago

@rmagon let's keep for the future :) We will soon address it again for part 2 :)