I found a strange bug that might be related:
= expr commodity == "GBP" and date >= [2012] and date < [2013]
; VALUE:: market($2, date, exchange)
2012/1/18 Payment Received
Liabilities:Accounts Payable 10.00 CAD @ $1
Assets:Paypal Account
2012/1/19 Currency Conversion
Assets:Paypal Account 10.00 GBP @ $2
Assets:Paypal Account
Works fine:
$ ledger -f new4.dat bal -X CAD
-10.00 CAD Assets:Paypal Account
10.00 CAD Liabilities:Accounts Payable
--------------------
0
But if you just swap the entries in the file (keeping everything identical):
= expr commodity == "GBP" and date >= [2012] and date < [2013]
; VALUE:: market($2, date, exchange)
2012/1/19 Currency Conversion
Assets:Paypal Account 10.00 GBP @ $2
Assets:Paypal Account
2012/1/18 Payment Received
Liabilities:Accounts Payable 10.00 CAD @ $1
Assets:Paypal Account
The balance doesn't show properly:
$ ledger -f new4.dat bal -X CAD
$20
-30.00 CAD Assets:Paypal Account
10.00 CAD Liabilities:Accounts Payable
--------------------
$20
-20.00 CAD
--
---
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/groups/opt_out.