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
...
 
@@ -42,47 +42,47 @@ 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
...
 
@@ -66,25 +66,25 @@ someone else is a liability, and that is of course accurate.  Like with the
 
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
...
 
@@ -179,25 +179,25 @@ 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
...
 
@@ -351,45 +351,45 @@ The possible values for this field are:
 
  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
...
 
@@ -449,25 +449,25 @@ 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
0 comments (0 inline, 0 general)