Hi Martin et al,
I'm still trying to understand how to reliably book transactions without
explicitly specifying the cost basis on every leg (e.g. with FIFO booking)
Here is a test case with everything explicit, that passes bean-check. I buy
1 BTC for 1000 AUD from an account initialised with a positive AUD balance.
Then I transfer a sum to a cold wallet and back to the hot wallet,
incurring a fee on each transaction which I book to a BTC-denominated
expenses account.
option "operating_currency" "AUD"
2014-01-01 open Equity:Opening-Balances
2014-01-01 open Assets:AU:Cash AUD
2014-01-01 open Expenses:Financial:TransactionFees:BTC BTC
2014-01-01 open Assets:AU:Hotwallet BTC "FIFO"
2014-01-01 open Assets:AU:Coldwallet BTC "FIFO"
2014-01-01 * "Initial cash balance"
Assets:AU:Cash 1000.00 AUD
Equity:Opening-Balances
2014-01-02 * "Initial hotwallet balance"
Assets:AU:Hotwallet 1.00 BTC {1000 AUD}
Assets:AU:Cash -1000.00 AUD
2014-01-03 * "Deposit Cold storage"
Assets:AU:Hotwallet -0.050000000 BTC {1000 AUD}
Assets:AU:Coldwallet 0.049000000 BTC {1000 AUD}
Expenses:Financial:TransactionFees:BTC 0.001000000 BTC {1000 AUD}
2014-01-04 * "Withdraw Cold storage"
Assets:AU:Coldwallet -0.049000000 BTC {1000 AUD}
Assets:AU:Hotwallet 0.048000000 BTC {1000 AUD}
Expenses:Financial:TransactionFees:BTC 0.001000000 BTC {1000 AUD}
However, despite making my wallet accounts "FIFO", whenever I try to remove
the explicit {1000 AUD} cost basis in my reducing postings, I start getting
errors.
For example, if I use {} in the first transaction:
2014-01-03 * "Deposit Cold storage"
Assets:AU:Hotwallet -0.050000000 BTC {}
Assets:AU:Coldwallet 0.049000000 BTC {}
Expenses:Financial:TransactionFees:BTC 0.001000000 BTC {}
I would be hoping that as FIFO is specified for the Coldwallet account, the
lot is inferred.
However, bean-check now complains: Failed to categorize posting.
Furthermore, attempting to debug with bean-doctor doesn't quite work for
me. The transaction in question starts at line 17. But beandoctor context
<filename> 17 returns the context for the previous transaction at line 13.
If I try amending the second transaction to use {} (instead of the first
which I set back to {AUD 1000}), bean-check replies "Too many missing
numbers for currency group 'AUD". And bean-doctor ... 13 shows the expected
balances after the first transaction but beandoctor ... 17 doesn't show any
opening balances even though it directly follows the tx at 13.
Any idea what I may have done wrong here? I'm using beancount==2.0rc1 as
installed by the latest package on PyPI. I've read the Inventory and
Trading docs several times, but obviously I'm still learning so if I've
wasted your time I apologise. Still excited by beancount!
Dave
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/d559299b-9f6e-45f6-bec4-996d2b52b4ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.