account summary separately for each cost center

Timo Lindfors timo.lindfors at iki.fi
Mon Dec 31 13:56:04 EST 2007


Hi,

I recently tried to get account summaries separately for each cost
center (e.g. physical location or subdivision of a company). The thread

https://lists.gnucash.org/pipermail/gnucash-user/2007-October/022074.html

came to the conclusion that the "Action" field could be used to
specify cost center but later I was told that it is per split and not
per transaction so I thought I'd better (ab)use the "Notes" field
instead.

I first tried to modify account-summary.scm but then noticed that even
though there is gnc:query-add-description-match there is no
gnc:query-add-notes-match.

Finally I resorted into writing a small python program that reads a
gnucash file and prints a primitive account summary separetely for
each cost center:

$ wget http://iki.fi/lindi/darcs/gnucash/cost-center/{cost-center,example}
$ python cost-center example
Cost center Helsinki
==============

Savings Account -5.0
Other Income -10.0
Miscellaneous 15.0

Cost center New York
==============

Savings Account -4.0
Other Income -5.0
Miscellaneous 9.0

I don't know if this is useful to anyone but I thought I'd post to get
comments and so that somebody could find this with a search engine ;-)

best regards,
Timo Lindfors



More information about the gnucash-devel mailing list