Balance Report with --lots

35 views
Skip to first unread message

samt

unread,
Dec 18, 2019, 8:48:55 AM12/18/19
to Ledger
It there a way to have ledger print out the account next to each lot of shares when producing a balance report with --lots?

More specifically,

ledger --file ledger.txt --price-db=price-db.txt balance Assets:Investments:Roth\ IRA --lots --date-format %Y/%m/%d

produces output that looks like

1.123 ABCD {$ 1.000} [2019/07/31]
2.123 ABCD {$ 1.000} [2019/08/30]
3.123 ABCD {$ 1.000} [2019/09/30]
4.123 ABCD {$ 1.000} [2019/10/31]
5.123 ABCD {$ 1.000} [2019/11/29]  Assets:Investments:Roth IRA


 I'm looking for a way to get output that looks like this

1.123 ABCD {$ 1.000} [2019/07/31]  Assets:Investments:Roth IRA
2.123 ABCD {$ 1.000} [2019/08/30]  Assets:Investments:Roth IRA
3.123 ABCD {$ 1.000} [2019/09/30]  Assets:Investments:Roth IRA
4.123 ABCD {$ 1.000} [2019/10/31]  Assets:Investments:Roth IRA
5.123 ABCD {$ 1.000} [2019/11/29]  Assets:Investments:Roth IRA

Martin Michlmayr

unread,
Dec 19, 2019, 5:04:52 AM12/19/19
to ledge...@googlegroups.com
* samt <tetruash...@gmail.com> [2019-12-18 05:48]:
> It there a way to have ledger print out the account next to each lot of
> shares when producing a balance report with --lots?
>
> More specifically,
>
> ledger --file ledger.txt --price-db=price-db.txt balance
> > Assets:Investments:Roth\ IRA --lots --date-format %Y/%m/%d

I'm not an expert with the format strings but I don't think this is
possible.

You could write a Perl script fairly easily that changes the output,
though.

--
Martin Michlmayr
https://www.cyrius.com/

samt

unread,
Dec 19, 2019, 6:20:29 AM12/19/19
to Ledger
That's reasonable. However, would the behavior I described be preferable when running a balance report with the --lots and --flat option?
Reply all
Reply to author
Forward
0 new messages