commas in reports

28 views
Skip to first unread message

David

unread,
Nov 9, 2012, 12:26:41 PM11/9/12
to ledge...@googlegroups.com
Dear All,

Is it possible to make ledger add commas when it reports information? It would be easier on the eye if that was possible.

If it is possible, could you please advise what kind of syntax/code needs to be added in the ~./ledgerrc

Thanks
David

Craig Earls

unread,
Nov 9, 2012, 1:11:04 PM11/9/12
to ledge...@googlegroups.com
I shouldn't be hard I can help you brew up a format statement if you can give me an example of what you want
--
Craig, Corona De Tucson, AZ
enderw88.wordpress.com

David

unread,
Nov 9, 2012, 11:05:30 PM11/9/12
to ledge...@googlegroups.com
Dear Craig,

Thanks for your feedback.

For example when I run the balance command:-

           10000    CAR (1991 E30)
             8000      PURCHASE
             2000      MAINTENANCE
--------------------
          12000

I would like to report it with commas(and decimals). so it should be like follows:-


           10,000.00    CAR (1991 E30)
             8,000.00      PURCHASE
             2,000.00      MAINTENANCE
--------------------
          12,000.00

Hope its clear what I am looking for.

Thanks
David

John Wiegley

unread,
Nov 10, 2012, 12:36:50 AM11/10/12
to ledge...@googlegroups.com
>>>>> David <opsysn...@gmail.com> writes:

> I would like to report it with commas(and decimals). so it should be like
> follows:-

Plain integers are never reported with commas and periods. You will need to
use a commodity, such as $ or whatever is appropriate for your purchases.

John

Craig Earls

unread,
Nov 10, 2012, 9:15:16 AM11/10/12
to ledge...@googlegroups.com
When I first started using ledger I assumed that no commodity was fine since I only dealt in USD.  It turns out to have other shortcomings that I can't quite remember.  You should always assign a commodity to every number.  

John Wiegley

unread,
Nov 10, 2012, 1:24:12 PM11/10/12
to ledge...@googlegroups.com
>>>>> Craig Earls <ende...@gmail.com> writes:

> When I first started using ledger I assumed that no commodity was fine since
> I only dealt in USD.  It turns out to have other shortcomings that I can't
> quite remember.  You should always assign a commodity to every number.  

Plain integers also do not truncate precision.

John
Reply all
Reply to author
Forward
0 new messages