Fix parent category sums in budget #1894

Merged
zachgoll merged 1 commits from 1837-budget-parent-category-does-not-include-sums-of-subcategories into main 2025-02-25 01:51:13 +08:00
zachgoll commented 2025-02-25 01:38:48 +08:00 (Migrated from github.com)

The changes in #1823 introduced a regression where if a user had a parent category with zero transactions assigned to it while there were transactions assigned to one or more of its subcategories, the parent category summed to 0.

This is because the totals query filters out any categories with no transactions. This PR fixes this by ensuring that all family categories are included in the PeriodTotals response of the IncomeStatement.

The changes in #1823 introduced a regression where if a user had a parent category with _zero_ transactions assigned to it while there were transactions assigned to one or more of its subcategories, the parent category summed to 0. This is because the totals query filters out any categories with no transactions. This PR fixes this by ensuring that _all_ family categories are included in the `PeriodTotals` response of the `IncomeStatement`.
Foiler25 commented 2025-03-01 11:10:57 +08:00 (Migrated from github.com)

Still having this issue in v0.4.3, nothing attached to the parent category, everything in sub-categories.

image

Running self-hosted on Umbrel.

Still having this issue in v0.4.3, nothing attached to the parent category, everything in sub-categories. <img width="894" alt="image" src="https://github.com/user-attachments/assets/e18fcf39-5a49-4df6-9d6b-1be610d90a5c" /> Running self-hosted on Umbrel.
zachgoll commented 2025-03-04 02:13:15 +08:00 (Migrated from github.com)

@Foiler25 is there a chance Umbrel has not yet updated your app to the latest version? Can you confirm that the latest deploy is on v0.4.3?

This is working fine on both the hosted and self-hosted version for me so we'll need some more info to diagnose.

@Foiler25 is there a chance Umbrel has not yet updated your app to the latest version? Can you confirm that the latest deploy is on `v0.4.3`? This is working fine on both the hosted and self-hosted version for me so we'll need some more info to diagnose.
Foiler25 commented 2025-03-04 02:36:41 +08:00 (Migrated from github.com)

@Foiler25 is there a chance Umbrel has not yet updated your app to the latest version? Can you confirm that the latest deploy is on v0.4.3?

This is working fine on both the hosted and self-hosted version for me so we'll need some more info to diagnose.

Hi @zachgoll after digging a bit deeper, the version that was published on Umbrel says it is 0.4.3 but within Maybe it is showing it currently running 0.4.1, apologies for the mistake, I will reach out through the appropriate channels for Umbrel instead.

> @Foiler25 is there a chance Umbrel has not yet updated your app to the latest version? Can you confirm that the latest deploy is on `v0.4.3`? > > This is working fine on both the hosted and self-hosted version for me so we'll need some more info to diagnose. Hi @zachgoll after digging a bit deeper, the version that was published on Umbrel says it is 0.4.3 but within Maybe it is showing it currently running 0.4.1, apologies for the mistake, I will reach out through the appropriate channels for Umbrel instead.
Sign in to join this conversation.