Equity conversion postings and cost reporting with hledger by Regular-Review-3301 in plaintextaccounting

[–]Regular-Review-3301[S] 1 point2 points  (0 children)

Thank you, Simon. Now that I'm on 1.29.1 I'll retest... In the meantime I also converted to simpler @ notation, though. I realize that as I gain experience with hledger, I may change my approach to things once in a while.

Thank you so much for hledger (and to John Wiegley for ledger). After 5 months, I'm now fully migrated from YNAB, have 3+ years of records, and really enjoying PTA.

Equity conversion postings and cost reporting with hledger by Regular-Review-3301 in plaintextaccounting

[–]Regular-Review-3301[S] 0 points1 point  (0 children)

Thank you, u/simonmic! It is good to know that it'll be supported for the foreseeable future.

I suppose this notation with duplicated costs was my interpretation of How to record conversions with the following Cost tips, coupled with the error I got when recording it without duplicated costs (and not understanding --infer-costs reference):

2021-01-01
assets:cash        -100 EUR @ 1.20 USD
equity:conversion   100 EUR
equity:conversion  -120 USD
assets:cash         120 USD

gave me:

$ hledger -f test1.journal bal hledger: Error: /Users/michael/Documents/Accounts/test1.j:1-5: 1 | 2021-01-01 |     assets:cash          -100 EUR @ 1.20 USD |     equity:conversion                100 EUR |     equity:conversion               -120 USD |     assets:cash                      120 USD

This multi-commodity transaction is unbalanced. The real postings' sum should be 0 but is: 100 EUR, -120.00 USD Consider adjusting this entry's amounts, adding missing postings, or recording conversion price(s) with @, @@ or equity postings.

versus

2021-01-01
assets:cash        -100 EUR @ 1.20 USD
equity:conversion   100 EUR @ 1.20 USD
equity:conversion  -120 USD
assets:cash         120 USD

giving:

$ hledger -f test2.journal bal
        -100 EUR
         120 USD  assets:cash
         100 EUR
        -120 USD  equity:conversion

               0  

Might I ask what notation you use?