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

"Bills Paid"-sum does not respect current date range #341

Closed
bnw opened this issue Oct 3, 2016 · 2 comments
Closed

"Bills Paid"-sum does not respect current date range #341

bnw opened this issue Oct 3, 2016 · 2 comments

Comments

@bnw
Copy link
Contributor

bnw commented Oct 3, 2016

I noticed that when I select a month in which no transactions have been made, the "Bills Paid" amount in the dashboard can be > 0.
This happens because BillRepository::getBillsPaidInRange takes into account all bills whose periods intersect the current date range.

For example, lets say I have a yearly bill, starting in 2016-01-01.
I pay that bill in March. Now, the amount of the bill will be added to the "Bills Paid"-sum for every month between March and December.

Is this intended behavior?

@JC5
Copy link
Member

JC5 commented Oct 3, 2016

Yes and no.

It is, because technically the bill has been paid in the period the bill is valid: the year. But no, it should not register for March because there is no transaction relevant for the current view.

I never noticed this because I'm currently not using yearly bills. These things can pop up every now and then.

I'll look into it and see if I can get it fixed. I believe getBillsPaidInRange isn't used often, so it should not be difficult to fix.

@JC5
Copy link
Member

JC5 commented Oct 20, 2016

I've changed some of of my personal insurance policies to be paid yearly and I've created a bill to match this. I will run into this problem soon so I should be able to fix it soon as well.

JC5 added a commit that referenced this issue Oct 21, 2016
JC5 added a commit that referenced this issue Oct 21, 2016
@JC5 JC5 closed this as completed Oct 22, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants