Skip to content

Bug: Wrong value "Average cost" that distorts the result #2085

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

Open
4 tasks
sebfar9172 opened this issue Apr 11, 2025 · 0 comments
Open
4 tasks

Bug: Wrong value "Average cost" that distorts the result #2085

sebfar9172 opened this issue Apr 11, 2025 · 0 comments

Comments

@sebfar9172
Copy link

sebfar9172 commented Apr 11, 2025

Before you start (required)

General checklist

  • [X ] I have removed personal / sensitive data from screenshots and logs
  • [ X] I have searched existing issues and discussions to ensure this is not a duplicate issue

How are you using Maybe?

  • I am a paying Maybe customer (hosted version)
    • Paying Maybe users can also open requests in Intercom (if there is sensitive info involved)
  • [ X] I am a self-hosted user

Self hoster checklist

Paying, hosted users should delete this entire section.

If you are a self-hosted user, please complete all of the information below. Issues with incomplete information will be marked as Needs Info to help our small team prioritize bug fixes.

  • Self hosted app commit SHA (find in user menu): [7096eef]
    • [X ] I have confirmed that my app's commit is the latest version of Maybe
  • Where are you hosting?
    • Render
    • [ X] Docker Compose
    • Umbrel
    • Other (please specify)

Bug description

I bought the same shares over different periods and the average cost is not well calculated

To Reproduce

  1. Bought 1.9887 shares of 49V at €88,63
  2. Bought 0.388 shares of 49V at €58,64
  3. Calculation made by the application: €73,64

Expected behavior

1.9887 * €88,63 = 176,26 €
0.388 * €58,64 = 22,75 €

Average cost = (176,26 + 22,75) / (1,9887+0,388) = 83,734 (and not 73,64)

Screenshots and/or recordings

Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant