emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eike <eike@eknet.org>
To: "Tory S. Anderson" <torys.anderson@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: simple expense tracking with org
Date: Sat, 20 Sep 2014 15:35:41 +0200	[thread overview]
Message-ID: <8761giv1yd.fsf@ithaka.home> (raw)
In-Reply-To: <87y4tejurs.fsf@gmail.com>


Sure. An "expense item" is a headline with a property drawer that has a
property where the key is some currency code (other headlines are
ignored). Then tags can be applied to this headline. A category is
either specified via CATEGORY property or the parent headline is used
(if present).

The org files may look like this

* some headline that is a category by default
** expense item 1                 :atag:
   :PROPERTIES:
   :CHF: 25.00
   :date: [2014-09-20]
   :END:
** expense item 2                 :anothertag:
   :PROPERTIES:
   :CHF: 21.00
   :date: [2014-09-20]
   :CATEGORY:
   :END:

The "expense view" gives a summary of these items and the items itself
as a org table (there also is a screenshot
https://github.com/eikek/org-expenses/blob/master/screenshot.png):

#+TITLE: Expenses [2014-08-01 Fr] - [2014-08-31 So]
#+STARTUP: showeverything

Search: ~(:date "2014-08")~
Showing *7* items

* Overview
** Summary
| Curr. |    sum |    max |   min | count |   avg |
|-------+--------+--------+-------+-------+-------|
| CHF   | 532.98 | 349.99 | 10.00 |     6 | 88.83 |
| EUR   |  15.99 |  15.99 | 15.99 |     1 | 15.99 |


** Categories
|               |    sum |    max |   min | count |    avg |
|---------------+--------+--------+-------+-------+--------|
| Bücher CHF    |  49.99 |  39.99 | 10.00 |     2 |  25.00 |
| Bücher EUR    |  15.99 |  15.99 | 15.99 |     1 |  15.99 |
| Sonstiges CHF | 426.49 | 349.99 | 20.00 |     3 | 142.16 |
| Work CHF      |  56.50 |  56.50 | 56.50 |     1 |  56.50 |


** Monthly
|             |    sum |    max |   min | count |   avg |
|-------------+--------+--------+-------+-------+-------|
| 2014/08 CHF | 532.98 | 349.99 | 10.00 |     6 | 88.83 |
| 2014/08 EUR |  15.99 |  15.99 | 15.99 |     1 | 15.99 |


* Items
| :item     | :category | :date           |   :CHF |  :EUR |
|-----------+-----------+-----------------+--------+-------|
| Buch1     | Bücher    | [2014-08-31 So] |        | 15.99 |
| Cellphone | Sonstiges | [2014-08-30 Sa] | 349.99 |       |
| Pizza     | Sonstiges | [2014-08-29 Fr] |  20.00 |       |
| Buch2     | Bücher    | [2014-08-26 Di] |  10.00 |       |
| Cablecom  | Sonstiges | [2014-08-25 Mo] |  56.50 |       |
| Cablecom  | Work      | [2014-08-25 Mo] |  56.50 |       |
| Buch2     | Bücher    | [2014-08-01 Fr] |  39.99 |       |


It's just counting and summing the items, nothing more. It's not doing
accounting or anythingmore complicated, if you had this in mind.

Regard,
Eike


Tory S. Anderson writes:

> Could you give a few snippets of examples -- what the org files with tags look like, what the result looks like? I'm interested because I also use Org to do my budgeting and finances.
>
> Eike <eike@eknet.org> writes:
>
>> Hello there,
>>
>> I thought to share a little elisp thingy that I wrote to track my
>> expenses with org. I use the org's capture mechanism to add expense
>> items to some files and the following code only searches through all
>> these files and creates summaries of all found expenses. It is possible
>> to search by date, tags etc.
>>
>> You can have a look here: https://github.com/eikek/org-expenses
>>
>>
>> Regards,
>> Eike
>>
>> --
>> gpg: AD7AC35E
>> finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E

--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E

  reply	other threads:[~2014-09-20 13:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-20 12:42 simple expense tracking with org Eike
2014-09-20 13:17 ` Tory S. Anderson
2014-09-20 13:35   ` Eike [this message]
2014-09-20 13:39   ` Thorsten Jolitz
2014-09-20 14:27     ` Charles Millar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761giv1yd.fsf@ithaka.home \
    --to=eike@eknet.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=torys.anderson@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).