summaryrefslogtreecommitdiff
path: root/doc/Ledger.scriv/199.rtfd
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-25 23:08:07 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-25 23:11:30 -0400
commit1f5ceb0db50df9ad0f9048ee02ad749507cbd737 (patch)
treea8609fdcd28aa4d371aebf8a9867e43014e652f1 /doc/Ledger.scriv/199.rtfd
parent9dadaebfeb461ba795124281018d0f7eac200cf4 (diff)
downloadfork-ledger-1f5ceb0db50df9ad0f9048ee02ad749507cbd737.tar.gz
fork-ledger-1f5ceb0db50df9ad0f9048ee02ad749507cbd737.tar.bz2
fork-ledger-1f5ceb0db50df9ad0f9048ee02ad749507cbd737.zip
Added beginning draft of manual for 3.0
This is being kept in Scrivener format, for ease of writing.
Diffstat (limited to 'doc/Ledger.scriv/199.rtfd')
-rw-r--r--doc/Ledger.scriv/199.rtfd/TXT.rtf79
1 files changed, 79 insertions, 0 deletions
diff --git a/doc/Ledger.scriv/199.rtfd/TXT.rtf b/doc/Ledger.scriv/199.rtfd/TXT.rtf
new file mode 100644
index 00000000..8a92a803
--- /dev/null
+++ b/doc/Ledger.scriv/199.rtfd/TXT.rtf
@@ -0,0 +1,79 @@
+{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf460
+{\fonttbl\f0\fmodern\fcharset0 Courier;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sl264\slmult1\ql\qnatural\pardirnatural
+
+\f0\fs28 \cf0 As a Bah\'e1'\'ed, I need to compute Huq\'faqu'll\'e1h whenever I acquire assets.\
+It is similar to tithing for Jews and Christians, or to Zak\'e1t for\
+Muslims. The epost details of computing Huq\'faqu'll\'e1h are somewhat\
+complex, but if you have further interest, please consult the Web.\
+\
+Ledger makes this otherwise difficult law very easy. Just set up an\
+automated posting at the top of your ledger file:\
+\
+@smallexample\
+; This automated transaction will compute Huq\'faqu'll\'e1h based on this\
+; journal's postings. Any that match will affect the\
+; Liabilities:Huququ'llah account by 19% of the value of that\
+; posting.\
+\
+= /^(?:Income:|Expenses:(?:Business|Rent$|Furnishings|Taxes|Insurance))/\
+ (Liabilities:Huququ'llah) 0.19\
+@end smallexample\
+\
+This automated posting works by looking at each posting in the\
+ledger file. If any match the given value expression, 19% of the\
+posting's value is applied to the @samp\{Liabilities:Huququ'llah\}\
+account. So, if $1000 is earned from @samp\{Income:Salary\}, $190 is\
+added to @samp\{Liabilities:Huq\'faqu'll\'e1h\}; if $1000 is spent on Rent,\
+$190 is subtracted. The ultimate balance of Huq\'faqu'll\'e1h reflects how\
+much is owed in order to fulfill one's obligation to Huq\'faqu'll\'e1h.\
+When ready to pay, just write a check to cover the amount shown in\
+@samp\{Liabilities:Huququ'llah\}. That transaction would look like:\
+\
+@smallexample\
+2003/01/01 (101) Baha'i Huq\'faqu'll\'e1h Trust\
+ Liabilities:Huququ'llah $1,000.00\
+ Assets:Checking\
+@end smallexample\
+\
+That's it. To see how much Huq\'faq is currently owed based on your\
+ledger transactions, use:\
+\
+@example\
+ledger balance Liabilities:Huquq\
+@end example\
+\
+This works fine, but omits one aspect of the law: that Huquq is only\
+due once the liability exceeds the value of 19 mithq\'e1ls of gold (which\
+is roughly 2.22 ounces). So what we want is for the liability to\
+appear in the balance report only when it exceeds the present day\
+value of 2.22 ounces of gold. This can be accomplished using the\
+command:\
+\
+@smallexample\
+ledger -Q -t "/Liab.*Huquq/?(a/P@\{2.22 AU@\}<=@\{-1.0@\}&a):a" -s bal liab\
+@end smallexample\
+\
+With this command, the current price for gold is downloaded, and the\
+Huq\'faqu'll\'e1h is reported only if its value exceeds that of 2.22 ounces\
+of gold. If you wish the liability to be reflected in the parent\
+subtotal either way, use this instead:\
+\
+@smallexample\
+ledger -Q -T "/Liab.*Huquq/?(O/P@\{2.22 AU@\}<=@\{-1.0@\}&O):O" -s bal liab\
+@end smallexample\
+\
+In some cases, you may wish to refer to the account of whichever\
+posting matched your automated transaction's value expression. To do\
+this, use the special account name @samp\{$account\}:\
+\
+@smallexample\
+= /^Some:Long:Account:Name/\
+ [$account] -0.10\
+ [Savings] 0.10\
+@end smallexample\
+\
+This example causes 10% of the matching account's total to be deferred\
+to the @samp\{Savings\} account---as a balanced virtual posting,\
+which may be excluded from reports by using @option\{--real\}.} \ No newline at end of file