Balance View: collapse purchases into single aggregate line #236
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nidde/parenting-tool!236
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "copilot/update-balance-view-purchases"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Balance View was listing every individual purchase as a separate expense entry with its own category, making the breakdown noisy. Instead, all purchases for the period should appear as a single "Purchases" total.
Description
BalanceService::getDetailedMonthlyBalance()was iterating over everyPurchaserecord viagetPurchasesForUser()and pushing one entry per item using the purchase's category name. Replaced with a single call to the already-availablegetPurchaseTotalForUser(), pushing one aggregate entry:No frontend changes needed —
MonthView.vue'sgroupByCategoryalready groups bycategory.name, so the single entry collapses naturally into one chart slice and one summary row.Type of Change
Testing
Code Quality
CI/CD Checks
Additional Notes
Also a minor performance improvement:
getPurchaseTotalForUser()issues a singleSUMquery vs. fetching all purchase rows with eager-loaded categories.Comment
@coderabbitai helpto get the list of available commands and usage tips.