Categorised transactions and summary reports

67 views
Skip to first unread message

Daniel Scott

unread,
Mar 22, 2018, 9:09:46 AM3/22/18
to Ledger
Hi,

Hopefully a simple question. I'm looking for something to help with my taxes.

I need to add multiple categories to each transaction, and then generate a report for an arbitrary period which shows the total in each category. For example:

1/1/2017 £10 rent,property,propertyA
1/1/2017 £10 rent,property,propertyB
1/1/2017 -£10 rent,home,holiday
1/2/2017 -£10 mortgage,property,propertyA
1/2/2017 -£10 mortgage,property,propertyB

Then the report(s) would let me answer, for example:

Total rent for propertyA in 2017
Total rent for propertyB in the first half of 2017
Total property rent in 2017 and 2018
Overall profit/loss for propertyA
Overall profit/loss for all properties

Can ledger do this? It seems more like it's useful for reconciling accounts which maintain a running total, but I'm looking for something which essentially starts at 0 for the time period that I'm interested in.

Thanks,

Dan

Dániel Fancsali

unread,
Mar 22, 2018, 10:31:32 AM3/22/18
to ledge...@googlegroups.com
Hello Dan,

Well, there are several ways you can do this, actually. Even looking at your example, it kind of suggests a way of doing this. Categories, or "accounts" in beancounter-speak can be hierarchical, so you could do:

Expenses:Rent:Property A
Expenses:Rent:Property B
Expenses:Mortgage:Property A
Expenses:Mortgage:Property B

However, to do it properly, you probably need to differentiate "financial categories" and "labels". (Which are called accounts and tags in ledger-speak) 

So, you'd do something like:
2017-01-01 Mortgage Payment for Property A
; Property: A
Expenses:Mortgatge £1000
Assets:Current Account

2017-02-02 Rent Income for Property B
; Property: B
Assets:Current Account £1000
Income:Rent

...

And then you can use the --pivot TAG feature to generate a report pivoted around the tags, but still having proper, meaningful categories in accounting terms:

ledger bal -f my.dat --pivot Property --period 2017

Property
    £1000 PropertyA:Income:Rent
    £1000 PropertyB:Income:Rent
    £1000 PropertyA:Expenses:Mortgage
    £1000 PropertyB:Expenses:Mortgage

--

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

Daniel Scott

unread,
Mar 22, 2018, 10:54:19 AM3/22/18
to ledge...@googlegroups.com
Great, thanks. I think it's just a question of me getting a hang of the terminology.

To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to a topic in the Google Groups "Ledger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ledger-cli/m-lTlT2-nDI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ledger-cli+unsubscribe@googlegroups.com.

Dániel Fancsali

unread,
Mar 22, 2018, 11:06:25 AM3/22/18
to ledge...@googlegroups.com
Well,

To be honest, it's a rather long read, but I really do recommend to read the docs, it's really an eye-opener: https://www.ledger-cli.org/3.0/doc/ledger3.html

 At least, it was for me, it was, as I didn't really know where to start with accounting, and I couldn't really even ask a decent question. ;)

Regards,
Dan



To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to a topic in the Google Groups "Ledger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ledger-cli/m-lTlT2-nDI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ledger-cli+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

---
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+...@googlegroups.com.

o1bigtenor

unread,
Mar 22, 2018, 12:38:04 PM3/22/18
to ledge...@googlegroups.com

On Thu, Mar 22, 2018 at 10:06 AM, Dániel Fancsali <fanc...@gmail.com> wrote:
Well,

To be honest, it's a rather long read, but I really do recommend to read the docs, it's really an eye-opener: https://www.ledger-cli.org/3.0/doc/ledger3.html

 At least, it was for me, it was, as I didn't really know where to start with accounting, and I couldn't really even ask a decent question. ;)



IMO that's the biggest problem faced by most people. The fundamental issue is that we think that what we are doing is 'accounting' rather it is 'record keeping'.
Many years ago I remember looking at a fellow student's correspondence course in record keeping and further I looked into some of the standard texts, that helped some things a lot.

Secondly I have a solution for the OP.
I live where GIFI (general index of financial information) codes are required in the formal filing of taxes.
For me the 4 digit codes just didn't have enough granularity so I modified the system to work for me.
Instead of 4 digits I use a system that has 10 digits looking like this xxxx.xx.xx  .
The first 4 digits are either directly the gifi codes or one of the not used numbers that gives me some more hooks for hanging my information.
I'll give an example:
1002 is for bank accounts (cash accounts IIRC)
1002.xx where xx details the financial institution in question (I use more than 3 - - - grin!)
1002.10.xx where the xx details the type of account (checking, saving, borrowing, credit card(s) and any other option you might want)
1002.10.10.xx this last duple is where I specify the actual account (easy to have multiple savings accounts and credit cards at least)

Then when I want to do a report (at least I think I can get totals) I can call for the specific account, that type of account at that instituion, or the institution or the whole class.

Very flexible although I have a 38 page cheat sheet listing all the codes and their 'text' meanings and the numbers.

In practice I am finding this very quick and yet very precise - - - works well for me!

Dee
Reply all
Reply to author
Forward
0 new messages