On Thu, May 29, 2014 at 5:15 PM, Martin Michlmayr <[email protected]> wrote:
> * Martin Michlmayr <[email protected]> [2014-05-29 16:41]: > > * Craig Earls <[email protected]> [2014-05-29 13:27]: > > > I saw Johns response about--empty but this idea from Martin strikes me > as > > > wrong. If you have a hierarchical account tree I think it oy makes > sense to > > > have postings on the "leaves" of the tree. In Martina example it would > > > better to say: > > > > I agree with you in terms of best practice. > > Or maybe I don't. ;-) I think I still agree with you in principle, > but in practice I think it's fairly common to book things to accounts > directly that have further subaccounts. > This is also my case, in my 8 years worth of data I have organized some accounts to be parent accounts that contain postings, though they technically could all be converted to be leaf-only. A good example is Assets:Receivable. While I create > Assets:Receivable:foo for entities that often owe me something (e.g. > my employer or the tax office), I may have minor receivables from > entities from time to time... should I really create a > Assets:Receivable:foo for them (which is a pain if you want to use > --strict --pedantic) or is it simpler to just assign those to > Assets:Receivable (without a subaccount)? > > I haven't quite figured out the answer to this myself. > > In fact, I wonder whether I should use subaccounts in this example at > all. Maybe I should just book everything against Assets:Receivable > and then use an ; Entity: tag to track the entity and use > --pivot Entity. > > I'm not sure and I'd like to hear best practices from other people. > IMO the best solution would be to adopt a principle for how these things get rendered. Here's my favorite: If you render the subaccounts, the parent account should only render its own postings. If you don't render the subaccounts, the parent account should contain the balance of its subaccounts. Why would you need anything else? The sum of displayed balances should always equal the total. The idea I have for the client-side JavaScript version of my web UI is to be able to fold a subtree, and the amount when folded would automatically change to reflect this (the aggregated amount would be precomputed, no calculations done in the browser). -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
