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
hledger-web --empty show 0 accounts if conversion exists #2140
Comments
Yes, -E/--empty in hledger-web and hledger-ui works oppositely from hledger (hledger hides empty/zero things by default, hledger-ui/hledger-web show them by default). |
Thanks. Just to be clear, the What is not expected is that |
I don't really have a clear understanding of how hledger-web reacts to -E and how much of a bug there is here. Is it possible to reproduce with simpler data, eg without costs or currencies ? |
(I suspect hledger-web intentionally never hides zero-balance accounts, to minimise confusion. We should check the code and if that's so, clarify the docs.) |
Hello @chaoxu, I looked into this and I see what you mean. It is always showing "0" for assets:1 because it's not really zero at all, it only appears to be when costs are ignored. If we showed costs in the sidebar, it would look like this: But I suppose that would be too disruptive, eg for people with many priced lots the sidebar will become very long ? |
Yes, too disruptive if we show costs in the sidebar. (Current hledger-web doesn't show costs anywhere in fact.) For now I am inclined to
|
This was mainly to make the sidebar more informative, but also affects and hopefully helps, all amounts displayed elsewhere.
I made the change in master and updated the hledger-web manual (see end of https://hledger.org/dev/hledger-web.html#options). I think this issue can be closed for now. |
…ael#2140] This was mainly to make the sidebar more informative, but also affects and hopefully helps, all amounts displayed elsewhere.
Here is the simplest example:
The output:
For both
hledger-web -E
andhledger-web
, the output is the same:Expected output:
Just like the above picture, but
assets:1
account should not appear at all inhledger-web -E
, as it is now empty.Related explorations
I've tested it in
hledger
, which is working correctly.Note in
hledger
,-E
shows 0 account, but inhledger-web
,-E
hides 0 accounts.The version: hledger-web 1.32.1, mac-aarch64
The text was updated successfully, but these errors were encountered: