ananthakumaran / paisa

Paisa – Personal Finance Manager. https://paisa.fyi demo: https://demo.paisa.fyi
https://paisa.fyi
GNU Affero General Public License v3.0
2.4k stars 124 forks source link

Expenses with different currencies #14

Closed psamim closed 1 year ago

psamim commented 1 year ago

Hi,

Thanks for this wonderful program.

I got a question, it seems that everything is treated as they are in a single currency. For example I have my expenses in two different currencies. I also have lines in my ledger to set the prices (starting with P) but it seems that in the expenses page all are treated as if they are in the same currency. Am I right?

ananthakumaran commented 1 year ago

Paisa has the concept of default_currency (check the config doc) and all the visualizations are shown in them. It does support multiple commodities. They are automatically converted to the default currency wherever necessary.

I also have lines in my ledger to set the prices (starting with P)

P is not handled as of now. It only supports the 10 XYZ @ 5 USD format. I can add support for this.

I have not tested with multiple currencies so far. I have only tried with a single currency and multiple commodities. Please share a minimal example, so I can get a better understanding of your use case.

psamim commented 1 year ago

I have my income in two currencies and have set default_currency. But the graphs are behaving all of the numbers as they are in the same currency.

For example in the graph below, the two left months are in another currency than of the two right months:

image

Should I add @ X EUR to all of the transactions so that it can convert the numbers? I can but it seems too much work as I have years of transactions. Maybe we can have this as a future feature request.

ananthakumaran commented 1 year ago

do you use hledger? Using ledger seems to work for me with the below sample

P 2023/05/01 00:00:00 USD 0.9 EUR

;; USD income
2023/05/01 Freelance Income
    Income:Freelance                        -100 USD
    Assets:Checking

P 2023/06/01 00:00:00 USD 0.95 EUR

2023/06/01 Freelance Income
    Income:Freelance                        -200 USD
    Assets:Checking

;; EUR income
2023/05/02 Fulltime
    Income:Fulltime                        -1000 EUR
    Assets:Checking

2023/07/01 Netflix
    Expenses:Entertainment                        25 USD
    Assets:Checking
ananthakumaran commented 1 year ago

Can you try the latest release? I have added some improvements to multi-currency handling

psamim commented 1 year ago

Yes, it seems that it has fixed the issue! Thanks indeed.