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

Dashboard Net worth doesn't sum up all assets account #1088

Closed
jinformatique opened this issue Jan 2, 2018 · 9 comments
Closed

Dashboard Net worth doesn't sum up all assets account #1088

jinformatique opened this issue Jan 2, 2018 · 9 comments
Assignees
Labels
bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release).
Milestone

Comments

@jinformatique
Copy link
Contributor

jinformatique commented Jan 2, 2018

I am running Firefly III version 4.6.12

I just started fresh from a new install to record all my assets account for 2018 and put an initial balance. It seems the total of all my assets account is not taking into account. The net worth is based only on one asset account. Same goes for the details on the account graph. You can check on the screenshots. Maybe is it part of the #1040?

firefly4612home
firefly4612assets

@JC5
Copy link
Member

JC5 commented Jan 2, 2018

I see what's happening. I can't reproduce it.

I created three normal asset accounts with everything on default.

  • No balance: empty
  • 1 dec: balance of 1000 on 1 dec 2017 (opening balance)
  • 1 jan: balance of 1000 on 1 jan 2018 (opening balance)

All accounts are correct, net worth is 2000.

Did you do something with foreign / not-foreign balances?

@JC5 JC5 self-assigned this Jan 2, 2018
@JC5 JC5 added this to the 4.7.0 milestone Jan 2, 2018
@jinformatique
Copy link
Contributor Author

So, I just connected today and the NET WORTH is the amount of all the asset accounts. Good.
I don't have any foreign / not-foreign balances, what is it?

But still in the graphic below, I have 0 for all asset accounts:
image

@JC5
Copy link
Member

JC5 commented Jan 3, 2018

Could you run the following query for me? Share the info over email.

Instead of the number XXX, enter one of the account numbers of an asset account that has a balance, but shows 0 in the chart.

select

	`transaction_journals`.`date`,
	`transactions`.`transaction_currency_id`,
	SUM(transactions.amount) AS modified,
	`transactions`.`foreign_currency_id`,
	SUM(transactions.foreign_amount) AS modified_foreign
from
	`transactions`
	left join `transaction_journals` on `transactions`.`transaction_journal_id` = `transaction_journals`.`id`
where
	`transactions`.`account_id` = 'xxxxxxx' and 
	`transactions`.`account_id` is not null and 
	`transaction_journals`.`date` >= '2018-01-01' and 
	`transaction_journals`.`date` <= '2018-02-01' and 
	`transaction_journals`.`deleted_at` is null and 
	`transactions`.`deleted_at` is null 

group by
	`transaction_journals`.`date`,
	`transactions`.`transaction_currency_id`,
	`transactions`.`foreign_currency_id`
order by `transaction_journals`.`date` asc

@Nik-vr
Copy link

Nik-vr commented Jan 11, 2018

I use SQLite database. How do I make this query?

@JC5
Copy link
Member

JC5 commented Jan 11, 2018

Use a program like DB browser for sqlite. This should work in that program. I believe there is an option to run a query:

select

	transaction_journals.date,
	transactions.transaction_currency_id,
	SUM(transactions.amount) AS modified,
	transactions.foreign_currency_id,
	SUM(transactions.foreign_amount) AS modified_foreign
from
	transactions
	left join transaction_journals on transactions.transaction_journal_id = transaction_journals.id
where
	transactions.account_id = 'xxxxxxx' and 
	transactions.account_id is not null and 
	transaction_journals.date >= '2018-01-01' and 
	transaction_journals.date <= '2018-02-01' and 
	transaction_journals.deleted_at is null and 
	transactions.deleted_at is null 

group by	
	transaction_journals.date,
	transactions.transaction_currency_id,
	transactions.foreign_currency_id
order by transaction_journals.date asc

@Nik-vr
Copy link

Nik-vr commented Jan 11, 2018

I run the specified query. It returns part of the transactions, not all.

assets

assets2

@JC5
Copy link
Member

JC5 commented Jan 11, 2018

That's no problem, the amounts are summed up. But good news: I think I have found the problem. It will be fixed in the next release.

@Nik-vr
Copy link

Nik-vr commented Jan 12, 2018

OK!

@JC5 JC5 added bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release). and removed possible bug labels Jan 12, 2018
@Nik-vr
Copy link

Nik-vr commented Jan 12, 2018

I tested your fix. Now the chart works! Thank you!

@JC5 JC5 closed this as completed in f326f08 Jan 31, 2018
@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
bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release).
Projects
None yet
Development

No branches or pull requests

3 participants