Issue #411: Balance directive allows $0.01 discrepancy (blais/beancount)

33 views
Skip to first unread message

owenh000

unread,
Dec 7, 2019, 6:38:51 PM12/7/19
to bean...@googlegroups.com
New issue 411: Balance directive allows $0.01 discrepancy
https://bitbucket.org/blais/beancount/issues/411/balance-directive-allows-001-discrepancy

Owen Heisler:

A balance directive will pass even when the balance does not exactly match.

For example:

```
2019-01-01 open Assets:Cash USD
2019-01-01 open Income:Work USD

2019-01-01 * "got cash"
Assets:Cash 25.00 USD
Income:Work

2019-01-02 balance Assets:Cash 25.01 USD
```

This passes:

```
$ bean-report test.beancount balances
Assets:Cash 25.00 USD
Equity
Expenses
Income:Work -25.00 USD
Liabilities
```

However, if it is $0.02 off:

```
2019-01-01 open Assets:Cash USD
2019-01-01 open Income:Work USD

2019-01-01 * "got cash"
Assets:Cash 25.00 USD
Income:Work

2019-01-02 balance Assets:Cash 25.02 USD
```

Then it’s a problem:

```
$ bean-report test.beancount balances
/tmp/test.beancount:8: Balance failed for 'Assets:Cash': expected 25.02 USD != accumulated 25.00 USD (0.02 too little)

2019-01-02 balance Assets:Cash 25.02 USD


Assets:Cash 25.00 USD
Equity
Expenses
Income:Work -25.00 USD
Liabilities
```




Reply all
Reply to author
Forward
0 new messages