Parent and Child account balances

98 views
Skip to first unread message

nugget....@gmail.com

unread,
Aug 15, 2020, 4:58:42 PM8/15/20
to Beancount
Hi all
Say, I had 3 accounts with the following structure & balances:

Assets:Parent           CHF 1000
Assets:Parent:Child1    CHF 100
Assets:Parent:Child2    CHF 200

Then I could want the total T = CHF 1000, or the Parent-Only PO = CHF 800. There is the possibility that the remaining CHF 800 are distributed over other children, such that PO = CHF 0.

Is there a way to:
  1. specifically query either value T or PO?
  2. specifically pad & balance either value?
  3. display either value in fava; in the balance sheet and the account's journal?

This general question finds it application where I have a parent bank account of which the total T must match the balance from the bank statement. However, that total is subdivided into provisions for future expenses, a liquidity cushion, and "freely available" money. Each of those are reflected as child accounts in my beancount ledger.

Thanks for your rely!

Martin Blais

unread,
Aug 28, 2020, 4:43:07 PM8/28/20
to Beancount
I read this twice, your numbers still don't make sense to m.e
As a general rule, while it's supported, I would recommend not posting any amounts to non-leaf accounts, because it raises questions on aggregation (do you want to aggregate including the subaccounts or not).
There's even a plugin that helps you enforce that:





--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/837a46eb-058f-494f-bd7b-2fced166d853n%40googlegroups.com.

nugget

unread,
Aug 29, 2020, 8:15:02 AM8/29/20
to Beancount
Hi Martin
You are correct, indeed subtracting 200 and 100 from 1000 should yield 700, not 800. But let's not focus on this.

Your hint that posting in non-leaf account is discouraged made me solve my actual question in the intended way: I moved all transactions from non-leaf accounts to leaf-accounts. But now a new question comes up, with regard to balancing accounts:
How can i best balance a non-leaf account?  

I do have a Bank checkings account where all my cash is stored, and the account is reflected in my ledger. But I sub-divide that cash is into sub-accounts. As a minimal example, it looks like

  Assets:Checkings                            ; represents my Bank checkings account
  Assets:Checkings:MyAvailableLiquidity       ; represents my available cash
  Assets:Checkings:MyInavailableLiquidity     ; represents my Liquidity cushion

Now this works well with the non-leaf plugin. Until i use a balance statement to make sure that the parent account holds exactly the amount that my bank statement states. If i do so, I get the error "Non-leaf account 'Assets:Checkings' has postings on it"

I hope the use-case is legit :D

Thanks!
Best,
nugget

Martin Blais

unread,
Aug 29, 2020, 8:41:38 AM8/29/20
to Beancount
See mailing list archives for previous discussions on budgeting.
Fava has dedicated features for this too IIRC

Reply all
Reply to author
Forward
0 new messages