This repository hosts practical research into leveraging logic programming to solve accounting problems. The core logic runs in SWI-Prolog, and is aided by a python webserver. Several services are available:
- investment calculator
- hirepurchase agreement
- depreciation
- livestock (standalone)
- division 7A loan calculator
We use it at http://www.nobleaccounting.com.au, along with a proprietary (but free) frontend in the form of a Microsoft Excel plugin, to automate accounting tasks.
The most complex endpoint is the investment calculator; it validates and processes financial data of a financial entity for a given period:
- bank statements
- raw general ledger input
- change in investment unit values
- (SMSF member accounting - fixme)
- (livestock accounting information - fixme)
It automates some of the usual accounting procedures, like tax calculations, and it generates balance sheets, trial balances, investment report and other types of reports.
Given a hire purchase arrangement, it can track the balance of a hire purchase account through time, the total payment and the total interest.
- determine tax residency by carrying out a dialog with the user
- determine small business entity status by carrying out a dialog with the user
- clone the repo,
git submodule update --init --recursive
cd docker_scripts
- see docker_scripts/README.md
https://github.com/koo5/accounts-assessor-public-wiki/blob/master/excel_usage/README.md
- Load http://localhost:88/ in your browser
- upload one of the request files found in tests/endpoint_tests/ (todo: needs updating)
- you should get back a json with links to generated report files
todo, this is all private at the moment:
most endpoints should have some resources in lodgeit_private/doc/. Introductions to individual concepts can be found in videos on dropbox.
videos: https://www.dropbox.com/sh/prgubjzoo9zpkhp/AACd6YmoWxf9IUi5CriihKlLa?dl=0 https://www.dropbox.com/sh/o5ck3qm79zwgpc5/AABD9jUcWiNpWMb2fxsmeVfia?dl=0
wiki: https://github.com/lodgeit-labs/accounts-assessor-wiki/
there are 4 main components:
various helper functions that prolog invokes over http/rpc
a remoulade worker that:
- wraps prolog and spawns prolog on request
- talks to the triplestore
lets users upload request files and triggers workers.
serves static files and proxies requests to frontend
`
- source/lib - prolog source code
- tests ** plunit - contains queries that test the functionality of the main Prolog program ** endpoint_tests - contains test requests for the web endpoint as well as expected reponses
- misc - contains the stuff that does not yet clearly fit into a category
- server_root - this directory is served by the prolog server ** tmp - each request gets its own directory here ** taxonomy - contains all xbrl taxonomy files. ** schemas - xsd schemas
A new version is planned, using a constrained logic programming language, aiming for these features:
Derives, validates, and corrects the financial information that it is given. The program uses redundancy to carry out its validations and corrections. By this it is meant that knowledge of parts of a company's financial data imposes certain constraints on the company's other financial data. If the program is given a company's ledger, then it knows what the balance sheet should look like. If the program is given a company's balance sheet, then it has a rough idea of what the ledger should look like.
- Given a hire purchase arrangement and ledger, it can guess what the erroneous transactions are
- Given a hire purchase arrangement and ledger, it can generate correction transactions to fix the erroneous transactions ...
- https://github.com/johannesgerer/buchhaltung
- gnu cash ...
Thanks goes to these wonderful people (emoji key):
stoopkid 🚇 |
Schwitter 🚇 |
salamt2 🚇 |
Murisi Tarusenga 🚇 |
koo5 🚇 |
This project follows the all-contributors specification. Contributions of any kind welcome!