New issue 362: pad fails, takes amount from unrelated account into account
https://bitbucket.org/blais/beancount/issues/362/pad-fails-takes-amount-from-unrelated
Martin Michlmayr:
I have account `Assets:Bank` and `Assets:Bank-Two`: a `pad` statement for
`Assets:Bank` also takes the amount from `Assets:Bank-Two`, leading to the
wrong balance.
```
1970-01-01 open Assets:Bank
1970-01-01 open Assets:Bank-Two
1970-01-01 open Equity:Opening-Balance
1970-01-01 open Equity:Adjustments
1970-01-01 open Expenses:Food
2019-01-01 * "Opening balance"
Assets:Bank 20.00 GBP
Equity:Opening-Balance -20.00 GBP
2019-01-03 * "Tesco" "Buy food"
Expenses:Food 30.00 GBP
Assets:Bank -30.00 GBP
2019-01-04 balance Assets:Bank -10.00 GBP
2019-01-03 * "Tesco" "Buy food"
Expenses:Food 6.00 GBP
Assets:Bank-Two -6.00 GBP
; Get rid of overdraft somehow and get a £50 balance
2019-01-04 pad Assets:Bank Equity:Adjustments
2019-01-05 balance Assets:Bank 50.00 GBP
```
```
bean-query ~/t.beancount "Select * where account ~ 'Bank$'"
/home/tbm/t.beancount:25: Balance failed for 'Assets:Bank': expected 50.00
GBP != accumulated 56.00 GBP (6.00 too much)
2019-01-05 balance Assets:Bank 50.00 GBP
date f payee narration
position
---------- - -----
-------------------------------------------------------------------- ----------
2019-01-01 * Opening balance
20.00 GBP
2019-01-03 * Tesco Buy food
-30.00 GBP
2019-01-04 P (Padding inserted for Balance of 50.00 GBP for difference
66.00 GBP) 66.00 GBP
```
To go from -10 to +50, we should pad by 60. The 6 comes from
`Assets:Bank-Two`, which is completely unrelated.
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/20190119170144.13537.75587%40app-137.ash1.bb-inf.net.
For more options, visit https://groups.google.com/d/optout.