Discussion:
Why buying commodities debits them out of Equity
s***@gmail.com
2018-10-07 14:12:10 UTC
Permalink
It appears that buying commodities (crypto currencies in the following
example) debits them from Equity:Opening Balances.

Example: *test.ledger*

2018/10/01 Deposit
Assets:Checking $200.00
Equity:Opening Balances

2018/10/02 Purchase crypto
Assets:Crypto 0.429485 ETH @ $228.18
Expenses:Commissions
Assets:Checking $-100

*$ ledger -f test.ledger equity*

2018/10/02 Opening Balances
Assets:Checking $100.00
Assets:Crypto 0.429485 ETH
Equity:Opening Balances $-200.00
Expenses:Commissions $2.00
Equity:Opening Balances $98.00
Equity:Opening Balances -0.429485 ETH

*$ ledger -f test.ledger balance*

$100.00
0.429485 ETH Assets
$100.00 Checking
0.429485 ETH Crypto
$-200.00 Equity:Opening Balances
$2.00 Expenses:Commissions
--------------------
$-98.00
0.429485 ETH

Is there a way to make ledger know that this commodity was purchased with
cash from *Assets:Checking*?
--
---
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 ledger-cli+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Martin Michlmayr
2018-10-07 14:16:45 UTC
Permalink
Post by s***@gmail.com
It appears that buying commodities (crypto currencies in the following
example) debits them from Equity:Opening Balances.
2018/10/01 Deposit
Assets:Checking $200.00
*$ ledger -f test.ledger balance*
$100.00
0.429485 ETH Assets
$100.00 Checking
Is there a way to make ledger know that this commodity was purchased with
cash from *Assets:Checking*?
Your own example shows that this is exactly what is happening already.
You had $200 and now you have $100 in assets:checking.

You just get confused my the equity command. Don't use that. This is
only to create starting balances if you want to split your ledger
file.
https://www.ledger-cli.org/3.0/doc/ledger3.html#The-equity-command
--
Martin Michlmayr
https://www.cyrius.com/
--
---
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 ledger-cli+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
s***@gmail.com
2018-10-07 15:31:50 UTC
Permalink
Why does the balance command show a "hanging" balance?

*$ ledger -f test.ledger balance*

$100.00
0.429485 ETH Assets
$100.00 Checking
0.429485 ETH Crypto
$-200.00 Equity:Opening Balances
$2.00 Expenses:Commissions
--------------------
$-98.00 <---- shouldn't this be $0.00?
0.429485 ETH <---- and why is this here?
Post by Martin Michlmayr
Post by s***@gmail.com
It appears that buying commodities (crypto currencies in the following
example) debits them from Equity:Opening Balances.
2018/10/01 Deposit
Assets:Checking $200.00
*$ ledger -f test.ledger balance*
$100.00
0.429485 ETH Assets
$100.00 Checking
Is there a way to make ledger know that this commodity was purchased
with
Post by s***@gmail.com
cash from *Assets:Checking*?
Your own example shows that this is exactly what is happening already.
You had $200 and now you have $100 in assets:checking.
You just get confused my the equity command. Don't use that. This is
only to create starting balances if you want to split your ledger
file.
https://www.ledger-cli.org/3.0/doc/ledger3.html#The-equity-command
--
Martin Michlmayr
https://www.cyrius.com/
--
---
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 ledger-cli+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Martin Michlmayr
2018-10-07 15:39:29 UTC
Permalink
Post by s***@gmail.com
*$ ledger -f test.ledger balance*
$100.00
0.429485 ETH Assets
$100.00 Checking
0.429485 ETH Crypto
$-200.00 Equity:Opening Balances
$2.00 Expenses:Commissions
--------------------
$-98.00 <---- shouldn't this be $0.00?
0.429485 ETH <---- and why is this here?
$ and ETH are different commodities. The balance report you run has:

$100 Checking
-$200 Opening balance

which makes $-98. You also have 0.429485 ETH

As it turns out, the 0.429485 ETH you bought had a cost of $98.

And -98 and +98 is 0, which means it balances.

If you use the -B option, it will show it:

$198.00 Assets
$100.00 Checking
$98.00 Crypto
$-200.00 Equity:Opening Balances
$2.00 Expenses:Commissions
--------------------
0
--
Martin Michlmayr
https://www.cyrius.com/
--
---
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 ledger-cli+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
s***@gmail.com
2018-10-07 15:49:21 UTC
Permalink
Thanks Martin! The -B option is what I was looking for.

Cheers!
Post by Martin Michlmayr
Post by s***@gmail.com
*$ ledger -f test.ledger balance*
$100.00
0.429485 ETH Assets
$100.00 Checking
0.429485 ETH Crypto
$-200.00 Equity:Opening Balances
$2.00 Expenses:Commissions
--------------------
$-98.00 <---- shouldn't this be $0.00?
0.429485 ETH <---- and why is this here?
$100 Checking
-$200 Opening balance
which makes $-98. You also have 0.429485 ETH
As it turns out, the 0.429485 ETH you bought had a cost of $98.
And -98 and +98 is 0, which means it balances.
$198.00 Assets
$100.00 Checking
$98.00 Crypto
$-200.00 Equity:Opening Balances
$2.00 Expenses:Commissions
--------------------
0
--
Martin Michlmayr
https://www.cyrius.com/
--
---
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 ledger-cli+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...