* Remco Rijnders <[email protected]> [2021-01-23 05:42]:
> Do you get the expected result with a booking more like this?:
>
> 2021/01/20 stocks
> Assets:Bank:Checking €3000.00
> Assets:Brokerage -30 "XXX" @ €100.00
Note that when selling, you should also specify the cost base (and
probably the date) of what you're selling.
In the example:
2020/08/08 Buy stocks
Assets:Brokerage 30 "XXX" @ €80.00
Assets:Bank:Checking -€2400.00
2021/01/20 Sell stocks
Assets:Bank:Checking €3000.00
Assets:Brokerage -30 "XXX" {€80.00} [2020-08-08] @ €100.00
Income:Capital gains -€600
You can do:
ledger bal Assets:Brokerage --lots
If you see something in red, you know there's a problem.
With the original example:
$ ledger -f d bal broker --empty
0 Assets:Brokerage
$ ledger -f d bal broker --lots
30 XXX {€80.00} [2020-08-08]
-30 XXX {€100.00} [2021-01-20] Assets:Brokerage
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ledger-cli/20210124054222.GP5139%40jirafa.cyrius.com.