Changeset - 438e0688929d
[Not reviewed]
0 3 0
Bradley Kuhn (bkuhn) - 8 years ago 2016-02-13 18:57:40
bkuhn@ebb.org
Standardize on 'Expenses" in account names

We've concluded that the top-of-hierarchy account name for Expenses
should be Expenses, not Expense. This change normalizes the tutorial
text and examples to Expenses.
3 files changed with 16 insertions and 16 deletions:
0 comments (0 inline, 0 general)
accounts/config/config-accounts.ledger
Show inline comments
...
 
@@ -30,59 +30,59 @@ account Asset:Checking
 
account Liabilities:Credit Card:Visa
 
    note Visa Credit Card account for entire organization
 
    assert commodity == "$"
 

	
 

	
 
; Organizational accrual accounts
 

	
 
account Accrued:Accounts Receivable:Main Org
 
    note Accrued receivables for Main Org
 
    assert commodity == "$"
 

	
 
account Accrued:Accounts Payable:Main Org
 
    note Accrued payables for Main Org
 
    assert commodity == "$"
 

	
 
; Organizational Expense Accounts
 

	
 
; NOTE: the payee =~ test is *not* included herein and must be cut-and-pasted
 
;       to the assert in every Expense account because of the following bug:
 
;               http://bugs.ledger-cli.org/show_bug.cgi?id=953
 

	
 
define expenseChecker() = (tag("Receipt") !~ /^\s*$/ or tag("Invoice") !~ /^\s*$/ or tag("Statement") !~ /^\s*$/) and tag("Program") !~ /^\s*$/
 
; or payee =~ /NEVER CHARGED/
 

	
 
account Expense:Main Org:Office Supplies
 
account Expenses:Main Org:Office Supplies
 
    assert expenseChecker() or payee =~ /NEVER CHARGED/
 
    note Main Organization's Office Supplies and Sundries
 

	
 
account Expense:Main Org:Payroll:Salary
 
account Expenses:Main Org:Payroll:Salary
 
    assert expenseChecker() or payee =~ /NEVER CHARGED/
 
    note Main Organization's Staff Salaries
 

	
 
account Expense:Main Org:Payroll:Benefits
 
account Expenses:Main Org:Payroll:Benefits
 
    assert expenseChecker() or payee =~ /NEVER CHARGED/
 
    note Main Organization's Staff Benefits
 

	
 
account Expense:Main Org:Phones
 
account Expenses:Main Org:Phones
 
    assert expenseChecker() or payee =~ /NEVER CHARGED/
 
    note Main Organization's Phone Expenses
 

	
 
account Expense:Main Org:Hosting
 
account Expenses:Main Org:Hosting
 
    assert expenseChecker() or payee =~ /NEVER CHARGED/
 
    note Main Organization's Network Hosting Provider services
 

	
 
account Expense:Main Org:Development
 
account Expenses:Main Org:Development
 
    assert expenseChecker() or payee =~ /NEVER CHARGED/
 
    note Main Organization's software development expenses
 

	
 
account Expense:Main Org:Occupancy
 
account Expenses:Main Org:Occupancy
 
    assert expenseChecker() or payee =~ /NEVER CHARGED/
 
    note Main Organization's Occupancy for Office Space and the like
 

	
 
; Organizational Income Accounts
 

	
 
define incomeChecker(amt) = (tag("Entity") !~ /^\s*$/ or (amt > -800.00 and amt < 800.00)) and tag("IncomeType") !~ /^\s*$/ and tag("Program") !~ /^\s*$/
 

	
 
account Income:Main Org:Donations
 
    assert incomeChecker(amount) and tag("IncomeType") =~ /^Donations$/
 
    note Donation income to the Main Org.
accounts/org/main-org.ledger
Show inline comments
 
; -*- ledger -*-
 
; -*- coding: utf-8 -*-
 

	
 
!include ../config/config-npo.ledger
 

	
 
2012-02-05 Office Supply Galore - Online Order
 
        ;Receipt: accounts/documentation/org/receipts/2012-02-05_office-supply-galore.txt
 
    Expense:Main Org:Office Supplies          $35.00
 
    Expenses:Main Org:Office Supplies         $35.00
 
        ;Program: Main Org:Overhead
 
    Liabilities:Credit Card:Visa             $-35.00
 

	
 
2011/05/28 My Bad Billing Hosting - NEVER CHARGED
 
    Liabilities:Credit Card:Visa            $-100.00
 
    Expense:Main Org:Hosting                 $100.00
 
    Expenses:Main Org:Hosting                $100.00
 
        ;Program: Main Org:Overhead
 

	
 
2012/01/01 My Bad Billing Hosting - REVERSAL - NEVER CHARGED
 
    Liabilities:Credit Card:Visa             $100.00
 
    Expense:Main Org:Hosting                $-100.00
 
    Expenses:Main Org:Hosting               $-100.00
 
        ;Program: Main Org:Overhead
 

	
 
2012-05-03 Sir Moneybags
 
        ;Entity: Sir-Moneybags
 
        ;Invoice: accounts/documentation/org/invoices/2012-05-30_moneybags-invoice_as-sent.txt
 
    Accrued:Accounts Receivable:Main Org  $100,000.00
 
    Income:Main Org:Donations            $-100,000.00
 
        ;IncomeType: Donations
 
        ;Program: Main Org:Direct Fundraising
 

	
 
2012-07-05 J. Developer
 
        ;Entity: Developer-J
 
        ;Invoice: accounts/documentation/org/expenses/developer/2012-07-05_developer-invoice.txt
 
    Accrued:Accounts Payable:Main Org  $-5,000.00
 
    Expense:Main Org:Development        $5,000.00
 
    Expenses:Main Org:Development       $5,000.00
 
        ;Program: Main Org:Software:Internal
 
        ;Statement: accounts/documentation/org/expenses/developer/2012-07-05_developer-report.txt
 

	
 
2012-08-03 (1) J. Developer
 
        ;Entity: Developer-J
 
    Accrued:Accounts Payable:Main Org  $5,000.00
 
        ;Invoice: accounts/documentation/org/expenses/developer/2012-07-05_developer-invoice.txt
 
    Asset:Checking                    $-5,000.00
 
        ;TaxImplication: 1099
 

	
npo-ledger-cli-tutorial.md
Show inline comments
...
 
@@ -54,49 +54,49 @@ primarily your cash accounts, or anything that's completely liquid.
 
Many accounting tutorial materials will note that loans, accounts receivable
 
and other receivables are assets as well.  Most accountants will
 
say that they are, but with regard to accounts called "Assets", this system
 
uses the account hierarchy `Assets:` only for tangible, liquid,
 
cash and/or cash-equivalent assets.  You'll find that account hierarchy
 
commonly in the examples herein.
 

	
 
### Liabilities Accounts
 

	
 
Similar to assets, most accountants will point out that any amount owed to
 
someone else is a liability, and that is of course accurate.  Like with the
 
`Assets:` hierarchy, this system uses `Liabilities:` hierarchy only to refer
 
to formalized accounts, such as credit cards, where a monthly statement is
 
sent and have an ongoing liability relationship with the organization.
 

	
 
### Accrued Accounts
 

	
 
For items that are receivable or payable, this system uses `Accrued:`
 
hierarchy.  Under this top-level account, you'll find accounts payable,
 
accounts receivable, loans payable and loans receivable.
 

	
 
### Expense Accounts
 

	
 
These accounts contain any expense of the organization, and all begin with
 
`Expense:`.
 
`Expenses:`.
 

	
 
### Income Accounts
 

	
 
These accounts contain any income of the organization, and all begin with
 
`Income:`.
 

	
 
### Unearned Income Accounts
 

	
 
`Unearned Income:` accounts are used to refer to revenue that is currently
 
received for services which have not yet been delivered.  The most typical
 
and common place an NPO encounters this type of income is for conference
 
registrations.  Since conference registrations arrive in advance of the
 
conference, it is not proper under accrual accounting to call it income until
 
such time as the conference successfully completes.
 

	
 
### Reporting The Chart of Accounts
 

	
 
The
 
[`general-ledger-report.plx` script in the `non-profit-audit-reports` Ledger CLI contrib directory](https://github.com/ledger/ledger/blob/next/contrib/non-profit-audit-reports/general-ledger-report.plx)
 
will generate a file called `chart-of-accounts.csv`, which is the chart of accounts.
 

	
 
The main command-line program though, that generates the chart of accounts
 
looks like this:
 
    $ ledger -f accounts/main/books.ledger -V -F "%-150A\n" -w -s -b 2012/01/01 -e 2013/01/01 reg
...
 
@@ -167,49 +167,49 @@ example, in this entry:
 
            ;IncomeType: Donations
 

	
 
The portion of the transaction that credits the `Income:Main Org:Donations`
 
has three tags: [`Entity`](#entity-tag), [`Invoice`](#invoice-tag) and
 
[`IncomeType`](#income-type).  The `Entity` and `Invoice` tags, since they're
 
listed at the top of the transaction, propagate through and apply to both
 
sides.  But, the `IncomeType` tag, which has no meaning for `Accrued:`
 
accounts, so it is applied only to the `Income:Main Org:Donations` part of
 
the transaction.
 

	
 
Below you'll find detailed descriptions of all the possible tags that are
 
used in this system.  The actual declarations and enforcement of rules of
 
these tags can be found in the file `accounts/config/config-tags.ledger` in
 
this project.
 

	
 

	
 
### Documentation Tags
 

	
 
Documentation tags are tags that link to other backup documents that provide
 
evidence and details that justify a particular ledger entry.  The value of
 
the tag is a relative path name of a file elsewhere in the same repository
 
that documents the specific expense.  For example, an entry like this:
 

	
 
     2012-02-05 Office Supply Galore - Online Order
 
         Expense:Main Org:Office Supplies      $35.00
 
         Expenses:Main Org:Office Supplies     $35.00
 
             ;Receipt: accounts/documentation/org/receipts/2012-02-05_office-supply-galore.txt
 
         Liabilities:Credit Card:Visa         -$35.00
 

	
 
shows that a purchase was made at Office Supply Galore's online store for
 
$35.00, and the file
 
`accounts/documentation/org/receipts/2012-02-05_office-supply-galore.txt`
 
contains the receipt from that purchase.
 

	
 
#### Receipt Tag
 

	
 
The `Receipt:` tag refers to receipt of some sort.  Typically, this is a
 
document that shows clear confirmation that the transaction has already
 
occurred.  The value of the `Receipt:` tag is always a valid pathname in the
 
repository to the document, [as described above](#documentation-tags).
 

	
 
Some examples of appropriate uses of the `Receipt:` are:
 

	
 
* a point-of-sale credit card receipt from a purchase, given by a cashier or
 
  sent via email after the purchase has occurred.
 

	
 
* a deposit slip given at the bank upon making an over-the-counter deposit of
 
  paper checks.
 

	
 
* a confirmation document showing an outgoing wire transfer made by a bank.
...
 
@@ -339,69 +339,69 @@ The possible values for this field are:
 
  1099 is required.
 

	
 
* `USA-501c3`, indicating that the NPO has established that the `Entity`
 
  has federal 501(c)(3) status in the USA, and therefore no 1099 is required.
 

	
 
* `Refund`, indicating that the amount is a refund owed to the `Entity` from
 
  an amount previously paid to the NPO.
 

	
 
* `Reimbursement`, indicating that the amount is a reimbursement of expenses
 
  incurred by the `Entity` and thus it is not income to the `Entity`.
 

	
 
* `Tax-Payment`, indicating this is a tax payment to a taxing authority (such
 
  as the state or federal government) (e.g., a unrelated business income tax
 
  payment).
 

	
 
* `USA-LLC-No-1099`, indicating that the `Entity` is an LLC, but not the type
 
  of LLC for which the USA requires issuing a 1099.
 

	
 
* `Loan`, indicating that the `Entity` is receiving these funds as a loan
 
  that is expected to be paid back.
 

	
 
#### Program Tag
 

	
 
The `Program` tag is used primarily to track program activity for `Income:`
 
and `Expense:` accounts.  This allows for knowing what particular initiative
 
and `Expenses:` accounts.  This allows for knowing what particular initiative
 
initiated the income (e.g., a specific fundraising campaign) and/or what
 
particular program activity an expense is toward (e.g., funding travel to
 
some specific conference).
 

	
 
The Program tag is always a string with the same format as a Ledger CLI
 
account (primarily for use with Ledger CLI's `--pivot` and `--group-by`,
 
[as described later](#testing-program-success)).
 

	
 
### Account Type Documentation Requirements
 

	
 
Each account type has different documentation requirements.  Based on the
 
type of the account, it requires a different set of tags.
 

	
 
When Ledger CLI's `--pedantic` option is used, these rules are enforced by
 
ledger itself via the configurations found in `config-tags.ledger` and
 
`config-accounts.ledger`.
 

	
 
#### Expense Account Documentation
 

	
 
Each `Expense:` account entry must be tagged with the following tags:
 
Each `Expenses:` account entry must be tagged with the following tags:
 

	
 
* One of: [`Invoice:`](#invoice-tag) [`Receipt:`](#receipt-tag), or
 
  [`Statement`](#statement-tag).  (The only exception to this rule: an entry
 
  does not need an `Invoice:`, `Receipt`, nor a `Statement` tag if the
 
  [payee was never charged](#never-charged-payee).)
 

	
 
* A [`Program:`](#program-tag) tag.
 

	
 
#### NEVER CHARGED Payee
 

	
 
The only exception to the standard tagging requirement is when the payee has
 
been modified to indicate that the expense was `NEVER CHARGED`.  This is an
 
historical special-case.  The solution was originally design for the
 
following scenario:
 

	
 
Suppose an expense was expected &mdash; for example, a situation where you
 
gave a credit card number to charge something and the charge never came
 
through &mdash; but it turns out the charge never happened.
 

	
 
The recommended way to resolve this problem in the system is to just delete
 
the entry entirely from the Ledger file, and allow the VCS to log the fact
 
that the charge was expected, but the vendor never billed the credit card.
 

	
 
The reason the `NEVER CHARGED` payee text was added was to handle the
...
 
@@ -437,49 +437,49 @@ Each `Income:` account must have the following tags:
 

	
 
* An [`Entity:`](#entity-tag) tag, *iff.* the Income for the transaction is
 
  for more than $800.
 

	
 
* An [`IncomeType:`](#incometype-tag) tag.
 

	
 
* A [`Program:`](#program-tag) tag.
 

	
 
Analysis of the Data
 
--------------------
 

	
 
If this methodology is followed, Ledger can be used to analyze the financial
 
data for the organization.
 

	
 
### Testing Program Success
 

	
 
If you use the [`Program`](#program-tag) tag effectively, you can easily test
 
the successes of various fundraising programs with a command like this:
 

	
 
    $ ledger -f accounts/books.ledger --pivot Program bal '/^Income/'
 

	
 
Meanwhile, using the  [`Program`](#program-tag) tag for Expenses can help
 
track what programs are costing with commands like these:
 

	
 
    $ ledger -f accounts/books.ledger --group-by 'tag("Program")' reg '/^Expense/'
 
    $ ledger -f accounts/books.ledger --group-by 'tag("Program")' reg '/^Expenses/'
 

	
 
FIXME: example output
 

	
 
### Checking Integrity of a Tag
 

	
 
[As mentioned](#entity-tag), the `Entity:` tag is one example among many
 
where the value is a wide range, but since Ledger CLI isn't backed by a more
 
complete ERP system, it's possible during data entry for typos to make a
 
serious problem.  One work around to this flaw is to periodically run a
 
command like:
 

	
 
    $ ledger -f accounts/books.ledger -F '%(tag("Entity"))\n' reg|sort|uniq|less
 

	
 
which will show all unique `Entity:` values currently in use.
 

	
 
Copyright and License of This File
 
----------------------------------
 

	
 
This specific document, the README.md file for npo-ledger-cli, is copyrighted:
 
  Copyright &copy; 2013, Bradley M. Kuhn
 

	
 
This document's license gives you freedom; you can copy, modify, convey,
 
propagate, and/or redistribute this software under the terms of either:
 

	
0 comments (0 inline, 0 general)