-
-
Notifications
You must be signed in to change notification settings - Fork 930
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
Template only the relevant amount in a split-schedule category #2652
Template only the relevant amount in a split-schedule category #2652
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ 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
View detailed bundle breakdownAdded No assets were added Removed No assets were removed 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 No assets were unchanged |
Im getting weird amounts budgeted instead of what the spilts are asking for. All I did was make a $200 schedule that allocated 50 to one category and 150 to another. I could post the schedule as expected, but when applying the template the amounts were really funky |
I updated the logic to handle signs more correctly (or at least what I think is more correctly). Can you try your test case and see if that improves on this at all? If not, wondering if you could provide a video of the issue you're seeing as I was having trouble replicating |
Ok, it could have been that I put in a bad amount sign before. Your other PR will help with that. But it is interesting that the template amounts get funky if the split amounts are the wrong sign. |
Yep! Hopefully that most recent commit helps with the funkiness! |
As it says on the tin. For the logic, there are a few cases to consider; open to changing any of these, but these ones seem logical to me:
=> e.g., if you have a split with "personal trainer" and "gym membership", you can template a "personal trainer" category that just receives the amount due there.
=> self-explanatory, the split belongs to only one category
These ones are more subject to change:
=> this is so that if you write "#template schedule foo" in a category that's unrelated, you don't end up with "0" of the schedule
=> I think this part is most open to change. This is so that if you add a schedule with a that overwrites the transaction amount, the overwritten amount will get used. I don't see a use-case for overwriting the transaction amount, but it's an option the UI supports so IMO it could be worth handling here