Skip to content
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

Issue with allocated vs spent of trans from scheduled #201

Closed
jantman opened this issue Sep 14, 2018 · 2 comments · Fixed by #203
Closed

Issue with allocated vs spent of trans from scheduled #201

jantman opened this issue Sep 14, 2018 · 2 comments · Fixed by #203

Comments

@jantman
Copy link
Owner

jantman commented Sep 14, 2018

I have a recurring, monthly scheduled transaction of $17.99. It's the only transaction for that Budget in the current pay period.

I create a Transaction for it of some vastly greater amount - like $1000.

The "Remaining" info box at the top of the pay period still displays an amount based on the $17.99, not the $1000.

The fact that I haven't seen this before makes me think it's hitting some strange edge case, possibly on pay periods with a relatively small total of scheduled transaction amounts.

@jantman
Copy link
Owner Author

jantman commented Sep 14, 2018

Doing some initial experimentation with the test data, it seems (initially) that this is triggered when a periodic budget has a $0 allocated amount for the budget itself.

@jantman
Copy link
Owner Author

jantman commented Sep 15, 2018

The problem is here. When we calculate the overall sums for the payperiod from the budget sums, we're only using the allocated, budget_amount, and spent fields from the budget sums. We then base remaining on either spent or allocated. So we're going to have this bug any time we have Transactions created for Scheduled Transactions in the current payperiod, but with different amounts.

jantman added a commit that referenced this issue Sep 15, 2018
jantman added a commit that referenced this issue Sep 15, 2018
… and much greater spend than allocated, we properly calculate remaining for the payperiod
jantman added a commit that referenced this issue Sep 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant