GithubHelp home page GithubHelp logo

sausaw / bookkeeper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swingtix/bookkeeper

0.0 2.0 0.0 192 KB

A double-entry bookkeeping system developed for use at SwingTix.ca.

License: GNU Affero General Public License v3.0

bookkeeper's Introduction

SwingTix Bookkeeper

A double-entry bookkeeping system originally developed for SwingTix.

Hello, World

You'll need a django project. If you don't have one handy, you can make an empty one following the first steps of the django tutorial. Afterwards, edit <yourproject>/settings.py to add "swingtix.bookkeeper" to INSTALLED_APPS and run:

$ python manage.py syncdb

Then you're ready to start exploring using the shell:

$ python manage.py shell

First, let's create a couple of accounts:

>>> from swingtix.bookkeeper.models import BookSet, Account

>>> book = BookSet(description="my book")
>>> book.save()

>>> revenue  = Account(bookset=book, name="revenue", positive_credit=True)
>>> revenue.save()
>>> bank     = Account(bookset=book, name="bank",    positive_credit=False)
>>> bank.save()
>>> expense  = Account(bookset=book, name="expense", positive_credit=False)
>>> expense.save()

Then you can use them:

>>> book = BookSet.objects.get(description="my book")
>>> revenue = book.get_account("revenue")
>>> bank    = book.get_account("bank")
>>> expense = book.get_account("expense")

#Someone pays you can advance.  Yay!
>>> bank.debit(120.00, revenue, "our first sale")
(<AccountEntry: 120 >, <AccountEntry: -120 >)

#but now you have to do some work.  The local coffee shop has free wifi..
>>> bank.credit(2.20, expense, "coffee")
(<AccountEntry: -2 >, <AccountEntry: 2 >)

>>> bank.balance()
Decimal('117.80')
>>> expense.balance()
Decimal('2.20')
>>> revenue.balance()
Decimal('120.00')

bookkeeper's People

Contributors

g-- avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.