Changeset - 6b75627d4092
[Not reviewed]
0 2 0
Bradley Kuhn (bkuhn) - 11 years ago 2013-04-29 21:44:04
bkuhn@ebb.org
Add example that explains very briefly how tagging works in Ledger CLI.

Since this system relies so heavily on tagging, even though we assume the
reader is generally familiar with Ledger CLI, it's worth ensuring they know
the basics of how tagging works.

Also added herein is the example used in the text over to the Ledger file
itself.
2 files changed with 33 insertions and 2 deletions:
0 comments (0 inline, 0 general)
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
 
    Expense:Main Org:Office Supplies          $35.00
 
        ;Receipt: accounts/documentation/org/receipts/2012-02-05_office-supply-galore.txt
 
    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
 

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

	
 
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
npo-ledger-cli-tutorial.md
Show inline comments
...
 
@@ -96,104 +96,129 @@ such time as the conference successfully completes.
 
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
 

	
 
Note that this is bound by date.  Typically, it makes sense to list your
 
chart of accounts for a specific period (e.g., your fiscal year), since your
 
accounts might have some cruft in them from previous years that should now be
 
ignored.  (For example, if your organization simplified its chart of accounts
 
in later years, you don't want to report those old accounts that are no
 
longer used.)
 

	
 
Handling Fiscal Sponsorship
 
---------------------------
 

	
 
NPOs that do not provide fiscal sponsorship services will find this section
 
somewhat useless.  One of the biggest benefits of Ledger CLI is its
 
incredible flexibility that just does not exist in other accounting systems.
 
This section describes how to exploit that flexibility to provide a
 
separation in your books and reporting to handle earmarked accounts for
 
fiscally sponsored projects.
 

	
 
NPOs that don't need this feature can, in most cases, use the methods
 
described herein to deploy Ledger CLI, but should leave out the `:General:`
 
and `:ProjectNAME:` parts of the account hierarchy, since these are the
 
primary mechanisms used herein to handle the fiscal sponsorship structure.
 

	
 
### Earmarked Accounts
 

	
 
Many fiscal sponsor NPOs keep earmarked accounts for their member/affiliated
 
projects.  Furthermore, these projects often may either (a) terminate their
 
agreement with the NPO, and thus deserve a copy of their books that they can
 
"take away" with them, or (b) might be affiliated with *other* NPOs that also
 
hold accounts.  This system of earmarked accounts is designed to make it easy
 
for projects to have a copy of their own accounts, but not interfere with nor
 
even be aware of (a) the books of other member/affiliated projects, and (b)
 
the overall books of the entire NPO.
 

	
 
On the latter point, this system utilizes a directory structure and separate
 
`.ledger` files to separate out the different projects into different
 
structures.  This allows member/affiliated projects to take their data and
 
run `ledger` commands against it, separately and without access to the other
 
`.ledger` files of the NPO.
 

	
 

	
 
Proper Documentation For Accounts
 
---------------------------------
 
Proper Documentation For All Transactions
 
-----------------------------------------
 

	
 
Ledger CLI offers a flexible structure of tagging any entry, including
 
separate tags for parts of a split transaction.  This system uses those tags
 
to ensure proper documentation is included for each financial transaction
 
that occurs for the organization.
 

	
 
Note that since Ledger CLI is a complete double-entry accounting system, each
 
transaction can correspond to multiple entries in the general ledger.  The
 
data entry format of Ledger CLI lists each double-entry accounting
 
transaction in a text file.
 

	
 
Documentation may in fact differ for entries within the transaction.  Ledger
 
CLI's tagging structure is flexible in this regard: each portion of a
 
double-entry transaction can carry the same tag or a different tag.  For
 
example, in this entry:
 

	
 
    2012-05-03 Sir Moneybags
 
            ;Entity: Sir-Moneybags
 
            ;Invoice: accounts/documentation/org/invoices/2012-05-30_moneybags-invoice_as-sent.txt
 
        Accrued:Accounts Receivable:Conservancy  $100,000.00
 
        Income:Main Org:Donations               $-100,000.00
 
            ;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.
 

	
 
### Tags Used In This System
 

	
 
A list of tags can be found in the file `accounts/config/config-tags.ledger`
 
in this project.
 

	
 
#### 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.
 

	
 
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.
 

	
 
* a confirmation document showing transfer of funds between two bank
 
  accounts.
 

	
 
* A pay advice document generated upon payment of an invoice.
 

	
 
#### Invoice Tag
 

	
 
The `Invoice:` tag refers to an actual invoice, either generated by the
 
organization or received by the organization.  Typically, this is a document
 
that is a request for payment, rather than documenting an actual payment that
 
has occurred.  The value of the `Invoice:` tag is always a valid pathname in
 
the repository to the document.
 

	
 
Some examples of appropriate uses of the `Invoice:` tag are:
 

	
 
* an actual invoice as sent by a vendor to the organization.
 

	
 
* a request for payment sent by the organization to someone else.
 

	
 
* a reimbursement request submitted by an employee, contractor, or volunteer
 
  for expenses they've already incurred and would like the organization to
 
  reimburse (e.g., an expense report, requesting for reimbursement of travel
 
  expenses).
 

	
 
#### Statement Tag
 

	
0 comments (0 inline, 0 general)