Introduction
This manual describes exchangealgebra-0.6.1.1. With ExchangeAlgebra, you record transactions in Haskell as sums of exchange algebra terms, keep journals, carry out bookkeeping procedures, and prepare financial statements. It covers four layers of the library: Algebra, Journal, Accounting, and IO. Start with From journal entries to exchange algebra to see how a journal table corresponds to the algebraic notation. For module documentation and the full API, see the Haddock reference on Hackage.
How this manual is organized
The running example starts with a bank withdrawal on January 10 and follows the shop’s January transactions through closing and financial statements. On February 1, the shop forms a subsidiary and prepares an opening consolidated balance sheet.
Mathematical foundations
- Consult Definitions and axioms for the formal rules for matching elements, adding terms, and separating debits from credits, or go straight to Installation and modules to start using the library.
Getting started
- In Installation and modules, add the package to a Stack project and select imports by layer.
- In Record a withdrawal, write a journal entry in exchange algebra and check that the debit and credit totals agree.
Customizing the components
- In Elements, add a bank element and query bases by bank.
- In Bases, build a three-element base and update account access.
- In Redundant and exchange algebras, choose an amount type, work with the month’s terms, and read debit and credit differences.
Transfers and journals
- In Transfers, move part of the rent payment to prepaid expenses and check the resulting balances.
- In Journals, attach dates and descriptions to transactions and select terms for January.
- In Multiple accounting entities, record the withdrawal for both the shop and the bank and check each entity’s terms.
Account titles
- In Account titles and their attributes, look up how the library classifies an account title.
- In Built-in account titles, find an account title to use in an entry.
Bookkeeping procedures
- In Checking a journal, express dollar cash in yen and validate the January records for bookkeeping.
- In Trial balance and checks, compute debit and credit totals and balances by account and diagnose a missing opening balance.
- In Adjusting entries, defer the rent for the next period and record the inventory count.
- In Closing entries, close the revenue and expense accounts and inspect the post-closing trial balance.
- In Financial statements, prepare January’s income statement and balance sheet.
- In Consolidation, eliminate the shop’s investment against the subsidiary’s capital to prepare the February 1 consolidated balance sheet.
Input and output
- In Reading journals from CSV, import term rows and diagnose an unknown account title and an unbalanced entry.
- In Writing books and statements, produce CSV rows for the journal, general ledger, trial balances, worksheet, and financial statements.