Chart Of Accounts

Blueprint: chart-of-accounts

Overview

The chart of accounts is the primary building block for the bookkeeping software. It provides the list of all of the accounts to which transactions can be allocated. Support for fund accounting is provided by having multiple funds each of which has its own chart of accounts. Other features will place restrictions on transactions that span funds. Most transactions will be restricted to using accounts from within the same fund.

Design

There will be command line options to support the following activities:

  • Creating the initial chart of accounts.
  • Adding a new account to an existing chart of accounts.
  • Removing an account from an existing chart of accounts.
  • Adding a new fund.
  • Removing an existing fund
  • Change the default fund used for creating new accounts
  • Report the list of existing funds and accounts.

Creating the initial chart of accounts will be the first activity for a new or separate database so this activity will also create the database schema.

Removing an account or a fund will be a soft delete. It will remove it from the lists of reported accounts or funds but it will still keep the record for historical reasons. There may be a need in subsequent features to restrict the ability to remove an account or a fund if there are recent transactions involving that account or involving any account in that fund.

Command Line Options

Note: All command lines will also accept standard database connection parameters to identify the database to which to connect.

Action Command Line
create chart of accounts acct create-books --template filename
add account acct account-add --name account name --code account code --type account type [--fund fund name]
remove account acct account-remove [--name account name] [--code account code]
list accounts acct account-list [--fund fund name]
add fund acct fund-add --name fund name --currency currency code
remove fund acct fund-remove --name fund name
change default fund acct set-default-fund --name fund name
list funds acct fund-list

The create chart of accounts action will accept -- as the filename to read from standard input.

The add account action --type option specifies the account as one of a defined list of account types. This list will be asset, liablity, equity, revenue, expense, gain, and loss. These account types identify the place on the financial statements where the account will appear. If the --fund option is not used the account will be added to the default fund.

The remove account action must specify exactly one of the --name or --code options to identify the account to remove.

The list accounts action will write an XML report listing the accounts by fund to the standard output. The report will be filtered to the accounts in a specific fund if the --fund option is used. This action will also accept an --output option to specify a file to which to write the report, rather than to standard output.

The list funds action will write an XML report listing the funds to the standard output. The action will also accept an --output option to specify a file to which to write the report, rather than to standard output.

Domain Model

Entities: Account, Fund

Accounts are contained in exactly one Fund.

Each Fund can contain multiple Accounts, though empty Funds are allowed (though not all that useful).

An Account has a name and a code. It also has a type that is one of asset, liability, equity, revenue, expense, gain, and loss.

A Fund has a name and a currency. All accounts in a given fund use the same (default) currency.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License