Specifications General Ledger: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
Line 15: Line 15:
=== double entry bookkeeping ===
=== double entry bookkeeping ===
* see also http://en.wikipedia.org/wiki/Double-entry_bookkeeping_system
* see also http://en.wikipedia.org/wiki/Double-entry_bookkeeping_system
* each transaction has an opposite transaction
** this was more complicated in the old Petra 2.x, with summarised transactions to save number of transactions in the database
* only one reference/narrative for a pair of transactions
* hmm, this is not completely true; there can also be a group of 5 transactions, balancing to 0, with different amounts, different narrative etc
** could we use a journal for that in the database? how to display to the user? they want to see all transactions in one list, grouped by journal?
* improved reports will show the opposite transaction(s), on Account Detail report etc.


==== Transactions in GnuCash ====
==== Transactions in GnuCash ====
* see [http://www.gnucash.org/docs/v1.8/C/gnucash-guide/basics_entry1.html]
** "For every transaction, total debits must equal total credits."
* see [http://svn.gnucash.org/docs/help/trans-multi-enter.html GnuCash Manual: Multiple Split Transactions]; also see a discussion here: [http://www.mail-archive.com/gnucash-devel@gnucash.org/msg22004.html];  
* see [http://svn.gnucash.org/docs/help/trans-multi-enter.html GnuCash Manual: Multiple Split Transactions]; also see a discussion here: [http://www.mail-archive.com/gnucash-devel@gnucash.org/msg22004.html];  
** there are simple transactions (one split), which just post to 2 accounts, with same (opposite) amount, same narrative etc
** there are simple transactions (one split), which just post to 2 accounts, with same (opposite) amount, same narrative etc
Line 34: Line 29:
The other View is: Transaction Journal, this shows all movements of money involved:
The other View is: Transaction Journal, this shows all movements of money involved:
[[image:GnuCashTransactionViewTransactionJournal.png]]
[[image:GnuCashTransactionViewTransactionJournal.png]]
==== Transactions in Petra 2.x ====
* the definition of transaction in Petra 2.x is different from anyone else's definition: In Petra 2.x, a transaction only involves one account, therefore you need at least 2 transactions to get to "total debits equal total credits".
* in Petra 2.x: a lot of transactions are in one journal, only some of them really belong together ("total debits equal total credits").
* a journal was only used for different grouping transactions by currency
* it was hard to find all parts of a real transaction, because there were so many transactions in the journal unrelated to each other
==== Transactions in OpenPetra ====
* option 1: do the same as GnuCash:
**keep the same database structure as in Petra 2.x, with a_batch/a_journal/a_transactions
**different GUI: journals are not displayed anymore as such, but they become the transactions to the user; you can expand a journal line and see/edit the transactions involved.
**simple transaction involves 2 accounts
*** only one reference/narrative/amount
** split transaction: allows to define each account/reference/narrative
* option 2: keep the Petra 2.x users happy
** addition in the database: a_transaction.a_transaction_group_i: refers to one transaction in the group; all transactions with the same a_transaction_group_i make up a real bookkeeping transaction
** GUI: mark several transactions in the grid, and click button "Group", which will assign the first transaction_number_i to all transaction_group_i in the group.
* improved reports will show the opposite transaction(s), on Account Detail report etc.


=== Posting ===
=== Posting ===

Revision as of 07:45, 2 September 2009

multiple currencies

  • There is a base currency for each ledger, the balances of the ledger are stored in the base currency
  • There is an international currency
    • it is only used for reporting (previously it was stored with each balance, but that caused too much problems/overhead)
  • There can be foreign currency accounts which have balances in their own currency
    • they can be revaluated with a new daily exchange rate
  • exchange rate is stored in the database
    • corporate exchange rate (eg. issued once per month, an average exchange rate over the last 30 days)
      • the corporate exchange rate is used for calculating the reports in international currency
      • it is also used by ICH for clearing the debits/credits of the different offices between each other
    • daily exchange rate: this can be updated each day, or downloaded from Yahoo Finance etc.
      • the daily exchange rate is used for transactions with other currencies (different from base currency)

transactions

double entry bookkeeping

Transactions in GnuCash

  • see [1]
    • "For every transaction, total debits must equal total credits."
  • see GnuCash Manual: Multiple Split Transactions; also see a discussion here: [2];
    • there are simple transactions (one split), which just post to 2 accounts, with same (opposite) amount, same narrative etc
    • there are multiple split transactions, that have several transactions, and combined they balance
    • see the GUI of GnuCash for this:

You can switch between View: Basic Ledger, this shows only the summary: GnuCashTransactionViewBasicLedger.png

The other View is: Transaction Journal, this shows all movements of money involved: GnuCashTransactionViewTransactionJournal.png

Transactions in Petra 2.x

  • the definition of transaction in Petra 2.x is different from anyone else's definition: In Petra 2.x, a transaction only involves one account, therefore you need at least 2 transactions to get to "total debits equal total credits".
  • in Petra 2.x: a lot of transactions are in one journal, only some of them really belong together ("total debits equal total credits").
  • a journal was only used for different grouping transactions by currency
  • it was hard to find all parts of a real transaction, because there were so many transactions in the journal unrelated to each other

Transactions in OpenPetra

  • option 1: do the same as GnuCash:
    • keep the same database structure as in Petra 2.x, with a_batch/a_journal/a_transactions
    • different GUI: journals are not displayed anymore as such, but they become the transactions to the user; you can expand a journal line and see/edit the transactions involved.
    • simple transaction involves 2 accounts
      • only one reference/narrative/amount
    • split transaction: allows to define each account/reference/narrative
  • option 2: keep the Petra 2.x users happy
    • addition in the database: a_transaction.a_transaction_group_i: refers to one transaction in the group; all transactions with the same a_transaction_group_i make up a real bookkeeping transaction
    • GUI: mark several transactions in the grid, and click button "Group", which will assign the first transaction_number_i to all transaction_group_i in the group.
  • improved reports will show the opposite transaction(s), on Account Detail report etc.

Posting

  • posting: should show a preview of how the account balances would be after posting???

reduce number of tables

  • to test: should there be 3 different tables, for transactions from the current periods, the closed periods of the current year, and periods of previous years?
    • is Postgresql fast enough to cope with all transactions in one table?
    • this would make reporting much easier