BOOKS -- An Accounting Program for Non-Profit Organizations

by Eugene Reimer 2002-February


OVERVIEW

This program has been used for many years to do the financial record-keeping and reporting for a Canadian non-profit organization.  It will work for other similar organizations, and even some not-so-similar ones, such as small businesses.  It is ideal for an organization that, while having only one (or a few) bank-account(s), needs to keep track of many different "pockets" or "accounts" or "projects".  It will run on any operating-system; it has been tested on Linux and Microsoft-Windows. 

The reporting is reasonably flexible, producing:  (a) detailed monthly reports;  and (b) annual reports with less detail, where both revenue and expenditures are lumped into "categories".  You can ask for a report covering a period of N months.  You can specify exactly which "sections" are to be included in a report.  Besides the "sections" you might use in those monthly or annual reports, there's also a "section" for the treasurer's use when working on the reconciliation between these records and a bank-statement.  Another for the printing of tax-receipts at year-end.  And yet another for the completion of GST-Rebate claims for the Canadian Revenue Agency. 

This program uses "single-entry" bookkeeping. 

It is run from your system's command-line;  if that's new to you, see www.bleepingcomputer.com/tutorials/tutorial76.html (Windows),  or www.osxterminal.com (Mac-OSX),  or google for a similar tutorial for your operating-system. 

INSTALLING

You need to "unzip" the supplied zip-file into a newly created directory; a directory named "books" is suggested. 

On one of the Microsoft operating-systems, save the supplied zipfile to a newly created folder C:\books;  then start a "Command-Prompt" window, and in it type the following:
cd \books
unzip zipfile.zip

Or, in "Winzip", click on Actions, then Extract, fill in the location as C:\books and then click on Extract. 

TESTING YOUR INSTALLATION

The Windows-version of ICON is included in this distribution.  If you're using any other system, then you install ICON from www.cs.arizona.edu/icon.  It's free, and available for practically any platform.  If you expect to use ICON for other projects, you'll want to install it into a directory that's mentioned in your PATH.  Otherwise, you could simply copy the executables to your "books" directory.  (In Windows the default location is \winicon\bin\NTICON*.EXE.)

Now use ICON to translate books.icn into an executable program.  On Windows, in a Command-Prompt window, type
cd \books
nticont books.icn
to do that translation.  (On a Unix system use slash instead of backslash and the ICON-translator will be named icont rather than nticont). 

Then type the following:
books
to invoke the books program, which will read the supplied books.asc file, producing files rep.asc rep.htm rep.tex.  Take a look at the rep.asc file, or use your browser to look at rep.htm. 

You should also verify that your favourite text-editor works on the books.asc file, and that you can print at least one of rep.asc or rep.htm. 

OPTIONAL SOFTWARE INSTALLATION

The books program produces donation-receipts in Postscript.  If you lack the means to print Postscript, you can get it by installing Ghostscript;  see pages.cs.wisc.edu/~ghost.  And a viewer, such as GSview, from same site. 

If you run the Windows operating-system, you may want to install a suite of "Unix-tools for Windows", in order run the supplied "bash" scripts.  Which is important if you will be modifying the program, but not if not. 

Many Windows-users are reluctant to use software that involves the command-line, and the hideous command-prompt (aka Dos-Box) provided by Windows must be part of the reason.  It comes with the 80-column, 25-line, white-on-black look of a 1960's-vintage dumb-terminal, however this can be changed to taste, by right-clicking on the title-bar, selecting Defaults, and so on;  see also support.microsoft.com/kb/309019.  I recommend black-on-white text, with approximately 160-columns, 60-lines. 

Windows users will need to install a text-editor, since the ones provided by Microsoft are inadequate.  Notepad can be used in a pinch, but only on very small files, so you'll soon be forced to look elsewhere.  Here's information on alternatives: www.mydigitallife.info/2007/05/04/windows-vista-notepad-replacement-alternative/

Mac-OSX users may also want to shop around for a text-editor, since the one (TextEdit) provided by Apple comes configured to be a WYSIWYG word-processor rather than a text-editor.  However it can be reconfigured to behave like a text-editor; see support.apple.com/kb/TA20406

REPORT GENERATION

Three formats of output are available: plain-Ascii, HTML, and TeX.  Ascii is good for debugging.  HTML for emailing or printing from a browser such as Netscape or Internet-Explorer.  TeX has the potential to produce very nice printed output, but for most users it won't be worth the effort. 

GETTING STARTED

The input comes from a single file, books.asc in this directory.  Here is an example, of the first part, for the Asteroid Society:
ORG      JDS     (Asteroid Society)  1 RNBL RBCNz  (Joe Pennymaster)
ACCOUNT  Book	 Book	    (Book Project)
ACCOUNT  Video   Video	    (Educational Video)
ACCOUNT  gf.()	 General    (General Funds Chqing)
ACCOUNT  gf.sv   Savings    (General Funds Savings)
BANKACC  Chqing		    EXCEPT gf.sv
BANKACC  Savings	    gf.sv
CATEGORY office-supplies    offsup office-supplies					
CATEGORY field-supplies	    fldsup field-supplies sunscreen repellent
CATEGORY mileage:G	    mileage
CATEGORY hotel-rooms	    room hotel motel
CATEGORY meals		    meals coffee pop
CATEGORY groceries:?	    food groceries
CATEGORY postage:G	    stamps postage courier UPS postal
CATEGORY printing	    printing copying inkcart paper envelop
CATEGORY website	    website web-hosting
CATEGORY banking:N	    servicecharge bankcharge overdraft
CATEGORY interest	    interest
CATEGORY insurance:N	    insurance Insurance
CATEGORY donations:N	    donation
CATEGORY donations-online:N donated-online
CATEGORY donations-inkind:N donated-inkind
CATEGORY grants		    grant
CATEGORY memberships	    membership
CATEGORY booksales*	    booksale
The rest of this document will tell you more about the statements shown above.  For now you can copy them as shown, replacing "Asteroid Society" with the name of your organization, replacing "Joe Pennymaster" with your treasurer's name.  (You can simply edit the supplied books.asc.)

You will create as many ACCOUNT statements as you have projects.  Each such statement simply gives 3 different names for the project; the first is used in other statements within books.asc; the 2nd and 3rd will appear in the reports, the 2nd or short-name where brevity is needed, but the 3rd or long-name in most places.  Whenever all accounts are being listed, they will be in alphabetic order, by the first name, and that's one reason for first-name to differ from short-name.  Sub-accounts:  a sub-account is written with a dotted first-name as in "gf.()" and "gf.sv" in the example above.  Note that "gf" is an acceptable abbreviation for "gf.()". 

If you have only one bank-account then no BANKACC statements are needed.  With more than one, supply a BANKACC for each where the right-hand-side is a list of accounts, or the keyword EXCEPT followed by a list of accounts. 

Your CATEGORY statements control what your annual reports will look like.  Each statement names the category, then lists one or more strings.  When the "explanation" part of a transaction contains one of those strings, then that transaction is said to be in that category, and will be so reported.  The category-name appendages: a star indicates a category with quantity-info, where transactions contain star followed by a number, and these will be summed and reported; a colon plus letter (or query-mark) provide a tax-code for the category. 

The statements are free format;  fields are separated by one or more spaces.  If a name contains spaces, enclose it in parentheses.  An empty name is written as a nothingness enclosed in parentheses. 

REPORT INPUT

It's not a strict requirement, but probably a good idea to keep statements, in books.asc, in the following order: the declarations, namely ORG, ACCOUNT, BANKACC, and CATEGORY statements, up front, followed by the "transaction" statements in chronological order. 

Here is a sample month of transactions with commentary:

98dec01  DEP  gf        160             memberships by:Peggy
98dec01  DEP  Book      25.50           donation: E Lavender
98dec01  DEP  Video     10              donation: E Slavicek
Those 3 statements show one deposit, of $195.50, made by Peggy.  It consisted of $160 for memberships, and donations of $25.50 and $10.  One donation for the "Book" project, the other for the "Video" project. 

A group of DEP statements are treated as one deposit when they have the same date.  If two different people made a deposit on the same day, then this combining can be avoided by just altering slightly the date for one of those deposits.  [[Another candidate for improvement.]]

A date can be entered as YYmmmDD; the program allows many variations, including YYYY.MM.DD, all in year-month-day order.  A monetary amount is entered without any currency symbol; it may be a whole-number; it may have a decimal fraction; and for historical reasons, a number such as 25.50 may also be written as 25+1/2. 

98dec05  295  gf                540.00  insurance to:UnionInsurance
This statement shows one cheque, number 295, made out to UnionInsurance. 

98dec06  296  Video             52.86   postage to:Doris
98dec06  296  Book              16.50   mileage nov20 Anola
98dec06  296  Book              14.98   meals   nov20 Anola tip:2.00
98dec06  296  Book              7.56    meals   nov20 Anola tax:? gst:0.03
These 4 statements show one reimbursement cheque, #296, paid to Doris, to reimburse several expenses, one charged to the Video project, and the others to the Book project.  The first "meals" transaction illustrates how a tip-amount is entered; the program needs to know about tips in order to calculate the GST-amount, although an alternative would be to supply "gst:0.58" instead.  The second "meals" transaction shows a gst-amount being entered, where "tax:?" to indicate a non-uniformly taxed expenditure isn't essential but can prevent the program grumbling about an implausible gst-amount.

Multiple statements are treated as describing a single cheque, based on the cheque-number.  For cheques, there is never a problem with spurious merging; however, with the very similar DM statements, one can have the same difficulty as was mentioned for deposits. 

98dec10  01   gf.sv     -2000   0       to chequeing-account
98dec10  DEP  gf        2000            from savings-account
These 2 statements show a cheque written on the savings account, and deposited into the chequing account.  The description of the cheque shows something new: it has two monetary amounts, in which case the first is a Revenue-column amount, and the 2nd is for the Expenditure column. 

Each transaction statement can have either one or two monetary amounts.  When there are two, the first is always Revenue.  But when only one is present, its interpretation depends on the type of statement: for DEP or CM statements, it is Revenue;  for CHQ or DM statements, it is Expenditure -- in other words, the usual case can be handled with the one-amount form.  The TRA statement has no obvious "usual", but a single amount indicates an Expenditure. 

98dec30  CM   gf.sv     30.79           interest-CambrianCU rev:99jan was:30.00
98dec30  DM   gf.sv             1.50    servicecharge rev:99jan new
98dec30  DM   gf                9.70    servicecharge rev:99jan was:6.50
Here we see 3 fairly typical end-of-month events: receiving interest on the savings account, and incurring some service charges. 

We also see "revisions".  This program has special provision for cases where one needs to revise the books, but wishes to conserve paper by not re-issueing that and all subsequent monthly reports.  (The revision provisions are suitable for monthly reporting;  revisions to annual reports are best handled with the NOTE statement.)

The "rev:99jan" indicates a revision done in the 1999-January period (meaning after distributing the December report, but before producing the January report).  A revision also has either a "was:SOMETHING" or "new" part. 

See the "Input Summary" at the end of this document, for more details on statements. 

RUNNING THE PROGRAM

As mentioned earlier, the books program reads books.asc, and produces the report in multiple formats for the most recent period.  Now for some ways to over-ride this behaviour:

books -i club.asc
books -i me.dat
These command-lines illustrate running the program with a different input-file;  as you may need to do if you are doing the books for more than one organization, individual, or business. 

books -oa
This asks for just rep.asc.  Other choices are -ot for just rep.tex, or -oh for just rep.htm. 

books 97jan 97feb
This asks for several reports, from other than the most recent period. 
    
books 97feb*2
This asks for a two-month report, covering 97-Jan and 97-Feb.  Please note that this is somewhat similar to, and yet very different from, the preceding example. 

books EACH
This asks for all possible (monthly) reports. 

books -sSB
This asks for a report with only the Short-form-transactions and the Balances sections -- as needed when reconciling with bank statements. 

books -sG
This asks for a GST-Report which is used when claiming the GST-Rebate for a Canadian Charity, other non-profit, school, hospital, etc.  See the Guide (www.cra-arc.gc.ca/E/pub/gp/rc4034/rc4034-09e.pdf) and the Form (www.cra-arc.gc.ca/E/pbg/gf/gst66/gst66-08e.pdf) for more information.  (See below for other "sections" you can ask for.)

books 97
books 98
books YEAREND
These ask for "Year-End" style reports.  At yearend, you may also want to ask for a "donors" report, to get a summary of donations received during the year as well as a Postscript file which, when sent to your printer, produces Revenue-Canada donation-receipts suitable for use in windowed envelopes.  See the file FORMtaxreceipt.ps for instructions on how to print the receipts. 

Incidentally you can configure the sections usually wanted on a "monthly" as well as on a yearend report, with those two strings of letters on the ORG statement.  Each is a string of letters from B/C/D/G/N/T/S/R/L/Z/z, where
B is for Balances-section,
C is for Categorized-section,
D is for Donors-report,
G is for GST-report,
N is for Notes-section,
T is for Transactions-section,
S is for Short-transactions-section,
R is for Revisions-section,
L is for Ledger-section,
Z is for the signature-lines,
z is for a shorter signature-line. 
The Donors-report and GST-report are unusual, in that you're unlikely to make them part of your routine monthly or annual reports; one also spits out a separate file for the printing of donation-receipts; the other is for GST-rebate claims made to Revenue-Canada (also known as CCRA and more recently as CRA). 

The Donors-report relies on certain Categories being defined, namely: donations, donations-inkind, donations-online, grants.  It relies on donation-transactions containing the donor's name as the 2nd and 3rd words of the Explanation, where a dash is used to indicate the absence of a Lastname for one-word Corporation-names and for donations by anon, written as "anon -".  It will lookup each donor's address in a file of "Membership-records" called MBRS.htm which has lines like:
<tr><td>ID <td>FIRSTNAME <td>LASTNAME <td>STREET-ADDRESS ... 
where Firstname appears after the 2nd "<td>", Lastname after 3rd, Address after the 4th, 5th, 6th, 7th, and 8th.  You may, say for a donation from non-member, enter Address right in the Explanation part of the transaction, delimited by "!"-characters, with embedded "!"-character where a newline is wanted. 

The GST-report makes use of tax:code gst:amt and tip:amt that can be present in a transaction's Explanation.  When neither tax:code nor gst:amt are on a transaction, but the applicable CATEGORY-statement has a ":code" then that tax-code applies;  on a CATEGORY-statement, the tax-code can be N/G/B where ":B" can be omitted, or it can be "?" for a non-uniformly-taxed category which will force tranactions to supply it or the gst-amount (tax-code on CATEGORY-statements is new in 2010-02 version).  A noteworthy feature is the gathering of stats on Tip-Rates, in order to make a reasonable guess on those meal expenses specifying neither tip-amount nor gst-amount;  this feature does nothing if you lack a "meals" category.  The GST-report will need a minor change for use in another Canadian province, changing the line: $define PST 7.0, to the rate for your province.  It will need not-so-minor changes for use in another country. 

Wherever I've said "month" I should have said "period", since you can have multiple months in your accounting-period;  see the <mpp> operand on the ORG statement. 

Another point warrants a word of explanation.  The program supports "comments" on the input lines, everything from "##" on being ignored.  So when I say an operand extends until end-of-line, you should read that as until either "##" or end-of-line. 

COMMAND-LINE SUMMARY

books [option]...  [date[*nbr]/EACH/YEAREND/DUMP]... 

where option is one of:
-?
-e
-i infile[,infile]... 
-o[a/h/t]... 
-a account
-s[B/C/D/G/N/T/S/R/L/Z/z]... 
-B donation-threshold-amount
-c C/S

Above is the books command-line; where
square-brackets indicate an optional-part; 
slash separates choices; 
triple-dot means one-or-more-of; 

-? will produce information on using the program;
-e tells the program to "echo" the input;  can be useful in determining which line of the inputfile led the program to crash, not that it ever does:-)
-B alters donors-reporting to include Grants and 3rd-Party-Receipted-donations, as wanted when producing a list of donors to be publicly thanked  (to be avoided when producing tax-receipts);
-c specifies whether an account with subaccounts is to have those shown Separately or Combined in the Balances, Categorized, Ledger sections  (new in the 2010-02 version);
the other operands were explained in "Running the Program". 
Defaults: -i books.asc -oaht -cC;  see the ORG statement for -s defaults, as explained in "Running the Program". 

INPUT SUMMARY

ORG      name  longname  mpp  sections-monthly  sections-yearend  treasurer
ACCOUNT  name  shortname  longname  [balance]
BANKACC  name  account...
CATEGORY name[*][:N/G/B/?]  [pattern [maxamount]]...
date  chqnbr  account         [revenue-amt]  expenditure-amt    explanation
date  DM      account         [revenue-amt]  expenditure-amt    explanation
date  CM      account          revenue-amt  [expenditure-amt]   explanation
date  DEP     account          revenue-amt  [expenditure-amt]   explanation
date  TRA  from-acct to-acct  [revenue-amt]  expenditure-amt    explanation
date  NOTE anything-til-line-end
Above is the complete list of possible statements;  where
square-brackets indicate an optional-part; 
slash separates choices; 
triple-dot means one-or-more-of;
<mpp> is an integer (the number of months per period);
<sections> is a string of letters from B/C/D/G/N/T/S/R/L/Z/z (more info in "Running the Program");
<explanation> can be anything-til-line-end, however strings of the forms
BY:arb
TO:arb
REV:date [WAS:arb / NEW]
TAX:N/G/B/? / TIP:amt / GST:amt
!addressline1!addressline2!addressline3!
are given meaning by this program;  as are the "patterns" specified in CATEGORY statements.