70 lines
No EOL
3.7 KiB
Text
70 lines
No EOL
3.7 KiB
Text
{\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 While the @command\{balance\} command can be very handy for checking\
|
|
account totals, by far the most powerful of Ledger's reporting tools\
|
|
is the @command\{register\} command. In fact, internally both commands\
|
|
use the same logic, but report the results differently:\
|
|
@command\{balance\} shows the summary totals, while @command\{register\}\
|
|
reports each posting and how it contributes to that total.\
|
|
\
|
|
Paradoxically, the most basic form of @command\{register\} is almost\
|
|
never used, since it displays every posting:\
|
|
\
|
|
@example\
|
|
ledger reg\
|
|
@end example\
|
|
\
|
|
@command\{reg\} is a short-hand for @command\{register\}. This command\
|
|
reports:\
|
|
\
|
|
@smallexample\
|
|
2004/05/01 Checking balance Assets:Bank:Checking $1,000.00 $1,000.00\
|
|
Equity:Opening Balan.. $-1,000.00 0\
|
|
2004/05/01 Investment balance Assets:Brokerage 50 AAPL 50 AAPL\
|
|
Equity:Opening Balan.. $-1,500.00 $-1,500.00\
|
|
50 AAPL\
|
|
2004/05/14 Pay day Assets:Bank:Checking $500.00 $-1,000.00\
|
|
50 AAPL\
|
|
Income:Salary $-500.00 $-1,500.00\
|
|
50 AAPL\
|
|
2004/05/27 Book Store Expenses:Books $20.00 $-1,480.00\
|
|
50 AAPL\
|
|
Liabilities:MasterCard $-20.00 $-1,500.00\
|
|
50 AAPL\
|
|
(Liabilities:Taxes) $-2.00 $-1,502.00\
|
|
50 AAPL\
|
|
2004/05/27 Credit card company Liabilities:MasterCard $20.00 $-1,482.00\
|
|
50 AAPL\
|
|
Assets:Bank:Checking $-20.00 $-1,502.00\
|
|
50 AAPL\
|
|
@end smallexample\
|
|
\
|
|
This rather verbose output shows every account posting in\
|
|
@file\{sample.dat\}, and how it affects the running total. The final\
|
|
total is identical to what we saw with the plain @command\{balance\}\
|
|
command. To see how things really balance, we can use @samp\{--real\
|
|
-B\}, just as we did with @command\{balance\}:\
|
|
\
|
|
@example\
|
|
ledger --real -B reg\
|
|
@end example\
|
|
\
|
|
Reports:\
|
|
\
|
|
@smallexample\
|
|
2004/05/01 Checking balance Assets:Bank:Checking $1,000.00 $1,000.00\
|
|
Equity:Opening Balan.. $-1,000.00 0\
|
|
2004/05/01 Investment balance Assets:Brokerage $1,500.00 $1,500.00\
|
|
Equity:Opening Balan.. $-1,500.00 0\
|
|
2004/05/14 Pay day Assets:Bank:Checking $500.00 $500.00\
|
|
Income:Salary $-500.00 0\
|
|
2004/05/27 Book Store Expenses:Books $20.00 $20.00\
|
|
Liabilities:MasterCard $-20.00 0\
|
|
2004/05/27 Credit card company Liabilities:MasterCard $20.00 $20.00\
|
|
Assets:Bank:Checking $-20.00 0\
|
|
@end smallexample\
|
|
\
|
|
Here we see that everything balances to zero in the end, as it must.} |