> On 07-Aug-2016, at 6:49 am, Vikas Rawal <[email protected]> wrote: > >>> >>> On 8/5/16 10:31 PM, Vikas Rawal wrote: >>>> My auditor, who does not use ledger, wants me to give him trial balances. >>>> How can I create trial balance from ledger? >>> >>> Going by https://en.wikipedia.org/wiki/Trial_balance >>> <https://en.wikipedia.org/wiki/Trial_balance> , I think this is a report >>> showing that all credits and debits to all accounts (assets, liabilities, >>> revenues, expenses.. and equity ? guess so) add up to 0. >>> >>> "ledger balance" should show a 0 grand total. Is that a trial balance >>> report ? I always feel it's not quite the same since we don't separate >>> credits and debits as strictly. >>> >>> I'd like to figure it out once and for all. Do we lose information by using >>> signed posting amounts, compared to traditional debit and credit practice ? >>> Or are they literally just different notations ? >>> >>> And, there's this: "ledger balance --dc". >>> >>> >> > > > How do I format this output. I would like something like (to turn this into > an orgmode table): > > --format "|%(account) |%(amount) |%(amount) > |%(quantity(total_expr(amount)))|\n” >
This gave me what I wanted: --format \|%\(\!options.flat\ \?\ depth_spacer\ :\ \"\"\)\%\(partial_account\(options.flat\)\)\|%\(get_at\(display_total,\ 0\)\ \?\ scrub\(abs\(get_at\(display_total,\ 0\)\)\)\ :\ 0.0\)\|%\(get_at\(display_total,\ 1\)\ \?\ scrub\(abs\(get_at\(display_total,\ 1\)\)\)\ :\ 0.0\)\|%\(scrub\(get_at\(display_total,\ 0\)\ \?\ \(get_at\(display_total,\ 1\)\ \?\ get_at\(display_total,\ 0\)\ \+\ get_at\(display_total,\ 1\)\ :\ get_at\(display_total,\ 0\)\)\ :\ get_at\(display_total,\ 1\)\)\)\|\\n An adaptation from ledger2html code (https://github.com/lifepillar/ledger2html <https://github.com/lifepillar/ledger2html>) Vikas -- 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/796F463D-54A3-4EEB-851A-9CE75C9E4EC1%40gmail.com. For more options, visit https://groups.google.com/d/optout.
