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

Add ability to record expenses in different currencies #512

Closed
ArthurG opened this issue Nov 25, 2019 · 9 comments
Closed

Add ability to record expenses in different currencies #512

ArthurG opened this issue Nov 25, 2019 · 9 comments
Milestone

Comments

@ArthurG
Copy link

ArthurG commented Nov 25, 2019

Consider the use case when a group of friends travels to a different country. They will likely have some expenses in their home currency (airplane, uber to airport, etc) as well as some expenses in the foreign currency (food, entertainment).

This would be a really useful feature to add!

@skyrl69
Copy link

skyrl69 commented Nov 25, 2019 via email

@almet
Copy link
Member

almet commented Dec 3, 2019

Hi, thanks for taking the time to open an issue for this.

I've been thinking a bit and… I'm not sure we want this. It seems at a first glance out of scope for IHM, and will probably create more problems than it would solve : how should we handle the conversion rate ? In which currency should we compute the balances?

One simple way to solve this would be to have a default currency per project, and then have a tool to do the conversion when we enter the new bill, so that it converts from one currency to another one. Then everything is stored in one currency.

We could detect the currency quite easily using their text reprentation (EUR, USD, etc), which would make this an advanced use case.

This approach seems a bit overcomplicated for the scope of this very small project : it will tie IHM to another external lib / API, and it means we'll need to maintain it in the long term.

For the record, here are a few libs that might help :

If somebody want to take it, I'll be happy to review the code for this. Also, feedback from other users / dev is welcome :-)

@ndkoch
Copy link

ndkoch commented Dec 3, 2019

If nobody else has taken this up, I am just beginning to contribute and would like to try and take this on.

@almet
Copy link
Member

almet commented Dec 3, 2019

@ndkoch feel free to hack something up! As I said, I'm not sure how this should be done and depending on how it's done, it'll potentially not be merged if it makes things too complicated.

Not to discourage you, so if you feel like taking it, go ahead :-)

@ArthurG
Copy link
Author

ArthurG commented Dec 8, 2019

Another way you could do this is to :

  • Record expenses in any currency
  • At settle time, the user can:
    1. For each currency, run the settlement algo separately. Then, display how much each person will pay in the original expense currency
    2. Allow the user to select a currency, and then calculate settlement into the currency.

For V1, it would probably be enough just to run the settlement algorithm on every currency, without tying into some currency conversion API.

@ndkoch
Copy link

ndkoch commented Dec 9, 2019

just finished up what I hope can close this issue if you have some time to take a look.
#516

thanks

@35609902357
Copy link

@almet @ndkoch TrickyTripper has this feature, but the conversion rate has to be input manually. It would be useful to have it integrated with online conversion like Currecncy does, it fetches rates online and if no connection is possible it uses the last fetched rate.

@Natim
Copy link
Member

Natim commented Jan 3, 2020

What we usually do is what @35609902357 said, we keep track of the daily currency rate via a cronjob that fetches it everyday and then we use the rate of the day to convert everything to USD and then we display the total in the user currency.

However when I use I hate money, we pick a currency and then enter everything in the same currency.

@Glandos
Copy link
Member

Glandos commented Apr 29, 2020

Thanks @ndkoch for your initial work on this. @dark0dave took it through the end.

@zorun zorun added this to the v5 milestone Jul 17, 2020
TomRoussel pushed a commit to TomRoussel/ihatemoney that referenced this issue Mar 2, 2024
Now each project can have a currency, default to None.
Each bill can use a different currency, and a conversion to project default currency is done on settle.

Fix spiral-project#512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants