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
Total Value does not account for Quantity #458
Comments
Also experiencing this. Is it possible to get this into this repo as well? :) |
Yea, it was very easy fix, I can create a pull request if that helps. |
Yes, please do! |
Never mind, since I already have a fork with many changes I can't do another one. Sorry, I thought that I could just make PR but I can't. |
I can make one a bit later today based on your solution @cRaZy92. |
* Fixed incorrect sum of the total items price #458 * fix eslint errors --------- Co-authored-by: Adamko <33964772+cRaZy92@users.noreply.github.com>
First Check
Homebox Version
0.9.1
What is the issue you are experiencing?
Total Value sums the values (unit purchase price), without accounting for the quantity. It should instead sum the product of the purchase price and the quantity.
I am not very familiar with go, but this is called from
frontend/pages/home/statistics.ts
which callsfrontend/lib/api/classes/stats.ts
. I'm guessing that this then goes to line 229 inbackend/internal/data/repo/repo_group.go
In 236 of
repo_group.go
, there is the relevant part of the query:I'm not sure if this is as simple as the following???
How can the maintainer reproduce the issue?
Compare 'total value' to the sum of the BOM 'total price' column.
Deployment
Docker (Linux)
Deployment Details
No response
The text was updated successfully, but these errors were encountered: