This repository was archived by the owner on Jul 27, 2025. It is now read-only.
Reuse Correct Expense Total Calculation #1699
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #1663
Root Cause:
"Spent" and "Expenses" values on the budget page are being calculated by different functions
The value under "Spent" is calculated with
budget.actual_spending
, which does not include Uncategorized spending62%
of the$3007
is missingThis is because Uncategorized category is not present on the

budget_categories
array in thebudget
classProposed Fix:
expense_categories_with_totals.total_money
which already calculates monthly expense totals, including Uncategorized spendingMoney
toamount
to stay consistent with expected return type ofactual_spending
Alternatively
Could fix by explicit inclusion of uncategorized expenses in
actual_spending
, butexpense_categories_with_totals.total_money
already calculates the desired value, and from the issue it seems we do expect the results to be the same, so I implemented the proposal above instead in this PR.Results
After implementing the fix, the totals are consistent
