From 85016f37549a53c1c967dffce81c3f31a520e731 2013-04-29 19:15:10 From: Bradley M. Kuhn Date: 2013-04-29 19:15:10 Subject: [PATCH] Basic organizational expense accounts, with a tester function for assert. Note that Expense account entries need to be tagged with an Invoice, Receipt, or Statement tag (those tag declarations will be added in next commit). payee with "NEVER CHARGED" ========================== The only exception is when the payee has been modified to indicate that the expense was "NEVER CHARGED". This was a special-case we encountered where we were expecting something, they never invoiced us, and it turns out the thing to be invoiced for never happened. Typically, we'd just remove the entry from the Ledger file, and allow the VCS to log the fact that we thought we'd be charged and weren't. However, in this case, the expense had been post-audit and therefore was a permanent fixture on our books. Changing the payee allowed it to pass checks. However, going forward, we'd likely never enter anything the ledger UNTIL we had real proof via an Invoice, Receipt or Statement that showed the Expense did/should occur. --- diff --git a/accounts/config/config-npo.ledger b/accounts/config/config-npo.ledger index 669297684ec3ae0c3c76d635385a18b881f975ba..cd04e46c65b1043cba1f23eced845a43df45a5d5 100644 --- a/accounts/config/config-npo.ledger +++ b/accounts/config/config-npo.ledger @@ -31,3 +31,31 @@ account Asset:Checking ; Organizational accrual accounts +; Organization 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: +; http://bugs.ledger-cli.org/show_bug.cgi?id=953 + +define expenseChecker() = (tag("Receipt") !~ /^\s*$/ or tag("Invoice") !~ /^\s*$/ or tag("Statement") !~ /^\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:Occupancy + assert expenseChecker() or payee =~ /NEVER CHARGED/ + note Main Organization's Occupancy for Office Space and the like