When I started using ledger a few years ago, I defaulted to using the
dollar symbol ($) in my journal files. This, of course, works just fine.
If I want a balance sheet report, I run the following command:
ledger -f 1.ldg --price-db price_db.txt -V --strict –explicit ^Ass ^Lia
--depth 2
This produces the following output:
$xxx.xx Assets
$xxx.xx yyyyy
$xxx.xx yyyyy
$xxx.xx yyyyy
$xxx.xx yyyyy
$xxx.xx yyyyy
$xxx.xx yyyyy
$xxx.xx yyyyy
$xxx.xx yyyyy
$xxx.xx yyyyy
$xxx.xx yyyyy
$xxx.xx yyyyy
$-xxx.xx Liabilities
$-xxx.xx yyyyy
$-xxx.xx yyyyy
$-xxx.xx yyyyy
--------------------
$xxx,xxx.xx
I decided to switch to using USD instead of the dollar symbol. To do this I
removed all of the dollar symbols from my journal files and price database
and added USD. Following is the format I used:
xxx.xx USD
Now when I run the exact same balance sheet report, I see commodities that
I didn’t see before I made my changes.
-5.37578 KO
xxx.xx USD
-2,139.718 VTHRX Assets
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD Crypto
xxx.xx USD yyyyy
xxx.xx USD yyyyy
-5.37578 KO
xxx.xx USD
-2,139.718 VTHRX yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
-xxx.xx USD Liabilities
-xxx.xx USD yyyyy
-xxx.xx USD yyyyy
-xxx.xx USD yyyyy
--------------------
-5.37578 KO
xxx,xxx.xx USD
-2,139.718 VTHRX
What’s interesting here is that the non-USD commodities appear to be
commodities that I’ve previously sold. In other words, I no longer hold
VTHRX, and while I do hold some KO, it’s a fraction of a share (see below).
If I run the same command WITHOUT the -V option, I get a report that
accurately reflects my current holdings:
ledger -f 1.ldg --price-db price_db.txt --strict –explicit ^Ass ^Lia
--depth 2
x.xxxxxxxx ABC
0.04860 KO
xxx.xx USD Assets
xxx.xx USD yyyyy
xxx.xx USD yyyyy
x.xxxxxxxx ABC yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
0.04860 KO
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
-xxx.xx USD Liabilities
-xxx.xx USD yyyyy
-xxx.xx USD yyyyy
-xxx.xx USD yyyyy
--------------------
x.xxxxxxxx ABC
0.04860 KO
xxx,xxx.xx USD
Running the original command with -X USD produces the output I expected to
get in the first place. In other words, the same output I received before
changing $ to USD, but with the new commodity designator.
ledger -f 1.ldg --price-db price_db.txt -V --strict –explicit ^Ass ^Lia
--depth 2 -X USD
xxx,xxx.xx USD Assets
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
xxx.xx USD yyyyy
-xxx.xx USD Liabilities
-xxx.xx USD yyyyy
-xxx.xx USD yyyyy
-xxx.xx USD yyyyy
--------------------
xxx,xxx.xx USD
Any ideas on what’s happening here?
Thanks
JL
--
---
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/e29802c4-60ca-40d6-bbd0-5fd6eec8fb41n%40googlegroups.com.