Hello ledger mailing list!
I've just noticed a possible bug in ledger. The idea is that, when there
is a null-amount posting which balances multiple commodities in the
transaction, any automatic transactions that get activated on that posting
will only run for one of the commodities.
The issue came up in Bitcoin trading, where one commodity is EUR (euros)
and the other is XBT (bitcoins). I'll write an example ledger file.
====
= /^Income:Capital/
Budget:Income:Capital -1
Budget:Total 1
1/1 Sell
Assets:EUR 3,728.76 kr (400 EUR)
Assets:XBT -1 XBT
Income:Capital
====
A register report on the above file will show that the automatic
transaction will run on the EUR posting of Income:Capital, but not on the
XBT posting.
====
$ ledger -f test.ledger reg
16-Jan-01 Sell Assets:EUR 400 EUR
400 EUR
Assets:XBT -1 XBT
400 EUR
-1 XBT
Income:Capital -400 EUR
-1 XBT
Income:Capital 1 XBT
0
Budget:Income:Capital 400 EUR
400 EUR
Budget:Total -400 EUR
0
====
I really think this is a bug, since ledger would generate 2 filled postings
for the null-posting, so the automatic transaction should also run on both.
For now I'm circumventing this bug by writing in the amount of the posting
by hand in the file.
Any comments welcome :)
//Paggas
--
---
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.