From 6b75627d4092a735718cfef56699dca69fea5c4f 2013-04-29 21:44:04 From: Bradley M. Kuhn Date: 2013-04-29 21:44:04 Subject: [PATCH] Add example that explains very briefly how tagging works in Ledger CLI. Since this system relies so heavily on tagging, even though we assume the reader is generally familiar with Ledger CLI, it's worth ensuring they know the basics of how tagging works. Also added herein is the example used in the text over to the Ledger file itself. --- diff --git a/accounts/org/main-org.ledger b/accounts/org/main-org.ledger index 08fc0d803c83ff29c18e115fbe2ade88b42529ff..020d1ad452309fdcfa8179032e0d7f6e7ab20f61 100644 --- a/accounts/org/main-org.ledger +++ b/accounts/org/main-org.ledger @@ -16,3 +16,9 @@ Liabilities:Credit Card:Visa $100.00 Expense:Main Org:Hosting $-100.00 +2012-05-03 Sir Moneybags + ;Entity: Sir-Moneybags + ;Invoice: accounts/documentation/org/invoices/2012-05-30_moneybags-invoice_as-sent.txt + Accrued:Accounts Receivable:Main Org $100,000.00 + Income:Main Org:Donations $-100,000.00 + ;IncomeType: Donations diff --git a/npo-ledger-cli-tutorial.md b/npo-ledger-cli-tutorial.md index 3787f374f4580f981fa37f550f3de388c6ae1581..47af519d26e8641d1a634d9d9a1eb2cc5aeb9c50 100644 --- a/npo-ledger-cli-tutorial.md +++ b/npo-ledger-cli-tutorial.md @@ -141,14 +141,39 @@ run `ledger` commands against it, separately and without access to the other `.ledger` files of the NPO. -Proper Documentation For Accounts ---------------------------------- +Proper Documentation For All Transactions +----------------------------------------- Ledger CLI offers a flexible structure of tagging any entry, including separate tags for parts of a split transaction. This system uses those tags to ensure proper documentation is included for each financial transaction that occurs for the organization. +Note that since Ledger CLI is a complete double-entry accounting system, each +transaction can correspond to multiple entries in the general ledger. The +data entry format of Ledger CLI lists each double-entry accounting +transaction in a text file. + +Documentation may in fact differ for entries within the transaction. Ledger +CLI's tagging structure is flexible in this regard: each portion of a +double-entry transaction can carry the same tag or a different tag. For +example, in this entry: + + 2012-05-03 Sir Moneybags + ;Entity: Sir-Moneybags + ;Invoice: accounts/documentation/org/invoices/2012-05-30_moneybags-invoice_as-sent.txt + Accrued:Accounts Receivable:Conservancy $100,000.00 + Income:Main Org:Donations $-100,000.00 + ;IncomeType: Donations + +The portion of the transaction that credits the `Income:Main Org:Donations` +has three tags: [`Entity`](#entity-tag), [`Invoice`](#invoice-tag) and +[`IncomeType`](#income-type). The `Entity` and `Invoice` tags, since they're +listed at the top of the transaction, propagate through and apply to both +sides. But, the `IncomeType` tag, which has no meaning for `Accrued:` +accounts, so it is applied only to the `Income:Main Org:Donations` part of +the transaction. + ### Tags Used In This System A list of tags can be found in the file `accounts/config/config-tags.ledger`