mikekchar / ledger-currencies

A ledger-cli tutorial to show how to deal with multiple currency transactions
53 stars 6 forks source link

Check the balance of 3.ledger instead of 2.ledger. #3

Closed krris closed 6 years ago

krris commented 6 years ago

We should check the balance of 3.ledger (300 JPY left over) instead of 2.ledger.

Output for ledger -f 2.ledger -X JPY bal:

            3300 JPY  Assets
            1100 JPY    CAD
            1200 JPY    GBP
            1000 JPY    JPY
           -3300 JPY  Equity
           -1100 JPY    CAD
           -1200 JPY    GBP
           -1000 JPY    JPY
--------------------
                   0

Output for ledger -f 3.ledger -X JPY bal:

            3300 JPY  Assets
            1100 JPY    CAD
            1200 JPY    GBP
            1000 JPY    JPY
           -3000 JPY  Equity
           -1000 JPY    CAD
           -1000 JPY    GBP
           -1000 JPY    JPY
--------------------
             300 JPY
mikekchar commented 6 years ago

Thanks @krris! I haven't looked at this for ages and totally forgot about it.