December Meeting 2007
From DojoWiki
December 13th Meeting
Contents |
Notes on Double-Entry Accounting
Double-entry is an accounting or bookkeeping system to record financial transactions impacting a business. It emphasizes the exchange of property and, by way of cross-referencing and some minor duplication, provides checks and balances to catch errors and add detail.
The double-entry system rests on the principle of duality: every economic event has two offsetting or balancing aspects—effort and reward, sacrifice and benefit, source and use.
Writing software to implement the double-entry system is challenging problem. None of the math is deep; in fact, simple addition is almost sufficient, with subtraction being whittled out where possible. None of the concepts are too difficult; the rules can be summarized in a few simple statements and equations.
The difficulty for the programmer lies mostly in the cross-referencing of transaction records. Trying to "pick the nouns" out of the system only gets one so far; many of these entities are easy to identify but hard to place. They have no obvious "place to live": Does a journal contain transactions? Do the ledgers contain transactions? Do the ledgers contain the journals? We have entities that refer and relate to other entities. If a relational database isn't the only way to represent this, what choices does the programmer have to make? Where would one choose to tolerate duplication? For which operations should one optimize?
Like most disciplines, bookkeeping comprises a rich vocabulary, reusing words we're familiar with in senses we're not, deceptively describing concepts that might seem more intuitive if we could break through the language barrier.
What follows are summarizing notes culled mostly from Dave Marshall's So you want to learn Bookkeeping tutorial.
Goals of the System
- Track what assets you get and whose right or claim to them was increased. These rights can be held by creditors—considered liabilities—or by owners.
- Track what assets you give up or use and whose right or claim to them was decreased. Again, these rights could have been held by creditors or by owners.
- Group and categorize the reasons for the increases and decreases to the owner's property rights.
- Provide a self-checking mechanism to catch errors in recording.
Basic Equations
- Property = Assets
- Property Rights = Liabilities + Equity
- Property = Property Rights
- Assets = Liabilities + Owner's Equity (Capital)
- Owner's Equity = Beginning Owner's Equity + Investments - Draws + Revenue - Expenses
- Assets = Liabilities + Beginning Owner's Equity + Investments - Draws + Revenue - Expenses
- Profit = Revenue - Expense
Stated alternately:
- Asset Increases - Asset Decreases =
- Property Right Increases - Property Right Decreases
Abbreviating:
- AI - AD = PRI - PRD
Reorganize to need only addition:
- AI + PRD = PRI + AD
Assigning names to each side of the equation:
- Debits = Credits
Therefore, transaction participants that increase assets or decrease property rights are called debits. Transaction participants that decrease assets or increase property rights are called credits. Every transaction includes both a credit and debit influence upon at least two accounts; a transaction can transfer from one asset to another (selling some stale inventory for cash), decrease an asset and a property right (using cash to pay down a loan), increase an asset and a property right (billing the client upon selling a service), and move from one property right to another (receiving the monthly utility bill).
Account Categories
Asset accounts normally have a debit balance. Liability accounts normally have a credit balance. Equity/Capital accounts normally have a credit balance. Draws and Expense accounts normally have a debit balance. Investments and Revenue accounts normally have a credit balance.
Translated to "T-Account" templates:
Asset ----------+----------- Debit (+) | Credit (-)
Liability ----------+----------- Debit (-) | Credit (+)
Equity/Capital ----------+----------- Debit (-) | Credit (+)
Draw ----------+----------- Debit (+) | Credit (-)
Expense ----------+----------- Debit (+) | Credit (-)
Investment ----------+----------- Debit (-) | Credit (+)
Revenue ----------+----------- Debit (-) | Credit (+)
Debits are always written on the left, credits on the right.
Artifacts Employed
General Journal
This tabular record focuses on a transaction, detailing when it occurred, its motivation or purpose, which accounts were involved, the amounts by which each account was debited or credited. Each entry has a unique identifier, and each of its debits or credits to an impacted account has an identifier cross-referencing a related entry in a ledger.
General Ledger
This tabular record focuses on an account. It carries a name and unique number identifying the account, and a sequence of entries detailing each transaction's impact upon the account, including the date, a description, a credit or debit amount, the resulting account balance after applying that credit or debit, and a cross-reference to the transaction entry in a journal.
Trial Balance
This report summarizes the ledgers' posting activity for some time period. The accounts may be grouped by category. For each account in the ledger, there is an entry with the account's name and its balance expressed as a credit or debit. The balance classification depends upon the account type: a credit account—liability, owner equity, investment, or revenue—with a positive balance is listed in the credit column, while a negative balance is listed in the debit column. Conversely, a debit account—asset, draw, or expense—with a positive balance is listed in the debit column, while a negative balance is listed in the credit column. A summary at the bottom totals the debit and credit columns. If they match, the books are in balance.
If the summarized debits and credits differ, the records need to be resolved. Working backward, one can total the trial balance credit and debit columns again, total the summarizing entry from each ledger account for the period again, check that each transaction has both a debit and credit entry appearing in a ledger, make sure the debit and credit totals for each transaction are equal, make sure that debits were not mistakenly entered as credits or vice versa, and finally check for numeric transpositions and translations.
Note that mistakenly recording an account's balance as a credit when it usually carries a debit balance or vice versa produces an imbalance divisible by 2—double the amount of the misplaced entry. Similarly, transposing two digits in a trial balance entry results in an imbalance divisible by 9.
