Re: Trial balance from ledger

2016-08-07 Thread Vikas Rawal

> On 07-Aug-2016, at 6:49 am, Vikas Rawal <vikasra...@gmail.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 
>>> <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 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trial balance from ledger

2016-08-06 Thread Vikas Rawal
>> 
>> 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

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trial balance from ledger

2016-08-06 Thread Vikas Rawal
> 
> 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

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trial balance from ledger

2016-08-06 Thread Martin Blais
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.

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trial balance from ledger

2016-08-06 Thread Simon Michael

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".



--

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Trial balance from ledger

2016-08-05 Thread Vikas Rawal
My auditor, who does not use ledger, wants me to give him trial balances. How 
can I create trial balance from ledger?

Vikas


-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.