Issue #366: { # NNN XXX } syntax not working in some cases: Too many missing numbers for currency group (blais/beancount)

38 views
Skip to first unread message

Martin Michlmayr

unread,
Jan 24, 2019, 10:23:00 AM1/24/19
to bean...@googlegroups.com
New issue 366: { # NNN XXX } syntax not working in some cases: Too many missing numbers for currency group
https://bitbucket.org/blais/beancount/issues/366/nnn-xxx-syntax-not-working-in-some-cases

Martin Michlmayr:

[Martin Blais suggests that `{ # 100 USD}` should work)](https://www.mail-archive.com/bean...@googlegroups.com/msg01881.html) but it doesn't in some circumstances.

`{ # 100 USD}` (without a leading `0` as the per-share price) works if you specify the balancing figure for the other posting. If you have a null-posting, beancount will issue an error:

```
d::17: Too many missing numbers for currency group 'EUR'
```

Test case:

```
2000-01-01 open Assets:Investments
2000-01-01 open Assets:Cash

; When you specify the balancing figure for "Assets:Cash" it works
2019-01-24 * "Bought AAA"
Assets:Investments 10 AAA { # 100.00 EUR }
Assets:Cash -100.00 EUR

; If you add 0 as the per-share value it works
2019-01-24 * "Bought AAA"
Assets:Investments 10 AAA { 0 # 100 EUR }
Assets:Cash

; This fails
2019-01-24 * "Bought AAA"
Assets:Investments 10 AAA { # 100 EUR }
Assets:Cash
```


Reply all
Reply to author
Forward
0 new messages