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

On Friday, August 28, 2020 at 10:43:07 PM UTC+2 [email protected] wrote:

> 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:
>
> https://github.com/beancount/beancount/blob/master/beancount/plugins/leafonly.py
>
>
>
>
>
> On Sat, Aug 15, 2020 at 4:58 PM [email protected] <[email protected]> 
> wrote:
>
>> 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!
>>
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beancount/837a46eb-058f-494f-bd7b-2fced166d853n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/beancount/837a46eb-058f-494f-bd7b-2fced166d853n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/17c016b6-976d-46d2-bf61-3f01d4560e38n%40googlegroups.com.

Reply via email to