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

```



‌




-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/20191207233849.21623.58491%40app-161.ash1.bb-inf.net.

Reply via email to