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

Adding "--value"/"-V" option for balancesheet/incomestatement/cashflow and register #361

Merged
merged 2 commits into from Dec 31, 2016

Conversation

mstksg
Copy link
Collaborator

@mstksg mstksg commented Jun 25, 2016

Let me know if this is in the spirit of the library/utility! :)

I tried my best to adhere to the style that I saw used across the library, but feel free to tell me if there are any stylistic inconsistencies!

I see some potential for refactoring out balancesheet/incomestatement/cashflow commands, too, and would be willing to do it if you think that it'd be helpful to do so.

lib: postingsValue to convert posting amounts to market value
@mstksg
Copy link
Collaborator Author

mstksg commented Jun 25, 2016

hm, just realized that it'd make a lot more sense to just "market value-ize" the entire journal itself before anything happens, instead of the reports.

@simonmichael simonmichael added A-WISH Some kind of improvement request, hare-brained proposal, or plea. balancesheet incomestatement cashflow register labels Jun 25, 2016
@simonmichael
Copy link
Owner

Great! Can you also update the manual for these commands - cf "Market value" section in hledger/doc/commands-balance.m4.md.

You could be right about the ordering. I found it harder to convince myself it would be correct and better that way. I'm not totally clear on how to decide what order things should be done in. If you try it, be sure to run the tests.

By all means do refactor these commands. As you know they're just a thin layer above the balance command, and arguably should be some kind of alias rather than a full command. Do you find them useful with -V ? One way or another, it would be nice to bring them to feature parity with the balance command, eg by basing them on multiBalanceReport.

@mstksg
Copy link
Collaborator Author

mstksg commented Jun 25, 2016

I find -V useful because I track assets with lots of different currencies and commodities, and the summaries can be a bit unweildy because each balance and transaction can take several lines :) -V lets me see things as one-line/one-amount aggregates

@simonmichael
Copy link
Owner

Sometimes -B is enough for that, but it's not the same as -V I know. There's also cur:CURRENCY to see them one at a time.

@simonmichael
Copy link
Owner

Also, the balance command can be configured to show multi-commodity amounts on one line.. just throwing out ideas.

@mstksg
Copy link
Collaborator Author

mstksg commented Jun 26, 2016

@simonmichael oh, what is that configuration option? :O

@simonmichael
Copy link
Owner

http://hledger.org/hledger.html#custom-balance-output

@simonmichael simonmichael removed the A-WISH Some kind of improvement request, hare-brained proposal, or plea. label Jul 17, 2016
@simonmichael
Copy link
Owner

@mstksg were you going to refactor this, and add docs ? If it's done similarly to the balance command, I don't mind if it's not optimally factored. Releasing 1.1 soon, I can update the docs if you prefer.

@simonmichael simonmichael modified the milestone: 1.1 Dec 29, 2016
@simonmichael simonmichael merged commit b935cd2 into simonmichael:master Dec 31, 2016
simonmichael added a commit that referenced this pull request Dec 31, 2016
@simonmichael
Copy link
Owner

It seems I may not have time to update this for HEAD today - please do it if you can.

@simonmichael
Copy link
Owner

This didn't make 1.1 as I have no more hacking time today. I regret this, my apologies.

@mstksg
Copy link
Collaborator Author

mstksg commented Jan 2, 2017

No problem! I've been out of town for the holidays. I'll probably get some time to finish this up for the next release when I get back, thank you for your patience :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants