Automatic reporting system for small clubs analyzing member fees and drink sales.
Find a file
2025-12-08 00:54:24 +00:00
.github/workflows chore(deps): update all non-major dependencies, except python 2025-12-03 02:46:16 +00:00
.idea Add money.flipdot.org to allowed hosts 2025-07-22 22:53:54 +02:00
.vscode chore(ide): add vscode configuration 2025-08-06 06:40:56 +02:00
bank Auto delete cron job logs 2024-03-12 21:45:03 +01:00
notebooks Fixes for PSD2 and new python-fints! 🎉🥳 2020-03-28 17:14:14 +01:00
report Fix most views (except for Getränkeverlauf) 2024-03-12 22:42:32 +01:00
schema fix(detect_method): minor fix 2020-04-19 15:53:31 +02:00
sql refactor: format shell scripts 2025-08-06 06:41:14 +02:00
webreport Add money.flipdot.org to allowed hosts 2025-07-22 22:53:54 +02:00
.dockerignore chore: feedback 2025-07-22 08:38:47 +02:00
.gitignore chore(ide): add vscode configuration 2025-08-06 06:40:56 +02:00
.python-version Trying to fix dependencies 2025-07-08 23:33:51 +02:00
__init__.py restructure project 2019-02-24 13:26:24 +01:00
cache.py restructure project 2019-02-24 13:26:24 +01:00
clear_analysis.py logging and django fixes 2020-03-28 20:29:32 +01:00
client.py Ported code from rfls branch, trying to log into onlinebanking with "state" pickle file 2025-07-09 00:31:13 +02:00
config.example.py change end-of-month to 23 and make configurable 2020-04-19 15:17:23 +02:00
db.py fix sqlalchemy imports 2020-04-19 15:09:02 +02:00
do_backup.sh refactor: format shell scripts 2025-08-06 06:41:14 +02:00
docker-compose.yaml Trying to fix dependencies 2025-07-08 23:33:51 +02:00
Dockerfile chore(deps): update ghcr.io/astral-sh/uv docker tag to v0.9.16 2025-12-06 16:41:19 +00:00
drinks.py logging and django fixes 2020-03-28 20:29:32 +01:00
fints_test.py Fixes for PSD2 and new python-fints! 🎉🥳 2020-03-28 17:14:14 +01:00
hbci_client.py Update pandas and fints in uv project 2025-07-22 22:05:03 +02:00
load_transactions.py Merge branch 'master' into run-fints-sync 2025-07-22 21:28:39 +02:00
manage.py chore: feedback 2025-07-22 08:38:47 +02:00
member_report.py chore: feedback 2025-07-22 08:38:47 +02:00
members.py chore: feedback 2025-07-22 08:38:47 +02:00
money.service make systemd service restartable 2019-05-26 10:57:22 +02:00
pyproject.toml chore(deps): update all non-major dependencies, except python (#75) 2025-11-10 05:15:25 +00:00
README.md chore(deps): remove requirements 2024-04-17 18:25:43 +02:00
renovate.json ci(renovate): separate python non-major group 2025-11-10 05:53:19 +01:00
setup.sh refactor: format shell scripts 2025-08-06 06:41:14 +02:00
util.py Ported code from rfls branch, trying to log into onlinebanking with "state" pickle file 2025-07-09 00:31:13 +02:00
uv.lock chore(deps): lock file maintenance 2025-12-08 00:54:24 +00:00
uwsgi.ini uwsgi: fixes for static files and threading 2020-03-28 20:27:33 +01:00
webserver refactor: format shell scripts 2025-08-06 06:41:14 +02:00

Money-Utils

Automatic reporting system for small clubs analyzing member fees and drink sales.

Monitors money transfers to an account and filters them according to various patterns to report information.

Features

  • Track member fee payments and automatic membership status
  • Allows drink account fillup via SEPA bank transfers
  • Track expenses and income for drink sales
  • Manage member information

Developer Setup

Note

:
If all you want is run the service, please head down to the Deployment section.

  • If you're on Debian, you will need some more packages:

    apt install python3-dev build-essential
    
  • Enable lingering services for your user:

    sudo loginctl enable-linger $USER
    
  • Copy config.example.py to config.py and customize contents according to your likings.

The following script will:

  • Make a virtualenv and install dependencies from pyproject.toml

  • Setup a systemd-user-service money.service

    ./setup.sh
    
  • Make a database:

    mkdir -p data
    ./manage.py migrate
    ./manage.py createsuperuser
    
  • Run Cron jobs to import TXs

    • this will:
      • import transactions from your bank
      • analyze member fees
    ./manage.py runcrons
    
  • Start server:

    ./manage.py runserver
    
    # or, enable and start the systemd service:
    systemctl --user enable --now money
    
  • go to http://localhost:5002/ and enjoy the stats!

Deployment in dev setup:

  • Edit uwsgi.ini

  • Run:

    ./manage.py collectstatic
    ./webserver
    

Deployment

Do these steps:

export SOURCE_COMMIT=$(git describe --always --no-abbrev)
docker-compose build

docker-compose up

## in another window:
docker-compose exec money ./manage.py migrate
docker-compose exec money ./manage.py cratesuperuser

Member Management

Once the server is running, go to http://localhost:8000/admin. Log in, and click on "Members". Add some members. The only fields you will have to fill out:

  • First Name
  • Last Name (if you know it)
  • Nickname (if you know it)
  • Email (if you know it)
  • Fee (if it isn't one of the standard fees from fee_util.py)

These properties will be used to find the member fee transactions. All the other fields will be filled by the analysis.

After adding some members, do ./manage.py runcrons again to analyze their fees.

License

GPLv3. Other licenses available upon request.



BELOW LEGACY

/recharges.json

Lists drinks-recharge events according to the pattern drinks <uid> <info>, where

  • uid is the LDAP user ID
  • info is some additional text, commonly "username random-string"

The random string at the end is used to differentiate recharges happening on the same day, since SEPA does not generate unique transaction IDs. Instead, it considers the 5-tuple (date, IBAN from, IBAN to, amount, transaction text) as unique key.

load_transactions.py

loads new transactions from the bank.

members.py

performs member fee analysis.

member_report.py

displays an oldschool ASCII report of paid member fees in the last 12 months.

clear_analysis.py

clears all analyzed data from database (except for Fee_Entries). Can be used to rescue the database from botched data if you're messing with the members.py script.

hbci_client.py

Wrapper for the python-fints library.


Old stuff:

drinks.py

old report: loads transactions and drinks-recharges using an ad-hoc pickle cache defined in cache.py.

Legacy; has been integrated into django app on /recharges.py

webserver: small flask webserver to do nothing but serve the output of drinks.py as JSON.

Can be started as systemd service, using money.service.