From 18a4125ff756cc2d3502ceaecd89ec32de62af3f 2013-05-10 21:04:15 From: Bradley M. Kuhn Date: 2013-05-10 21:04:15 Subject: [PATCH] Initial documentation for Income accounts, including tagging requirements. Implemented in the config-accounts.ledger is an incomeChecker() function that matches the documentation requirements. --- diff --git a/accounts/config/config-accounts.ledger b/accounts/config/config-accounts.ledger index ebf2a9975ab90cb35d4f3b3777cae1ef67e14a1e..656ac76039f72100579b1f7b88b1a1c474f47955 100644 --- a/accounts/config/config-accounts.ledger +++ b/accounts/config/config-accounts.ledger @@ -81,6 +81,8 @@ account Expense:Main Org:Occupancy ; Organizational Income Accounts +define incomeChecker(amt) = (tag("Entity") !~ /^\s*$/ or (amt > -800.00 and amt < 800.00)) and tag("IncomeType") !~ /^\s*$/ and tag("Program") !~ /^\s*$/ + account Income:Main Org:Donations - assert tag("IncomeType") =~ /^Donations$/ + assert incomeChecker(amount) and tag("IncomeType") =~ /^Donations$/ note Donation income to the Main Org. diff --git a/npo-ledger-cli-tutorial.md b/npo-ledger-cli-tutorial.md index ebe70f3a826f2c61c2c177fa3920f576e6213c40..c29b90cab5b62e4949fe4b1c97bae8fb6c512741 100644 --- a/npo-ledger-cli-tutorial.md +++ b/npo-ledger-cli-tutorial.md @@ -420,6 +420,25 @@ 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. +#### 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: + + 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 --------------------