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
...
 
@@ -2,25 +2,25 @@
 
; -*- 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 == "$"
...
 
@@ -36,25 +36,25 @@ account Liabilities:Credit Card:Visa
 

	
 
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
accounts/config/config-commodities.ledger
Show inline comments
...
 
@@ -2,22 +2,22 @@
 
; -*- 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
...
 
@@ -2,25 +2,25 @@
 
; -*- 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 =~ /[^\/][^ ]+(\/[^ ])+/
npo-ledger-cli-tutorial.md
Show inline comments
...
 
@@ -42,25 +42,25 @@ 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
...
 
@@ -329,54 +329,54 @@ The possible values for this field are:
 

	
 
* `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
 

	
...
 
@@ -421,25 +421,25 @@ it like this:
 
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
0 comments (0 inline, 0 general)