--historical and --monthly in register report

19 views
Skip to first unread message

Tobias Pfeiffer

unread,
Nov 29, 2019, 8:50:44 AM11/29/19
to ledge...@googlegroups.com
Hi,

I would like to ask about the meaning of the --historical parameter.

(At this point I tried to come up with a minimal example, then deleted
the text and decided to write a different email :-) )

It seems the combination of --historical and --monthly in the register
report has a bug, or I am in need of an explanation of what
--historical does to the register report.

Consider the following file:

-----
P 2019-03-01 EUR 100 JPY

2019-03-13 J Supermarket
Expenses:Food 900 JPY
Expenses:Household 123 JPY
Assets:Cash

2019-03-14 EU Supermarket
Expenses:Food 2.83 EUR
Assets:Cash
-----

It has only one price specification, so first I would assume that -H
does nothing to any report. However, consider the following output:

$ ledger -f historical.ledger reg food -X JPY
19-Mar-13 J Supermarket Expenses:Food 900 JPY 900 JPY
19-Mar-14 EU Supermarket Expenses:Food 283 JPY 1183 JPY

$ ledger -f historical.ledger reg food -X JPY --monthly
19-Mar-01 - 19-Mar-31 Expenses:Food 1183 JPY 1183 JPY

$ ledger -f historical.ledger reg food -X JPY --historical
19-Mar-13 J Supermarket Expenses:Food 900 JPY 900 JPY
19-Mar-14 EU Supermarket Expenses:Food 283 JPY 1183 JPY

$ ledger -f historical.ledger reg food -X JPY --historical --monthly
19-Mar-01 - 19-Mar-31 Expenses:Food 2083 JPY 1183 JPY

Oops, what has happened to the last report? There are 900 JPY more than
I would expect. Can anyone shed some light on this? Thank you!

Thanks
Tobias
signature.asc
Reply all
Reply to author
Forward
0 new messages