Changeset - 620278d2205d
[Not reviewed]
0 5 0
Martin Michlmayr (tbm) - 10 years ago 2014-04-19 02:32:53
tbm@cyrius.com
Cosmetic fixes
5 files changed with 10 insertions and 10 deletions:
0 comments (0 inline, 0 general)
accounts/config/config-accounts.ledger
Show inline comments
 
; -*- ledger -*-
 
; -*- coding: utf-8 -*-
 
;
 
; config-accounts.ledger: The Ledger CLI accounts declarations for NPO use-case.
 
;
 
; Copyright © 2013, Bradley M. Kuhn.
 
;
 
; The copyright holders wish that this document could be placed into the
 
; public domain.  However, should such a public domain dedication not be
 
; possible, the copyright holders grant a waiver and/or license under the
 
; terms of CC0-1.0, as published by Creative Commons, Inc.  A copy of CC0-1.0
 
; can be found in the same repository as this README.md file under the
 
; filename CC0-1.0.txt.  If this document has been separated from the
 
; repository, a [copy of CC0-1.0 can be found on Creative Commons' website at
 
; repository, a copy of CC0-1.0 can be found on Creative Commons' website at
 
; http://creativecommons.org/publicdomain/zero/1.0/legalcode
 

	
 
; ##############################  GENERAL/SHARED ACCOUNTS #######################
 

	
 
; Shared Asset Accounts
 

	
 
define assetChecker(amt) = (amt > -10.00 or (tag("TaxImplication") !~ /^\s*$/ and tag("Entity") !~ /^\s*$/))
 

	
 
account Asset:Checking
 
   assert assetChecker(amount)
 
   note Checking account for entire organization
 
   assert commodity == "$"
 

	
 
; Shared Liabilities Accounts
 

	
 
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 ever Expense account because of the following bug:
 
;       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
 
    assert expenseChecker() or payee =~ /NEVER CHARGED/
 
    note Main Organization's Office Supplies and Sundries
 

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

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

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

	
 
account Expense:Main Org:Hosting
 
    assert expenseChecker() or payee =~ /NEVER CHARGED/
 
    note Main Organization's Network Hosting Provider services
accounts/config/config-commodities.ledger
Show inline comments
 
; -*- ledger -*-
 
; -*- coding: utf-8 -*-
 
;
 
; config-commodities.ledger: The Ledger CLI commodities declarations for NPO use-case.
 
;
 
; Copyright © 2013, Bradley M. Kuhn.
 
;
 
; The copyright holders wish that this document could be placed into the
 
; public domain.  However, should such a public domain dedication not be
 
; possible, the copyright holders grant a waiver and/or license under the
 
; terms of CC0-1.0, as published by Creative Commons, Inc.  A copy of CC0-1.0
 
; can be found in the same repository as this README.md file under the
 
; filename CC0-1.0.txt.  If this document has been separated from the
 
; repository, a [copy of CC0-1.0 can be found on Creative Commons' website at
 
; repository, a copy of CC0-1.0 can be found on Creative Commons' website at
 
; http://creativecommons.org/publicdomain/zero/1.0/legalcode
 

	
 
;  ############################## COMMODITIES #############################
 

	
 
commodity $
 
   note USD
 
   format $1,000.00
 
   nomarket
 

	
accounts/config/config-npo.ledger
Show inline comments
 
; -*- ledger -*-
 
; -*- coding: utf-8 -*-
 
;
 
; Copyright © 2013, Bradley M. Kuhn.
 
;
 
; The copyright holders wish that this document could be placed into the
 
; public domain.  However, should such a public domain dedication not be
 
; possible, the copyright holders grant a waiver and/or license under the
 
; terms of CC0-1.0, as published by Creative Commons, Inc.  A copy of CC0-1.0
 
; can be found in the same repository as this README.md file under the
 
; filename CC0-1.0.txt.  If this document has been separated from the
 
; repository, a [copy of CC0-1.0 can be found on Creative Commons' website at
 
; repository, a copy of CC0-1.0 can be found on Creative Commons' website at
 
; http://creativecommons.org/publicdomain/zero/1.0/legalcode
 

	
 
!include config-commodities.ledger
 
!include config-tags.ledger
 
!include config-accounts.ledger
accounts/config/config-tags.ledger
Show inline comments
 
; -*- ledger -*-
 
; -*- coding: utf-8 -*-
 
;
 
; config-tags.ledger: The Ledger CLI tag declarations for NPO use-case.
 

	
 
; Copyright © 2013, Bradley M. Kuhn.
 
;
 
; The copyright holders wish that this document could be placed into the
 
; public domain.  However, should such a public domain dedication not be
 
; possible, the copyright holders grant a waiver and/or license under the
 
; terms of CC0-1.0, as published by Creative Commons, Inc.  A copy of CC0-1.0
 
; can be found in the same repository as this README.md file under the
 
; filename CC0-1.0.txt.  If this document has been separated from the
 
; repository, a [copy of CC0-1.0 can be found on Creative Commons' website at
 
; repository, a copy of CC0-1.0 can be found on Creative Commons' website at
 
; http://creativecommons.org/publicdomain/zero/1.0/legalcode
 

	
 
; ################################# TAGS ################################
 

	
 
; The Statement, Receipt, and Invoice tags' values should always a be a
 
; relative path names.  Note that we "check", but do not "assert" that the
 
; file name match a standard Unix-like path syntax, without spaces in the
 
; file name.
 

	
 
tag Statement
 
    assert value =~ /[^\/].+/
 
    check value =~ /[^\/][^ ]+(\/[^ ])+/
 

	
 
tag Receipt
 
    assert value =~ /[^\/].+/
 
    check value =~ /[^\/][^ ]+(\/[^ ])+/
 

	
 
tag Invoice
 
    assert value =~ /[^\/].+/
 
    check value =~ /[^\/][^ ]+(\/[^ ])+/
 

	
 
; IncomeType refers to the types of income a non-profit can receive.  In this
 
; example, it's for the categorizations on the USA Form 990.  This could be
 
; changed to accomodate other jurisdictions around the world.
npo-ledger-cli-tutorial.md
Show inline comments
...
 
@@ -30,49 +30,49 @@ system appropriate for your organization.
 

	
 
Furthermore, given the authors' limited knowledge of accounting requirements
 
outside the USA, the suggestions herein probably are not particularly useful
 
at all for organizations outside the USA.
 

	
 
Configuration of Chart of Accounts
 
----------------------------------
 

	
 
The first thing any accountant will ask to see if your so-called "chart of
 
accounts".  The first time I heard this phrase, I thought it was something
 
complicated.  Fact of the matter is, it's really just a list of all the
 
accounts that you use.  Accountants also use "account codes", which, as near
 
as I can tell, are of primary interest because they get better sorting.
 
Ledger CLI doesn't really support account codes, so I've ignored them.
 

	
 
The real place that Ledger CLI stores your chart of accounts is if you use
 
the `account` directive along with the `--pedantic` CLI option.  This will
 
ensure that only accounts you declared explicitly will used.
 

	
 
### Asset Accounts
 

	
 
Asset accounts represent anything that's owned.  Typically, these are
 
primarily your cash accounts, or anything that's completely liquid.
 

	
 
Many accounting tutorial materials will note that Loans, accounts receivable
 
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:`.
...
 
@@ -317,78 +317,78 @@ The possible values for this field are:
 
  1099 for the `Entity` involved.
 

	
 
* `W2`, indicating the amount paid will be part of a USA Federal Form W2
 
  report for the `Entity` involved.
 
  
 
* `Accountant-Advises-No-1099`, indicating that the circumstances and rules
 
  seem to indicate a USA Federal Form 1099 should be issued for the `Entity`
 
  involved, but an outside accountant advised that no 1099 need be issues for
 
  this `Entity`.
 

	
 
* `Bank-Transfer`, indicating that the amount is a transfer between two
 
  banking accounts under the control of the NPO itself.
 

	
 
* `Foreign-Individual-Contractor`, indicating that the NPO has established
 
  that the `Entity` is a contractor residing outside the USA who is not a USA
 
  citizen and does not for any reason pay taxes in the USA.
 

	
 
* `Foreign-Corporation`, indicating that the NPO has established
 
  that the `Entity` is a corporation outside the USA.
 

	
 
* `USA-Corporation`, indicating that the NPO has established that the
 
  `Entity` is an incorporated entity the USA (i.e., "Inc."), and therefore no
 
  1099 is required.
 

	
 
* `USA-501c3`, , indicating that the NPO has established that the `Entity`
 
* `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
 
* `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
 
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).
 
[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:
 

	
 
* 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:`] tag.
 

	
 
#### NEVER CHARGED Payee
 

	
 
The only exception to the standard tagging requirement is when the payee has
...
 
@@ -409,49 +409,49 @@ situation where the books included this charge, but the books were already
 
closed for the financial period (e.g., the books had already been audited).
 
Changing the payee was a method for documenting the expense.  You might use
 
it like this:
 

	
 
    2011/05/28 My Bad Billing Hosting - NEVER CHARGED
 
        Liabilities:Credit Card:Visa            $-100.00
 
        Expenses:Conservancy:Hosting             $100.00
 

	
 
    2012/01/01 My Bad Billing Hosting - REVERSAL - NEVER CHARGED
 
        Liabilities:Credit Card:Visa             $100.00
 
        Expenses:Conservancy:Hosting            $-100.00
 

	
 
However, going forward, you'd likely never enter anything the ledger
 
**until** you had real proof via an Invoice, Receipt or Statement that showed
 
the Expense did/should occur.  This use of `NEVER CHARGED` in the payee is
 
thus deprecated.
 

	
 
#### Income Account Documentation
 

	
 
Each `Income:` account must have the following tags:
 

	
 
* One of: [`Invoice:`](#invoice-tag),
 
  [`PurchaseOrder:`](#purchase-order-tag),
 
  [`Statement:`](#statement-tag) or
 
  [`Contract`](#contract-tag).  (Exceptions to this requirement are as follows:
 
  [`Contract`](#contract-tag).  Exceptions to this requirement are as follows:
 
     + the income generated from the transaction is less than $800, or
 
     + the `IncomeType` is `RBI` and the income is for a defined, public
 
       program (such as conference registration)
 

	
 
* 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/'
 

	
0 comments (0 inline, 0 general)