summaryrefslogtreecommitdiff
path: root/doc/Ledger.scriv/136.rtfd/TXT.rtf
diff options
context:
space:
mode:
Diffstat (limited to 'doc/Ledger.scriv/136.rtfd/TXT.rtf')
-rw-r--r--doc/Ledger.scriv/136.rtfd/TXT.rtf57
1 files changed, 57 insertions, 0 deletions
diff --git a/doc/Ledger.scriv/136.rtfd/TXT.rtf b/doc/Ledger.scriv/136.rtfd/TXT.rtf
new file mode 100644
index 00000000..339e90d4
--- /dev/null
+++ b/doc/Ledger.scriv/136.rtfd/TXT.rtf
@@ -0,0 +1,57 @@
+{\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 The @command\{xact\} commands simplifies the creation of new transactions.\
+It works on the principle that 80% of all postings are variants of\
+earlier postings. Here's how it works:\
+\
+Say you currently have this posting in your ledger file:\
+\
+@smallexample\
+2004/03/15 * Viva Italiano\
+ Expenses:Food $12.45\
+ Expenses:Tips $2.55\
+ Liabilities:MasterCard $-15.00\
+@end smallexample\
+\
+Now it's @samp\{2004/4/9\}, and you've just eating at @samp\{Viva\
+Italiano\} again. The epost amounts are different, but the overall\
+form is the same. With the @command\{xact\} command you can type:\
+\
+@example\
+ledger xact 2004/4/9 viva food 11 tips 2.50\
+@end example\
+\
+This produces the following output:\
+\
+@smallexample\
+2004/04/09 Viva Italiano\
+ Expenses:Food $11.00\
+ Expenses:Tips $2.50\
+ Liabilities:MasterCard $-13.50\
+@end smallexample\
+\
+It works by finding a past posting matching the regular expression\
+@samp\{viva\}, and assuming that any accounts or amounts specified will\
+be similar to that earlier posting. If Ledger does not succeed in\
+generating a new transaction, an error is printed and the exit code is set\
+to @samp\{1\}.\
+\
+There is a shell script in the distribution's @file\{scripts\} directory\
+called @file\{xact\}, which simplifies the task of adding a new transaction\
+to your ledger. It launches @command\{vi\} to confirm that the transaction\
+looks appropriate.\
+\
+Here are a few more examples of the @command\{xact\} command, assuming\
+the above journal transaction:\
+\
+@example\
+ledger xact 4/9 viva 11.50\
+ledger xact 4/9 viva 11.50 checking # (from `checking')\
+ledger xact 4/9 viva food 11.50 tips 8\
+ledger xact 4/9 viva food 11.50 tips 8 cash\
+ledger xact 4/9 viva food $11.50 tips $8 cash\
+ledger xact 4/9 viva dining "DM 11.50"\
+@end example} \ No newline at end of file