Hi.

I recently moved from GnuCash to ledger-cli and I love it. I am trying to 
bring some order into my finaces and to generate nice charts with gnucash. 
Now I have come to a problem that I am not sure how to solve. The problem 
could simply be me not understanding how things work. I am going to explain 
my problem with a simple ledger file with 2 transactions and a couple of 
prices.

Ledger file is:
; some price definitions

P 2017/01/01 EUR 7 HRK

; price for FUND in EUR
P 2017/01/01 FUND 100 EUR
P 2017/02/01 FUND 110 EUR
P 2017/04/01 FUND 120 EUR

P 2017/04/01 EUR 8 HRK

2017/01/02 * Buy funds
Assets:Funds:Fund1  1.0 FUND
Assets:Checking      -100 EUR

2017/03/01 * Some other EUR transaction defining EUR->HRK conversion
Expenses:EurExpenses
Assets:Checking -100 EUR @ 6 HRK


The main transaction I am interested is buying some FUND (amount 1) with 
100 EUR.

When i try a report in EUR everyting is OK:
ledger -f test.ledger reg Fund1 --exchange EUR
2017-01-02 Buy funds                              Assets:Funds:Fund1       
100 EUR                 100 EUR
2017-02-01 Commodities revalued                   <Revalued>                
10 EUR                 110 EUR
2017-04-01 Commodities revalued                   <Revalued>                
10 EUR                 120 EUR

Value of FUND in EUR changes twice (when the price of FUND in EUR changes).

Now the same report in another currency:

ledger -f test.ledger reg Fund1 --exchange HRK
2017-01-02 Buy funds                              Assets:Funds:Fund1        
 HRK700                  HRK700
2017-03-01 Commodities revalued                   <Revalued>                
 HRK-40                  HRK660
2017-04-01 Commodities revalued                   <Revalued>                
 HRK300                  HRK960

The problem here is that price is revalued when (in my opinion) it shoudn't 
be. A transaction unrelated to bought FUNDs has changed conversion rate 
from EUR to HRK (-100 EUR @ 6 HRK). In this case I meant for that to be the 
exchange rate used by my bank for that transaction.

What I would expect in this second case would be:

ledger -f test.ledger reg Fund1 --exchange HRK
2017-01-02 Buy funds                              Assets:Funds:Fund1        
 HRK700                  HRK700
2017-02-01 Commodities revalued                   <Revalued>                
 HRK70                   HRK770 (110 * 7)
2017-04-01 Commodities revalued                   <Revalued>                
 HRK190                  HRK960 (120 * 8)

Any idea what I am doing wrong or missunderstanding?

Thanks for help!

Ivan

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to