Merge commit '4966c7f' into update-docs

This commit is contained in:
Peter Feigl 2014-03-04 15:02:11 +01:00
commit a7034b68a1

View file

@ -240,9 +240,9 @@ accounting tools.
The next step up from a checkbook journal, is a journal that keeps The next step up from a checkbook journal, is a journal that keeps
track of all your accounts, not just checking. In such a journal, you track of all your accounts, not just checking. In such a journal, you
record not only who gets paid---in the case of a debit---but where the record not only who gets paid---in the case of a debit---but where the
money came from. In a checkbook journal, its assumed that all the money came from. In a checkbook journal, it's assumed that all the
money comes from your checking account. But in a general journal, you money comes from your checking account. But in a general journal, you
write posting two-lines: the source account and target account. write postings in two lines: the source account and target account.
@emph{There must always be a debit from at least one account for every @emph{There must always be a debit from at least one account for every
credit made to another account}. This is what is meant by credit made to another account}. This is what is meant by
``double-entry'' accounting: the journal must always balance to zero, ``double-entry'' accounting: the journal must always balance to zero,
@ -288,8 +288,8 @@ Most private people consider an account to be something that holds
money at an institution for them. Ledger uses a more general money at an institution for them. Ledger uses a more general
definition of the word. An account is anywhere money can go. Other definition of the word. An account is anywhere money can go. Other
finance programs use ``categories'', Ledger uses accounts. So, for finance programs use ``categories'', Ledger uses accounts. So, for
example, if you buy some groceries at Trader Joe's then more groceries example, if you buy some groceries at Trader Joe's, then more groceries
at Whole Foods Markets you might assign the transactions like this at Whole Food Market, you might assign the transactions like this
@smallexample @c input:validate @smallexample @c input:validate
2011/03/15 Trader Joe's 2011/03/15 Trader Joe's
@ -385,14 +385,14 @@ $ ./configure && make install
Ledger has a complete online help system based on GNU Info. This Ledger has a complete online help system based on GNU Info. This
manual can be searched directly from the command line using the manual can be searched directly from the command line using the
following options: @code{ledger --help} bring up this entire manual in following options: @code{ledger --help} brings up this entire manual in
your tty. your TTY.
If you need help on how to use Ledger, or run into problems, you can If you need help on how to use Ledger, or run into problems, you can
join the Ledger mailing list at join the Ledger mailing list at
@url{http://groups.google.com/group/ledger-cli}. @url{http://groups.google.com/group/ledger-cli}.
You can also find help at the @code{#ledger} channel on the IRC server You can also find help in the @code{#ledger} channel on the IRC server
@code{irc.freenode.net}. @code{irc.freenode.net}.
@node Ledger Tutorial, Principles of Accounting with Ledger, Introduction to Ledger, Top @node Ledger Tutorial, Principles of Accounting with Ledger, Introduction to Ledger, Top
@ -430,11 +430,11 @@ If you would rather start with your own journal right away please
Please note that as a command line program, Ledger is controlled from Please note that as a command line program, Ledger is controlled from
your shell. There are several different command shells that all your shell. There are several different command shells that all
behave slightly differently with respect to some special characters. behave slightly differently with respect to some special characters.
In particular, the BASH shell will interpret @samp{$} signs In particular, the ``bash'' shell will interpret @samp{$} signs
differently than ledger and they must be escaped to reach the actual differently than ledger and they must be escaped to reach the actual
program. Another example is zsh, which will interpret @samp{^} program. Another example is ``zsh'', which will interpret @samp{^}
differently than ledger expects. In all cases that follow you should differently than ledger expects. In all cases that follow you should
take that into account when entering the command line arguments given. take that into account when entering the command line arguments as given.
There are too many variations between shells to give concrete examples There are too many variations between shells to give concrete examples
for each. for each.
@ -645,7 +645,7 @@ shows the ``cleared'' balance.
@cindex currency symbol display on windows @cindex currency symbol display on windows
Using ledger under the windows command shell has one significant Using ledger under the windows command shell has one significant
limitation. CMD.exe is limited to standard ASCII characters and as limitation. CMD.EXE is limited to standard ASCII characters and as
such cannot display any currency symbols other than dollar signs such cannot display any currency symbols other than dollar signs
@samp{$}. @samp{$}.
@ -669,9 +669,9 @@ such cannot display any currency symbols other than dollar signs
Accounting is simply tracking your money. It can range from nothing, Accounting is simply tracking your money. It can range from nothing,
and just waiting for automatic overdraft protection to kick in, or and just waiting for automatic overdraft protection to kick in, or
not, to a full blown double entry accounting system. Ledger not, to a full-blown double-entry accounting system. Ledger
accomplishes the latter. With ledger you can handle your personal accomplishes the latter. With ledger you can handle your personal
finances or your businesses. Double-entry accounting scales. finances or your business's. Double-entry accounting scales.
@node Stating where money goes, Assets and Liabilities, Accounting with Ledger, Principles of Accounting with Ledger @node Stating where money goes, Assets and Liabilities, Accounting with Ledger, Principles of Accounting with Ledger
@section Stating where money goes @section Stating where money goes
@ -1030,7 +1030,7 @@ be any commodity, in which case the balance will be computed in terms
of that commodity. The usual way to specify prices is with a price of that commodity. The usual way to specify prices is with a price
history file, which might look like this: history file, which might look like this:
@smallexample @smallexample @c input:validate
P 2004/06/21 02:18:01 FEQTX $22.49 P 2004/06/21 02:18:01 FEQTX $22.49
P 2004/06/21 02:18:01 BORL $6.20 P 2004/06/21 02:18:01 BORL $6.20
P 2004/06/21 02:18:02 AAPL $32.91 P 2004/06/21 02:18:02 AAPL $32.91
@ -1088,7 +1088,7 @@ that commodity on that day. It is also possible, by recording price
details in a ledger file, to specify other prices for commodities at details in a ledger file, to specify other prices for commodities at
any given time. Such price transactions might look like those below: any given time. Such price transactions might look like those below:
@smallexample @smallexample @c input:validate
P 2004/06/21 02:17:58 TWCUX $27.76 P 2004/06/21 02:17:58 TWCUX $27.76
P 2004/06/21 02:17:59 AGTHX $25.41 P 2004/06/21 02:17:59 AGTHX $25.41
P 2004/06/21 02:18:00 OPTFX $39.31 P 2004/06/21 02:18:00 OPTFX $39.31
@ -1141,7 +1141,7 @@ other equivalencies is simple. The following is an example that
creates data equivalencies, helpful for tracking bytes, kilobytes, creates data equivalencies, helpful for tracking bytes, kilobytes,
megabytes, and more: megabytes, and more:
@smallexample @smallexample @c input:validate
C 1.00 Kb = 1024 b C 1.00 Kb = 1024 b
C 1.00 Mb = 1024 Kb C 1.00 Mb = 1024 Kb
C 1.00 Gb = 1024 Mb C 1.00 Gb = 1024 Mb
@ -1182,8 +1182,8 @@ Tavern in order to add to your Inventory account. Note that you don't
have to use @samp{Places:Black's Tavern} as the source account. You have to use @samp{Places:Black's Tavern} as the source account. You
could use @samp{EverQuest:System} to represent the fact that you could use @samp{EverQuest:System} to represent the fact that you
acquired them online. The only purpose for choosing one kind of acquired them online. The only purpose for choosing one kind of
source account over another is for generate more informative reports source account over another is to generate more informative reports
later on. The more you know, the better analysis you can perform. later on. The more you know, the better the analysis you can perform.
If you later sell some of these items to another player, the If you later sell some of these items to another player, the
transaction would look like: transaction would look like:
@ -1216,9 +1216,9 @@ account---because starting balances can't come out of nowhere.
When you first start your ledger, you will likely already have money When you first start your ledger, you will likely already have money
in some of your accounts. Let's say there's $100 in your checking in some of your accounts. Let's say there's $100 in your checking
account; then add a transaction to your ledger to reflect this amount. account; then add a transaction to your ledger to reflect this amount.
Where will money come from? The answer: your equity. Where will the money come from? The answer: your equity.
@smallexample @smallexample @c input:validate
10/2 Opening Balance 10/2 Opening Balance
Assets:Checking $100.00 Assets:Checking $100.00
Equity:Opening Balances Equity:Opening Balances
@ -1258,7 +1258,7 @@ One solution is: don't bother. Move your spending to a debit card,
but in general ignore cash. Once you withdraw it from the ATM, mark but in general ignore cash. Once you withdraw it from the ATM, mark
it as already spent to an @samp{Expenses:Cash} category: it as already spent to an @samp{Expenses:Cash} category:
@smallexample @smallexample @c input:validate
2004/03/15 ATM 2004/03/15 ATM
Expenses:Cash $100.00 Expenses:Cash $100.00
Assets:Checking Assets:Checking
@ -1268,7 +1268,7 @@ If at some point you make a large cash expense that you want to track,
just @emph{move} the amount of the expense from @samp{Expenses:Cash} just @emph{move} the amount of the expense from @samp{Expenses:Cash}
into the target account: into the target account:
@smallexample @smallexample @c input:validate
2004/03/20 Somebody 2004/03/20 Somebody
Expenses:Food $65.00 Expenses:Food $65.00
Expenses:Cash Expenses:Cash
@ -1302,7 +1302,7 @@ reserves resources for later:
@item Community fund @item Community fund
@end itemize @end itemize
The problem with this kind of setup is that when you spend money, it The problem with this kind of setup is that, when you spend money, it
comes from two or more places at once: the account and the fund. And comes from two or more places at once: the account and the fund. And
yet, the correlation of amounts between funds and accounts is rarely yet, the correlation of amounts between funds and accounts is rarely
one-to-one. What if the school fund has @samp{$500.00}, but one-to-one. What if the school fund has @samp{$500.00}, but
@ -1395,7 +1395,7 @@ into, and spend money from, the @samp{Funds:School} fund:
Assets:Checking $100.00 Assets:Checking $100.00
Income:Donations Income:Donations
2004/03/25 (Funds:Teachers) Donations 2004/03/25 (Funds:Building) Donations
Assets:Checking $20.00 Assets:Checking $20.00
Income:Donations Income:Donations
@ -1405,13 +1405,13 @@ into, and spend money from, the @samp{Funds:School} fund:
@end smallexample @end smallexample
Note how the accounts now relate only to the real accounts, and any Note how the accounts now relate only to the real accounts, and any
balance or registers reports will reflect this. That the transactions balance or register reports will reflect this. That the transactions
relate to a particular fund is kept only in the code. relate to a particular fund is kept only in the code.
@findex --payee=code @findex --payee=code
@findex --by-payee @findex --by-payee
How does this become a fund report? By using the How does this become a fund report? By using the
@option{--code-as-payee} option, you can generate a register report @option{--payee=code} option, you can generate a register report
where the payee for each posting shows the code. Alone, this is not where the payee for each posting shows the code. Alone, this is not
terribly interesting; but when combined with the @option{--by-payee terribly interesting; but when combined with the @option{--by-payee
(-P)} option, you will now see account subtotals for any postings (-P)} option, you will now see account subtotals for any postings
@ -1423,8 +1423,8 @@ $ ledger --payee=code -P reg ^Assets
@end smallexample @end smallexample
@smallexample @c output:AD068BA @smallexample @c output:AD068BA
04-Mar-25 Funds:School Assets:Checking $50.00 $50.00 04-Mar-25 Funds:Building Assets:Checking $20.00 $20.00
04-Mar-25 Funds:Teachers Assets:Checking $20.00 $70.00 04-Mar-25 Funds:School Assets:Checking $50.00 $70.00
@end smallexample @end smallexample
Or to see a particular fund's expenses, the @samp{School} fund in this Or to see a particular fund's expenses, the @samp{School} fund in this
@ -1492,7 +1492,7 @@ posting.
@section The Most Basic Entry @section The Most Basic Entry
Here is the Pacific Bell example from above, given as a Ledger Here is the Pacific Bell example from above, given as a Ledger
posting, with the additional of a check number: posting, with the addition of a check number:
@smallexample @c input:validate @smallexample @c input:validate
9/29 (1023) Pacific Bell 9/29 (1023) Pacific Bell