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

Budget home page does not show expenses #366

Closed
3mz3t opened this issue Oct 29, 2016 · 9 comments
Closed

Budget home page does not show expenses #366

3mz3t opened this issue Oct 29, 2016 · 9 comments

Comments

@3mz3t
Copy link

3mz3t commented Oct 29, 2016

Hi,

First of all my thanks. Firefly is helping me greatly to control my expenses. Well done :)

And a bug report:

On the budget page expenses against a certain budget are not shown / calculated.
On the budget detail page for that budget expenses are shown.

Please see screenshots.

Cheers,

3mz3t

budget page
budget details

@JC5
Copy link
Member

JC5 commented Oct 29, 2016

Thanks for the compliments!

Mmm, that is strange indeed. What happens when you run php artisan cache:clear on the command line? That might solve the issue.

How many transactions are assigned to the budget? Is it one big one, or multiple small ones? Are they split journals, by any chance?

The code to show "Spent" is pretty straight forward but I'll dive into it and see what might be the issue.

@3mz3t
Copy link
Author

3mz3t commented Oct 29, 2016

Hi,

It's 1 transaction in this case. I do have the same problem with a
'household' budget that has multiple expenses. In that budget, some are
calculated, but not all. See attached screenshots. They are not split journals.

[expenses@singapore firefly-iii]$ php artisan cache:clear
Cache cleared successfully.

The cache was successfully cleared but that did not resolve the issue.

Drop me your public key if you'd like a peek at the server.

Cheers,

Menno


On 10/29/2016 05:27 PM, James Cole wrote:

Thanks for the compliments!

Mmm, that is strange indeed. What happens when you run |php artisan
cache:clear| on the command line? That might solve the issue.

How many transactions are assigned to the budget? Is it one big one,
or multiple small ones? Are they split journals, by any chance?

The code to show "Spent" is pretty straight forward but I'll dive into
it and see what might be the issue.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#366 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AWECQTllyg_PGJDqOV9elnU2WFf4gdGkks5q4xF_gaJpZM4KkEBZ.

@3mz3t
Copy link
Author

3mz3t commented Oct 29, 2016

Email attachments didn't get included. Here they are.

household main
household details

@JC5
Copy link
Member

JC5 commented Oct 29, 2016

Which version of Firefly are you running right now? It's in the bottom right corner.

@JC5
Copy link
Member

JC5 commented Oct 29, 2016

Alright I've found a difference between the two amounts. They are calculated slightly differently which may cause the difference.

I will update the query so this will matter less.

@3mz3t
Copy link
Author

3mz3t commented Oct 29, 2016

I'm on 4.1.1. Just to be sure I did a git pull before I sent the bug report.

JC5 added a commit that referenced this issue Oct 29, 2016
JC5 added a commit that referenced this issue Oct 29, 2016
@JC5
Copy link
Member

JC5 commented Oct 29, 2016

Good. You should be able to safely do the following.

Open your .env file and change APP_LOG_LEVEL=xxxxx to APP_LOG_LEVEL=debug. I think the xxxx is usually "warning" but I'm not sure. It must be "debug" for this to work.

Then, run these commands:

git checkout develop
git pull
php artisan cache:clear

It should pull in the very latest code.

Then check out directory /storage/logs and remove any log files there.

Then, visit the /budgets page and see if a log file is created. The content should be something like this.

DEBUG: Now at budget #1 ("***")  
DEBUG: spentInPeriod: Now in spentInPeriod for these budgets:  [1] 
DEBUG: spentInPeriod: and these accounts:  [***, ***, ***] 
DEBUG: spentInPeriod: Start date is "2016-10-01", end date is "2016-10-31"  
DEBUG: spentInPeriod: Result from first query: ***
DEBUG: spentInPeriod: Result from second query: ***
DEBUG: spentInPeriod: FINAL: ***

As you may have guessed, these entries reveal how the displayed amount is calculated.

Run php artisan cache:clear again.

Remember one of the budgets you see here (for example your budget "Household"), and then visit the budget page itself at /budgets/xx/xx.

Your log file should once again get a new set of lines, which look like the ones above.

Please pay close attention if the amounts are the same. If not, there should be a difference in the lines. For example "and these accounts" is different. Or maybe the start date and the end date are different.

Let me know if it works!

@3mz3t
Copy link
Author

3mz3t commented Oct 29, 2016

Yes, this works. The log entries are generated, the totals are correct. Sadly now I can see that I overspent on the household budget ;)

I ran into 1 problem.

git checkout develop does not work if someone followed the standard installation guide at https://jc5.github.io/firefly-iii/installation-guide/

The depth param at git clone https://github.com/JC5/firefly-iii.git --depth 1 causes the following line to be generated in .git/config:

fetch = +refs/heads/master:refs/remotes/origin/master

The develop branch will not be accessible because of that.

I changed the line in .git/config to:

fetch = +refs/heads/*:refs/remotes/origin/*

Then execute:
git fetch
git checkout develop

And the develop branch will be checked out. I suggest removing --depth from the installation instructions.

@JC5
Copy link
Member

JC5 commented Oct 30, 2016

Good to hear the problem is fixed!

And thanks for the tip about the installation guide. It needs an overhaul any way, and I will make sure to fix it!

@JC5 JC5 closed this as completed Oct 30, 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