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

Bug: Filling Value Miscalculation #1581

Open
atakanerbas opened this issue Dec 29, 2024 · 3 comments
Open

Bug: Filling Value Miscalculation #1581

atakanerbas opened this issue Dec 29, 2024 · 3 comments
Labels
🐛 Bug Something isn't working ℹ️ Needs info Further information is requested

Comments

@atakanerbas
Copy link

atakanerbas commented Dec 29, 2024

Describe the bug
After creating an asset and adding a historical balance (e.g., from one year ago), the graph incorrectly calculates the balance for the day before the balance change.
For example, my asset should increase from 10.000 TRY to 100.000 TRY, but it incorrectly shows 0 TRY for the previous day.

To Reproduce
Steps to reproduce the behavior:

  1. Create an account (Investment & Brokerage)
  2. Add a balance (~1 year before)
  3. Navigate to the investment's page.
  4. Check the graph. The dashboard graph is also appears broken.

Expected behavior
The asset graph should display the following: 10.000 10.000 10.000 .... 10.000 100.000, instead of 10.000 10.000 10.000 .... "0" 100.000

What version of Maybe are you using?
Self hosted v0.2.0

What operating system and browser are you using?
Device: M2 MacBook Air
OS: macOS Ventura 13.5
Browser: Chrome

Screenshots / Recordings
Graph:
Screenshot 2024-12-29 at 13 29 08

Additional context
The issue is likely related to the balance creation logic rather than multicurrency handling. Exchange data exists for all dates.
Screenshot 2024-12-29 at 13 23 24

@atakanerbas atakanerbas added the 🐛 Bug Something isn't working label Dec 29, 2024
@ManishMadan2882
Copy link

@atakanerbas Can I work on this issue ?

@zachgoll
Copy link
Collaborator

@atakanerbas can you please share the exact "Balance updates" you have on the Activity view for this account?

When an account is created, our system automatically creates 2 balance records:

  1. $0, one day ago
  2. $X (whatever balance you specify), today

If you haven't deleted the first balance record after adding the one a year ago, this is expected behavior. You can simply delete that balance update and your graph will calculate correctly.

@zachgoll zachgoll added the ℹ️ Needs info Further information is requested label Dec 30, 2024
@atakanerbas
Copy link
Author

atakanerbas commented Jan 3, 2025

I see. If this is the intended behavior, then there is no bug.
However, I expected my asset to go directly from 10.000 to 100.000 without dropping to 0.
If I add a balance within the year, everything is correct except for yesterday.
However, nothing seems to make yesterday special in this scenario, at least from an end user's perspective.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working ℹ️ Needs info Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants