Issue 82 in hledger: generate commodity revaluation transactions ?

7 views
Skip to first unread message

hle...@googlecode.com

unread,
Jan 18, 2012, 12:21:22 PM1/18/12
to hle...@googlegroups.com
Status: Accepted
Owner: si...@joyful.com
Labels: Type-Enhancement Priority-Medium

New issue 82 by si...@joyful.com: generate commodity revaluation
transactions ?
http://code.google.com/p/hledger/issues/detail?id=82

As reported by betabug, hledger doesn't auto-generate the commodity
revaluation transactions described at
http://ledger-cli.org/3.0/doc/ledger3.html#Commodity-Pricing-Problem , so
h/ledger reports can differ eg when exchange rates are $

$ cat t.j
P 2011/11/18 EUR CHF 1.234

2011/11/18 Invoice
Debitor EUR 1000.00
Sales EUR -1000.00

P 2011/12/02 EUR CHF 1.2261

2011/12/07 Payment
Debitor EUR -1000.00
Currency:EUR EUR 1000.00

$ hledger -f t.j bal
EUR 1000.00 Currency:EUR
EUR -1000.00 Sales
--------------------
0

$ hledger -f t.j bal --cost
CHF 1226.1000 Currency:EUR
CHF 7.9000 Debitor
CHF -1234.000 Sales
--------------------
0

$ ledger -f t.j bal
EUR 1000.00 Currency:EUR
EUR -1000.00 Sales
--------------------
0

$ ledger -f t.j bal --cost
EUR 1000.00 Currency:EUR
EUR -1000.00 Sales
--------------------
0

$ ledger -f t.j bal --market
CHF1226 Currency:EUR
CHF-1226 Sales
--------------------
0

Some corresponding register reports for reference:

$ hledger -f t.j reg
2011/11/18 Invoice Debitor EUR 1000.00 EUR
1000.00
Sales EUR
-1000.00 0
2011/12/07 Payment Debitor EUR -1000.00 EUR
-1000.00
Currency:EUR EUR
1000.00 0

$ hledger -f t.j reg --cost
2011/11/18 Invoice Debitor CHF 1234.000 CHF
1234.000
Sales CHF
-1234.000 0
2011/12/07 Payment Debitor CHF -1226.1000 CHF
-1226.1000
Currency:EUR CHF
1226.1000 0

$ hledger -f t.j reg Debitor
2011/11/18 Invoice Debitor EUR 1000.00 EUR
1000.00
2011/12/07 Payment Debitor EUR
-1000.00 0

$ hledger -f t.j reg Debitor --cost
2011/11/18 Invoice Debitor CHF 1234.000 CHF
1234.000
2011/12/07 Payment Debitor CHF -1226.1000 CHF
7.9000

$ ledger -f t.j reg
11-Nov-18 Invoice
Debitor EUR
1000.00 EUR 1000.00

Sales EUR
-1000.00 0
11-Dec-07 Payment
Debitor EUR
-1000.00 EUR -1000.00

Currency:EUR EUR
1000.00 0


$ ledger -f t.j reg Debitor
11-Nov-18 Invoice
Debitor EUR
1000.00 EUR 1000.00
11-Dec-07 Payment
Debitor EUR
-1000.00 0

$ ledger -f t.j reg --market
11-Nov-18 Invoice
Debitor
CHF1234 CHF1234

Sales
CHF-1234 0
11-Dec-07 Payment
Debitor
CHF-1226 CHF-1226

Currency:EUR
CHF1226 0

$ ledger -f t.j reg Debitor --market
11-Nov-18 Invoice
Debitor
CHF1234 CHF1234
11-Dec-02 Commodities revalued
<Revalued>
CHF-8 CHF1226
11-Dec-07 Payment
Debitor
CHF-1226 0

hle...@googlecode.com

unread,
Jan 18, 2012, 12:25:26 PM1/18/12
to hle...@googlegroups.com

Comment #1 on issue 82 by si...@joyful.com: generate commodity revaluation
transactions ?
http://code.google.com/p/hledger/issues/detail?id=82

First paragraph should end with "when exchange rates are changing."

hle...@googlecode.com

unread,
Jan 18, 2012, 1:26:58 PM1/18/12
to hle...@googlegroups.com

Comment #2 on issue 82 by si...@joyful.com: generate commodity revaluation
transactions ?
http://code.google.com/p/hledger/issues/detail?id=82

Actually it's not described at that link, but at places like
https://groups.google.com/forum/#!searchin/ledger-cli/revalued/ledger-cli/9oa47zA-qqM/Gkpg0VoVkHkJ

hle...@googlecode.com

unread,
Mar 7, 2013, 12:47:57 PM3/7/13
to hle...@googlegroups.com
Updates:
Labels: Component-hledger

Comment #3 on issue 82 by si...@joyful.com: generate commodity revaluation
transactions ?
http://code.google.com/p/hledger/issues/detail?id=82

(No comment was entered for this change.)

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages