Files
sure/app/models
Dream 5d06112281 Fix budget category totals to account for refunds and reimbursements (#824)
* Fix budget category totals to net refunds against expenses

Budget spending calculations now subtract refunds (negative transactions
classified as income) from expense totals in the same category. Previously,
refunds were excluded entirely, causing budgets to show gross spending
instead of net spending.

Fixes #314

* Handle missing git binary in commit_sha initializer

Rescues Errno::ENOENT when git is not installed, falling back to
BUILD_COMMIT_SHA env var or "unknown". Fixes crash in Docker
development containers that lack git.

* Revert "Handle missing git binary in commit_sha initializer"

This reverts commit 7e58458faa.

* Subtract uncategorized refunds from overall budget spending

Uncategorized refunds were not being netted against actual_spending
because the synthetic uncategorized category has no persisted ID and
wasn't matched by the budget_categories ID set. Now checks for
category.uncategorized? in addition to the ID lookup.

* perf: optimize budget category actual spending calculation
2026-01-31 09:41:28 +01:00
..
2025-12-07 18:11:34 +01:00
2025-11-24 17:54:18 +01:00
2026-01-09 19:38:04 +01:00
2026-01-22 20:37:07 +01:00
2026-01-22 20:37:07 +01:00
2026-01-23 22:05:28 +01:00
2026-01-22 20:37:07 +01:00
2026-01-23 22:05:28 +01:00
2026-01-23 22:05:28 +01:00
2025-05-23 18:58:22 -04:00
2025-11-01 09:12:42 +01:00
2026-01-22 20:37:07 +01:00
2026-01-22 20:37:07 +01:00
2026-01-23 22:05:28 +01:00
2026-01-08 15:20:14 +01:00
2026-01-23 22:05:28 +01:00
2026-01-23 22:05:28 +01:00
2025-11-25 20:21:29 +01:00