Re: Trial balance from ledger

48 views
Skip to first unread message

Martin Blais

unread,
Aug 6, 2016, 8:57:13 PM8/6/16
to ledger-cli, hle...@googlegroups.com, Beancount
On Sat, Aug 6, 2016 at 8:20 PM, Simon Michael <si...@joyful.com> 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 , 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 ?

No.

 
Or are they literally just different notations ?

Yes.

However, there are two sources of errors:
- Rounding errors on transactions due to acceptable tolerance (cli accounting would be impossible without that).
- The treatment of currency conversions.
Beancount deals with both of these elegantly.

Vikas Rawal

unread,
Aug 6, 2016, 9:07:20 PM8/6/16
to ledge...@googlegroups.com, hle...@googlegroups.com, bean...@googlegroups.com
>
> 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 , 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".
>
>

This is it!

Thanks. For me, signed amounts bring sanity to accounting. So, thumbs up for that.

Vikas

Vikas Rawal

unread,
Aug 6, 2016, 9:19:22 PM8/6/16
to ledge...@googlegroups.com, hle...@googlegroups.com, bean...@googlegroups.com

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 , 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”

But what do I use in place of %(amount) when I use —dc?

Vikas

Vikas Rawal

unread,
Aug 7, 2016, 11:47:11 AM8/7/16
to ledge...@googlegroups.com, hle...@googlegroups.com, bean...@googlegroups.com
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)

Vikas

Reply all
Reply to author
Forward
0 new messages