Code Monkey home page Code Monkey logo

django-simple-ledger's Introduction

django-simple-ledger

Application that allow to keep track of financial transactions between different object of the system. Basically if you have model class the instance of that model can pay money to the instance of the different model.

Transactions are based on 4 types:

  • Deposit transation - Sets a deposit from one object to another
  • Withdrawal transation - One object takes money back from deposit that is was given to other object
  • Credit transaction - States that one objects owes some amount of money to another object
  • Debit transaction - Make the actual payment from one object to another based on credit transation. Payment can be made from the previous deposit.

Adding transaction

import ledger.common as ledger
from ledger import trasaction

transaction = transaction.DepositTransaction()
trasaction.agent_from = client_object
trasaction.agent_to = service_provider_object # or merchant
transaction.amount = 1000

ledger.ledger.addTransaction(transaction, transaction_id="payment_type") # transaction_id is optional

django-simple-ledger's People

Contributors

azamattokhtaev avatar azamatmendekov avatar nikitakoval avatar

Watchers

James Cloos 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.