-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Goals] Negate schedule amount to budget if income #2125
[Goals] Negate schedule amount to budget if income #2125
Conversation
To ensure no unintended impact to remainder calcs etc.
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Bundle Stats — desktop-clientHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
Can you put together an example budget file that shows the bug? Ive not seen this issue and I have some income schedules that I use. Side question. Are you setting the schedule in question to be income instead of an expense? |
Yep. 2023-12-27-My-Finances-01903ab.zip
If by setting you mean having a +ve amount then yes. Are you doing something different? |
Ok, you're right this is broken. I had forgotten that I wasn't actually using a schedule in the income category on my end. I've been using it for long enough that I forgot what the template actually was. @shall0pass does this look good to you? |
This fixes the one case you mentioned, but it appears there are issues in other categories as well. For example: So if I had '#template schedule paycheck' and expect the entire amount to go into this one category, it will budget a negative amount in both report types. Would it make sense to use an absolute value around amounts before applying it to the budget cells so it's always positive (inflow or outflow)? I can't think of a reason why an amount you want to schedule using a template would ever return a negative budgeted number, but I may be overlooking an edge case. |
That made sense to me, where the paycheck would be negative expense and counteract any normal expenses. That would be assuming that you want to pull that money out instead of leaving it in or have it be mostly canceling out in some way. |
A different example. I have a monthly schedule set up to deposit $X into my HSA account. If I use that schedule in the templates as-is, it will remove $X from the HSA category instead of adding $X to the category. (I have them mentally linked since only medically qualified expenses can be used from that account). Just last month I thought I would use the schedule template for this, but now I see that it'll remove the deposit from the category rather than add it as intended. I'm going to revert the template to the previous fixed amount for now. |
Agreed. This behaviour also makes sense to me. If it's an expense Category then an expected/scheduled income has to be budgeted as negative, as positive values here represent an expense. Then when income transactions arrive in the account, they will balance appropriately.
Apologies, I don't exactly understand what the goal in terms of budgeting is here. Are you trying to track the deposits into the account, the medical expenses or the resultant of both? In my head, if it's an expense category, and it's a deposit you're scheduling, it needs to be a -ve budget for the balance to work. Regardless, this change only affects the behaviour of Income categories, everything else is as it was. |
Perhaps it's just how I have my accounts organized. I have a Savings account, income to that account goes to an income category. I also have a spending category that has a balance that mirrors the account balance and money is budgeted that month in the exact amount of the income for the Savings account. I'm fine with the changes you've made as-is. I definitely won't be using an income schedule in the rollover budget though, as this past month it threw my To Budget amount off considerably and the category balance and account balance were no longer the same (Account balance went up by the scheduled amount and category went down by the scheduled amount.). I understand not all templates can be used in the same way. Maybe the income template might be more appropriate. Thanks for thinking about this. |
* Negate schedule amount to budget if income * Release notes * Determine sign at initial calc To ensure no unintended impact to remainder calcs etc. * Lint fixes
When referencing a schedule in a goal template for an income category, the amount to budget comes in as a negative amount. This PR fixes that by correctly signing the amount to budget if the category is an income category.