ledger-cli raise error on inline math used with Lot note

17 views
Skip to first unread message

Katsuaki Ikegami

unread,
Jan 17, 2023, 10:33:05 AM1/17/23
to Ledger
Hi all,

I found this works

$ cat test.ledger
2023/1/1 test
    Assets                 12 AAPL (lot-note) @ 100 USD
    Expenses
    Income                  20 AAPL

$ ledger -f test.ledger print
2023/01/01 test
    Assets                              12 APPL {100 USD} [2023/01/01] (lot-note) @ 100 USD
    Expenses
    Income                                   20 AAPL

while this doesn't work

$ cat test.ledger
2023/1/1 test
    Assets                 (20 * 0.6 APPL) (lot-note) @ 100 USD
    Expenses
    Income                  20 AAPL

$ ledger -f test.ledger print
While parsing file "/home/kikeg/projects/ikegami-journal/test.ledger", line 2:
While parsing posting:
  Assets                 (20 * 0.6 APPL) (lot-note) @ 100 USD
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Unexpected char '(' (Note: inline math requires parentheses)

Is there any workaround for that?
Reply all
Reply to author
Forward
0 new messages