Register output of --total-data -J with subacconts is incorrect?

11 views
Skip to first unread message

thaler...@gmail.com

unread,
Feb 22, 2020, 1:56:17 PM2/22/20
to Ledger
Hi,

I'd like to get the running total of my assets for charting.
Given:

$ cat bug.ledger

2020/02/22 * Employer
    Income:Salary                            -1000
    Assets:Bank

2020/02/23 * Create Deposit
    Assets:Bank:Deposit                       500
    Assets:Bank

Ledger reports:

$ ledger -f bug.ledger reg -J Assets

2020-02-22 1000
2020-02-23 1500
2020-02-23 1000

I found the output misleading (and it also corrupts the chart). I never had 1500 units of money.
It seems to me that ledger shows me a transient state: Assets:Bank:Deposit already
received the money, but Assets:Bank does not have it deduced yet.

I'd expect this output:

2020-02-22 1000
2020-02-23 1000

i.e: No change in the running total of Assets on 02/23.

How can I avoid this issue? Is it a bug, or do I structure my journal incorrectly?

Thanks,

John Wiegley

unread,
Feb 22, 2020, 2:15:09 PM2/22/20
to thaler...@gmail.com, Ledger
>>>>> "t" == thalerbenedek <thaler...@gmail.com> writes:

t> $ ledger -f bug.ledger reg -J Assets

t> 2020-02-22 1000
t> 2020-02-23 1500
t> 2020-02-23 1000

t> I found the output misleading (and it also corrupts the chart). I never had
t> 1500 units of money. It seems to me that ledger shows me a transient state:
t> Assets:Bank:Deposit already received the money, but Assets:Bank does not
t> have it deduced yet.

t> How can I avoid this issue? Is it a bug, or do I structure my journal
t> incorrectly?

I believe that your journal is not setup to reflect your view of your
finances. The register report is calculating *line by line*, so you do indeed
increase the amount from 1000 to 1500, and then afterward reduce it to 1000.

What you're thinking of is a report that would only take the whole transaction
into account, and not its individual postings. However, this is not what the
register report does.

If I were you, I'd use a separate account entirely -- outside of Assets even
-- to indicate funds that have been "received" from income, but not yet
transferred to the bank. You could call it "Transfers", for example. Then
you'd see the sort of report you're anticipating.

John
Reply all
Reply to author
Forward
0 new messages