diff --git a/accounts/config/config-accounts.ledger b/accounts/config/config-accounts.ledger index 34b269f086379f1bdc1b486278b30d2bc4a79c62..c51cf3ad682b3484fa69132ebb65580c8c30f800 100644 --- a/accounts/config/config-accounts.ledger +++ b/accounts/config/config-accounts.ledger @@ -41,7 +41,7 @@ account Accrued:Accounts Receivable:Main Org ; to the assert in ever 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*$/) +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 diff --git a/accounts/config/config-tags.ledger b/accounts/config/config-tags.ledger index d222b789009045f12bcdac5433fa1f5e2496debf..f017131d59f3cd3a83234051d42052f027fe46d2 100644 --- a/accounts/config/config-tags.ledger +++ b/accounts/config/config-tags.ledger @@ -39,3 +39,11 @@ tag Invoice tag IncomeType assert value =~ /^(Donations|RBI|UBTI)$/ + +; Program tag must match the general format of a ledger account as an +; assertion, but we at least check known names of programs, so that warnings +; are produced if a new program never seen before is encountered. + +tag Program + assert value =~ /[ A-z0-9\-]+(:[ A-z0-9\-]+)*/ + check value =~ /^(Main Org:(Overhead|Direct Fundraising))$/ diff --git a/accounts/org/main-org.ledger b/accounts/org/main-org.ledger index 18e22a4cd764a23a8c06347170a8c9777b67f6c6..94d4ac600b2c753227938dd38de7539dab7352f5 100644 --- a/accounts/org/main-org.ledger +++ b/accounts/org/main-org.ledger @@ -6,15 +6,18 @@ 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 + ;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 + ;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 + ;Program: Main Org:Overhead 2012-05-03 Sir Moneybags ;Entity: Sir-Moneybags @@ -22,3 +25,4 @@ Accrued:Accounts Receivable:Main Org $100,000.00 Income:Main Org:Donations $-100,000.00 ;IncomeType: Donations + ;Program: Main Org:Direct Fundraising diff --git a/npo-ledger-cli-tutorial.md b/npo-ledger-cli-tutorial.md index 35ea4f5cedd0922e48cd4ed938ba5b413eb51b0f..d808d0e713bc5504c9a01fd98f47ede5cd37aede 100644 --- a/npo-ledger-cli-tutorial.md +++ b/npo-ledger-cli-tutorial.md @@ -261,6 +261,18 @@ relatively simple change to `config-tags.ledger`, though, to support other income types, or to change it entirely to handle use-cases other than USA Form 990 filing. +#### 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). + ### Expense Account Documentation Each Expense account entries need to be tagged with an @@ -312,6 +324,26 @@ However, going forward, you'd likely never enter anything the ledger the Expense did/should occur. This use of `NEVER CHARGED` in the payee is thus deprecated. +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 hese: + + $ ledger -f accounts/books.ledger --group-by 'tag("Program")' reg '/^Expense/' + +FIXME: example output + Copyright and License of This File ----------------------------------