Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Wrong multi-currency printing #465

Copy link
Copy link

Description

@rmoehn
Issue body actions

I'm not sure if I'm doing the right thing, but I think I've found a problem. I'm trying to use a currency trading account like this:

2017-01-07 buy food
    expenses:food   20 usd @ 1.30 cad
    assets:usd     -20 usd
    income:currency

hledger print yields:

2017/01/07 buy food
    expenses:food    20 usd @ 1.30 cad
    assets:usd                 -20 usd
                            -26.00 cad
    income:currency             20 usd

Using hledger print -O csv, I can understand how this is meant:

"txnidx","date","date2","status","code","description","comment","account","amount","commodity","credit","debit","status","posting-comment"
"1","2017/01/07","","","","buy food","","expenses:food","20 @ 1.30 cad","usd","","20 @ 1.30 cad","",""
"1","2017/01/07","","","","buy food","","assets:usd","-20","usd","20","","",""
"1","2017/01/07","","","","buy food","","income:currency","20","usd","","20","",""
"1","2017/01/07","","","","buy food","","income:currency","-26.00","cad","26.00","","",""

However, in this case print is not idempotent. – hledger print | hledger -f- print yields:

2017/01/07 buy food
    expenses:food    20 usd @ 1.30 cad
    assets:usd                 -20 usd
    -26.00 cad              -26.00 cad
    income:currency             20 usd

This looks wrong.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WISHSome kind of improvement request or proposal.Some kind of improvement request or proposal.print

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.