jameskokoska / Cashew

💸 An app created to help users manage a budget and purchases
https://cashewapp.web.app/
GNU General Public License v3.0
1.61k stars 224 forks source link

[Question] Historical exchange rates handled? #312

Closed namtab00 closed 2 months ago

namtab00 commented 2 months ago

Describe your question I would like to start using Cashew, but I have several years of transactions to import.

Some of these transactions are transfers between accounts with different currencies.

The question is: when importing such past transfers (which, as documented, get split in an incoming tx + an outgoing tx), what exchange rate is considered? In the template CSV import there is no field that would allow specifying the exchange rate applied.

Also, for transfers done via UI, the exchange rate retrieved from the API is not shown, and is not user-overrideable. I believe it should be, as the exchange rate applied from my bank in my country surely is not identical to everyone else's...

Maybe this is more of a feature request...

jameskokoska commented 2 months ago

Cashew only uses the current exchange rates when combining different currencies into a total (i.e. when a conversion is needed) The exchange rate is set in the respective account. See: https://cashewapp.web.app/faq.html#multiple-currencies

namtab00 commented 2 months ago

So the exchange rate of a transfer between accounts with different currencies is in no way conserved?

...if so, you could consider an optional field "exchange rate" for transfers between such accounts.

(I noticed you are eager to close issues with as brief discussions as possible. I understand the reasons and motives behind such eagerness, but it does not bode well with newcomers such as me...)

jameskokoska commented 2 months ago

When a transfer occurs, the current exchange rate is used to create a net 0. Screenshot_20240701_184655.png In this example there are 2 accounts; Account 1 in CAD and Account 2 in USD. Cashew created a transfer with 10 CAD in Account 1 and 7.32 USD in Account 2. This preserves the exchange rate at that point in time. The FAQ website I linked previously has information on in-place conversions which preserve the exchange rate in the total at that point in time.

When an issue has been addressed with sufficient information it will be closed. Users are always encouraged to continue the conversation if needed and I will be automatically notified since I'm watching this repository and all updates that occur.

namtab00 commented 2 months ago

I saw the UI for a transfer in the app.

Does your example mean that a transfer entered with a past date applies the exchange rate at that date, or the current date one?

Screenshot_20240702-005801.png

It seems to me that no matter what past date I choose, the current (today's) exchange rate is applied..

I would understand that implementing and maintaining exchange rates between multiple currencies for n past years might be costly and problematic.

That's why I was suggesting allowing a manual override of an exchange rate for a transfer between accounts of different currencies. Or at least allow it for transfers with a past date...

When an issue has been addressed with sufficient information it will be closed. Users are always encouraged to continue the conversation if needed and I will be automatically notified since I'm watching this repository and all updates that occur.

Oh, ok, that's great then!

jameskokoska commented 2 months ago

Yea unfortunately if you use a past date as the transfer it only uses the exchange rate of the present. I think the best action would be to manually edit the amount after a transfer is created. You can also manually create individual transfer transactions by selecting the 'Balance Correction' category.

madrian commented 3 weeks ago

I'm looking for this feature as well. It would be great to be able to manually enter the exchange rate per transaction. Applying the rate globally on the account level will not balance out at the end. One use case is when you travel and use your credit card, each day the exchange rate will be different. At the end of your travel, your credit card charges in Cashew will not balance out with the bank's statement.

At the moment the workaround to manually edit the amount works but when displayed the two entries (In and Out) do not sync-up and show the same amount. The transfer still displays the global rate used. In the 10 CAD to 7.32 USD example above, if I manually forced to set the Account 2 to 7.00 USD, when viewed in CAD it will still show maybe around 9.56 CAD instead of 10 CAD. When viewed in USD, Account 2 will show 7.00 USD but Account 1 will show 7.32 USD. These two entries are linked but showing different exchange rates.

namtab00 commented 3 weeks ago

@madrian yeah, this is critical for me..

I REALLY wanted to migrate to Cashew, but I cannot until this functionality exists.

It surely cannot be very cumbersome to. implement, as it is already there, it only needs to allow a manual override and be supported when importing from csv.