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.24k stars 111 forks source link

Assets -> Allocation doesn't respect default currency #235

Closed kunaguvarun closed 1 month ago

kunaguvarun commented 1 month ago

I select my default currency as USD. I have logged investments in both US and India in their respective currencies. the Assets -> Allocation page and Assets -> Balance table doesn't respect my choice of USD as default currency. I've added price entries as below.

P 2024/05/01 00:00:00 USD 83.29 INR

The pages should have automatically converted my INR to USD and display all values as only USD.

ananthakumaran commented 1 month ago

Share a minimal sample ledger

kunaguvarun commented 1 month ago

I've configured my default currency to USD within Configuration. Here is a sample ledger that I used

P 2024/05/01 00:00:00 USD 83.5 INR 2024/05/01 Start Assets:Checking:Frost 1319.69 USD Assets:Stocks:INDIA 34343.66 "NIFTY_50" @ 12.99 INR Equity:OpeningBalance

The assets -> balance table displays Investment amount in USD but the other columns like Market value are showing in INR. How can I display all the values in USD? The same problem is on every page. Due to the INR being treated as USD it is messing up all the numbers. I would expect paisa to convert INR to USD in every page and show me only USD

Screenshot 2024-05-26 at 12 32 03 AM
ananthakumaran commented 1 month ago

image

The example you shared seems to work for me. What's your timezone? can you try to change the price date to 2024/04/30 00:00:00

kunaguvarun commented 1 month ago

I'm in central timezone. I'm using desktop app on Mac OS. I tried changing pricedate to 4/30. There is no change. If I comment out INR assets, all values in all pages appear in USD. If I enable INR assets, it messes up the numbers. USD and INR are displayed without INR being converted to USD

kunaguvarun commented 1 month ago

@ananthakumaran, I have deleted Paisa from my machine completely, installed again and recreated my ledger file and was able to reproduce the problem again. The issue is with adding INDIA assets as commodities. I added NIFTY 50 as a commodity from in-mfapi

As soon as I added NIFTTY 50 as a commodity, all INR numbers stopped converting from INR to USD. Hope this gives enough information for you to troubleshoot and provide a fix. Thaks.

ananthakumaran commented 1 month ago

Can you try Yahoo price provider instead of mfapi

On Tue, 28 May, 2024, 7:12 am Kunagu Varun Kumar, @.***> wrote:

@ananthakumaran https://github.com/ananthakumaran, I have deleted Paisa from my machine completely, installed again and recreated my ledger file and was able to reproduce the problem again. The issue is with adding INDIA assets as commodities. I added NIFTY 50 as a commodity from in-mfapi

As soon as I added NIFTTY 50 as a commodity, all INR numbers stopped converting from INR to USD. Hope this gives enough information for you to troubleshoot and provide a fix. Thaks.

— Reply to this email directly, view it on GitHub https://github.com/ananthakumaran/paisa/issues/235#issuecomment-2134215107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEN5TVVZ6WO27MKBQ74ZTZEPOG5AVCNFSM6AAAAABIJH4AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZUGIYTKMJQG4 . You are receiving this because you were mentioned.Message ID: @.***>

kunaguvarun commented 1 month ago

@ananthakumaran Tried yahoo and still the same. I'm thinking that it has noting to do with the price fetch APIs because prices are correctly updated under Assets -> Price. Its more to do with the conversion from INR to USD.

image
kunaguvarun commented 1 month ago

@ananthakumaran Were you able to reproduce this problem on your side? Without currency conversion happening the app is of no use

ananthakumaran commented 1 month ago

I haven't got time to debug the issue yet

On Thu, 30 May, 2024, 4:48 pm Kunagu Varun Kumar, @.***> wrote:

@ananthakumaran https://github.com/ananthakumaran Were you able to reproduce this problem on your side? Without currency conversion happening the app is of no use

— Reply to this email directly, view it on GitHub https://github.com/ananthakumaran/paisa/issues/235#issuecomment-2139333519, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEN5VSXDNVHEHYEZ7GS53ZE4DHTAVCNFSM6AAAAABIJH4AC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZZGMZTGNJRHE . You are receiving this because you were mentioned.Message ID: @.***>

ananthakumaran commented 1 month ago

image

image

image

image

I have tested it with yahoo, it's working as expected.