;doc: update links to journal manual
This commit is contained in:
parent
62660577c3
commit
fbf9418756
@ -388,7 +388,7 @@ Amount -- AmountStyle
|
|||||||
|
|
||||||
[package](http://hackage.haskell.org/package/hledger),
|
[package](http://hackage.haskell.org/package/hledger),
|
||||||
[code](https://github.com/simonmichael/hledger/tree/master/hledger),
|
[code](https://github.com/simonmichael/hledger/tree/master/hledger),
|
||||||
[manual](http://hledger.org/manual.html#hledger)
|
[manual](http://hledger.org/hledger.html)
|
||||||
|
|
||||||
hledger's command line interface, and command line options and utilities for other hledger tools.
|
hledger's command line interface, and command line options and utilities for other hledger tools.
|
||||||
|
|
||||||
@ -414,7 +414,7 @@ and [hledger-lib:Hledger.Utils](https://github.com/simonmichael/hledger/blob/mas
|
|||||||
|
|
||||||
[package](http://hackage.haskell.org/package/hledger-ui),
|
[package](http://hackage.haskell.org/package/hledger-ui),
|
||||||
[code](https://github.com/simonmichael/hledger/tree/master/hledger-ui),
|
[code](https://github.com/simonmichael/hledger/tree/master/hledger-ui),
|
||||||
[manual](http://hledger.org/manual.html#hledger-ui)
|
[manual](http://hledger.org/hledger-ui.html)
|
||||||
|
|
||||||
A terminal interface.
|
A terminal interface.
|
||||||
|
|
||||||
@ -422,7 +422,7 @@ A terminal interface.
|
|||||||
|
|
||||||
[package](http://hackage.haskell.org/package/hledger-web),
|
[package](http://hackage.haskell.org/package/hledger-web),
|
||||||
[code](https://github.com/simonmichael/hledger/tree/master/hledger-web),
|
[code](https://github.com/simonmichael/hledger/tree/master/hledger-web),
|
||||||
[manual](http://hledger.org/manual.html#hledger-web)
|
[manual](http://hledger.org/hledger-web.html)
|
||||||
|
|
||||||
A web interface.
|
A web interface.
|
||||||
hledger-web starts a web server built with the yesod framework,
|
hledger-web starts a web server built with the yesod framework,
|
||||||
@ -431,13 +431,13 @@ It reads the journal file(s) at startup and again whenever they change.
|
|||||||
It can also write (append) new transactions to the journal file.
|
It can also write (append) new transactions to the journal file.
|
||||||
|
|
||||||
There are two main views, which can be filtered with
|
There are two main views, which can be filtered with
|
||||||
[queries](http://hledger.org/manual.html#queries):
|
[queries](http://hledger.org/hledger.html#queries):
|
||||||
|
|
||||||
- [/journal](http://demo.hledger.org/journal), showing general journal entries (like `hledger print`)
|
- [/journal](http://demo.hledger.org/journal), showing general journal entries (like `hledger print`)
|
||||||
|
|
||||||
- [/register](http://demo.hledger.org/register?q=inacct:Expenses:Food),
|
- [/register](http://demo.hledger.org/register?q=inacct:Expenses:Food),
|
||||||
showing transactions affecting an account (slightly different from
|
showing transactions affecting an account (slightly different from
|
||||||
hledger's [register](http://hledger.org/manual.html#register) command, which shows postings).
|
hledger's [register](http://hledger.org/hledger.html#register) command, which shows postings).
|
||||||
|
|
||||||
There is also:
|
There is also:
|
||||||
|
|
||||||
@ -488,15 +488,6 @@ ghci> :main --serve
|
|||||||
(This rule also creates symbolic links to hledger-web's `config`, `messages`, `static` and `templates`
|
(This rule also creates symbolic links to hledger-web's `config`, `messages`, `static` and `templates`
|
||||||
directories, needed in developer mode, so it can run from the top directory. This may not work on Windows.)
|
directories, needed in developer mode, so it can run from the top directory. This may not work on Windows.)
|
||||||
|
|
||||||
#### hledger-api (old)
|
|
||||||
|
|
||||||
[package](http://hackage.haskell.org/package/hledger-api),
|
|
||||||
[code](https://github.com/simonmichael/hledger/tree/master/hledger-api),
|
|
||||||
[manual](http://hledger.org/manual.html#hledger-api)
|
|
||||||
|
|
||||||
A web API server. Uses the servant framework.
|
|
||||||
Retired as of 2019-09; use hledger-web instead.
|
|
||||||
|
|
||||||
### Quality
|
### Quality
|
||||||
|
|
||||||
Relevant tools include:
|
Relevant tools include:
|
||||||
|
|||||||
@ -117,7 +117,7 @@ m4_define({{_reportingoptions_}}, {{
|
|||||||
: multiperiod/multicolumn report by year
|
: multiperiod/multicolumn report by year
|
||||||
|
|
||||||
`-p --period=PERIODEXP`
|
`-p --period=PERIODEXP`
|
||||||
: set start date, end date, and/or reporting interval all at once using [period expressions](manual.html#period-expressions) syntax
|
: set start date, end date, and/or reporting interval all at once using [period expressions](#period-expressions) syntax
|
||||||
|
|
||||||
`--date2`
|
`--date2`
|
||||||
: match the secondary date instead (see command help for other effects)
|
: match the secondary date instead (see command help for other effects)
|
||||||
|
|||||||
@ -210,7 +210,7 @@ balances are what you would see on a bank statement for that account (unless dis
|
|||||||
a filter query). Period balances ignore transactions before the report start date, so they
|
a filter query). Period balances ignore transactions before the report start date, so they
|
||||||
show the change in balance during the report period. They are more useful eg when viewing a time log.
|
show the change in balance during the report period. They are more useful eg when viewing a time log.
|
||||||
|
|
||||||
`U` toggles filtering by [unmarked status](journal.html#status),
|
`U` toggles filtering by [unmarked status](hledger.html#status),
|
||||||
including or excluding unmarked postings in the balances.
|
including or excluding unmarked postings in the balances.
|
||||||
Similarly, `P` toggles pending postings,
|
Similarly, `P` toggles pending postings,
|
||||||
and `C` toggles cleared postings.
|
and `C` toggles cleared postings.
|
||||||
@ -218,7 +218,7 @@ and `C` toggles cleared postings.
|
|||||||
if you activate one or two status filters, only those postings are included;
|
if you activate one or two status filters, only those postings are included;
|
||||||
and if you activate all three, the filter is removed.)
|
and if you activate all three, the filter is removed.)
|
||||||
|
|
||||||
`R` toggles real mode, in which [virtual postings](journal.html#virtual-postings) are ignored.
|
`R` toggles real mode, in which [virtual postings](hledger.html#virtual-postings) are ignored.
|
||||||
|
|
||||||
`Z` toggles nonzero mode, in which only accounts with nonzero balances
|
`Z` toggles nonzero mode, in which only accounts with nonzero balances
|
||||||
are shown (hledger-ui shows zero items by default, unlike command-line
|
are shown (hledger-ui shows zero items by default, unlike command-line
|
||||||
@ -251,13 +251,13 @@ or if it's in list mode but this account has subaccounts which are not shown due
|
|||||||
In other words, the register always shows the transactions contributing to the balance shown on the accounts screen.
|
In other words, the register always shows the transactions contributing to the balance shown on the accounts screen.
|
||||||
Tree mode/list mode can be toggled with `t` here also.
|
Tree mode/list mode can be toggled with `t` here also.
|
||||||
|
|
||||||
`U` toggles filtering by [unmarked status](journal.html#status), showing or hiding unmarked transactions.
|
`U` toggles filtering by [unmarked status](hledger.html#status), showing or hiding unmarked transactions.
|
||||||
Similarly, `P` toggles pending transactions, and `C` toggles cleared transactions.
|
Similarly, `P` toggles pending transactions, and `C` toggles cleared transactions.
|
||||||
(By default, transactions with all statuses are shown;
|
(By default, transactions with all statuses are shown;
|
||||||
if you activate one or two status filters, only those transactions are shown;
|
if you activate one or two status filters, only those transactions are shown;
|
||||||
and if you activate all three, the filter is removed.)
|
and if you activate all three, the filter is removed.)
|
||||||
|
|
||||||
`R` toggles real mode, in which [virtual postings](journal.html#virtual-postings) are ignored.
|
`R` toggles real mode, in which [virtual postings](hledger.html#virtual-postings) are ignored.
|
||||||
|
|
||||||
`Z` toggles nonzero mode, in which only transactions posting a nonzero
|
`Z` toggles nonzero mode, in which only transactions posting a nonzero
|
||||||
change are shown (hledger-ui shows zero items by default,
|
change are shown (hledger-ui shows zero items by default,
|
||||||
|
|||||||
@ -276,7 +276,7 @@ Most of the JSON corresponds to hledger's data types; for details of what the fi
|
|||||||
[Hledger.Data.Json haddock docs](http://hackage.haskell.org/package/hledger-lib-1.17.1/docs/Hledger-Data-Json.html)
|
[Hledger.Data.Json haddock docs](http://hackage.haskell.org/package/hledger-lib-1.17.1/docs/Hledger-Data-Json.html)
|
||||||
and click on the various data types, eg
|
and click on the various data types, eg
|
||||||
[Transaction](http://hackage.haskell.org/package/hledger-lib-1.17.1/docs/Hledger-Data-Types.html#t:Transaction).
|
[Transaction](http://hackage.haskell.org/package/hledger-lib-1.17.1/docs/Hledger-Data-Types.html#t:Transaction).
|
||||||
And for a higher level understanding, see the [journal manual](journal.html).
|
And for a higher level understanding, see the [journal manual](hledger.html).
|
||||||
|
|
||||||
In some cases there is outer JSON corresponding to a "Report" type.
|
In some cases there is outer JSON corresponding to a "Report" type.
|
||||||
To understand that, go to the
|
To understand that, go to the
|
||||||
|
|||||||
@ -1815,7 +1815,7 @@ print:
|
|||||||
|
|
||||||
When a transaction posts to two commodities without specifying the
|
When a transaction posts to two commodities without specifying the
|
||||||
conversion price, we generate a price which makes it balance (cf
|
conversion price, we generate a price which makes it balance (cf
|
||||||
http://hledger.org/manual.html#prices). The print command showed
|
http://hledger.org/hledger.html#prices). The print command showed
|
||||||
this with full precision (so that manual calculations with the
|
this with full precision (so that manual calculations with the
|
||||||
displayed numbers would look right), but this sometimes meant we
|
displayed numbers would look right), but this sometimes meant we
|
||||||
showed 255 digits (when there are multiple postings in the
|
showed 255 digits (when there are multiple postings in the
|
||||||
|
|||||||
@ -51,7 +51,7 @@ $ hledger balance
|
|||||||
|
|
||||||
By default, accounts are displayed hierarchically,
|
By default, accounts are displayed hierarchically,
|
||||||
with subaccounts indented below their parent,
|
with subaccounts indented below their parent,
|
||||||
with accounts at each level of the tree sorted by [declaration order](/journal.html#declaring-accounts) if declared, then by account name.
|
with accounts at each level of the tree sorted by [declaration order](/hledger.html#declaring-accounts) if declared, then by account name.
|
||||||
|
|
||||||
"Boring" accounts, which contain a single interesting subaccount and
|
"Boring" accounts, which contain a single interesting subaccount and
|
||||||
no balance of their own, are elided into the following line for more compact output.
|
no balance of their own, are elided into the following line for more compact output.
|
||||||
@ -339,7 +339,7 @@ Eg: `hledger bal -D --color=yes | less -RS`.
|
|||||||
### Budget report
|
### Budget report
|
||||||
|
|
||||||
With `--budget`, extra columns are displayed showing budget goals for each account and period, if any.
|
With `--budget`, extra columns are displayed showing budget goals for each account and period, if any.
|
||||||
Budget goals are defined by [periodic transactions](journal.html#periodic-transactions).
|
Budget goals are defined by [periodic transactions](hledger.html#periodic-transactions).
|
||||||
This is very useful for comparing planned and actual income, expenses, time usage, etc.
|
This is very useful for comparing planned and actual income, expenses, time usage, etc.
|
||||||
--budget is most often combined with a [report interval](hledger.html#report-intervals).
|
--budget is most often combined with a [report interval](hledger.html#report-intervals).
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ These are always run by this command and other commands:
|
|||||||
- **parseable** - data files are well-formed and can be
|
- **parseable** - data files are well-formed and can be
|
||||||
[successfully parsed](hledger.html#input-files)
|
[successfully parsed](hledger.html#input-files)
|
||||||
|
|
||||||
- **autobalanced** - all transactions are [balanced](journal.html#postings),
|
- **autobalanced** - all transactions are [balanced](hledger.html#postings),
|
||||||
inferring missing amounts where necessary, and possibly converting commodities
|
inferring missing amounts where necessary, and possibly converting commodities
|
||||||
using [transaction prices] or automatically-inferred transaction prices
|
using [transaction prices] or automatically-inferred transaction prices
|
||||||
|
|
||||||
@ -39,10 +39,10 @@ These are always run by this and other commands when `-s`/`--strict` is used
|
|||||||
([strict mode]):
|
([strict mode]):
|
||||||
|
|
||||||
- **accounts** - all account names used by transactions
|
- **accounts** - all account names used by transactions
|
||||||
[have been declared](journal.html#account-error-checking)
|
[have been declared](hledger.html#account-error-checking)
|
||||||
|
|
||||||
- **commodities** - all commodity symbols used
|
- **commodities** - all commodity symbols used
|
||||||
[have been declared](journal.html#commodity-error-checking)
|
[have been declared](hledger.html#commodity-error-checking)
|
||||||
|
|
||||||
### Other checks
|
### Other checks
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ You could make your own similar scripts to perform custom checks;
|
|||||||
Cookbook -> [Scripting](scripting.html) may be helpful.
|
Cookbook -> [Scripting](scripting.html) may be helpful.
|
||||||
|
|
||||||
|
|
||||||
[transaction prices]: journal.html#transaction-prices
|
[transaction prices]: hledger.html#transaction-prices
|
||||||
[balance assertions]: journal.html#balance-assertions
|
[balance assertions]: hledger.html#balance-assertions
|
||||||
[strict mode]: hledger.html#strict-mode
|
[strict mode]: hledger.html#strict-mode
|
||||||
[add-on commands]: hledger.html#add-on-commands
|
[add-on commands]: hledger.html#add-on-commands
|
||||||
@ -24,7 +24,7 @@ $ hledger import --dry ... | hledger -f- print unknown --ignore-assertions
|
|||||||
### Importing balance assignments
|
### Importing balance assignments
|
||||||
|
|
||||||
Entries added by import will have their posting amounts made explicit (like `hledger print -x`).
|
Entries added by import will have their posting amounts made explicit (like `hledger print -x`).
|
||||||
This means that any [balance assignments](/journal.html#balance-assignments) in imported files must be evaluated;
|
This means that any [balance assignments](/hledger.html#balance-assignments) in imported files must be evaluated;
|
||||||
but, imported files don't get to see the main file's account balances.
|
but, imported files don't get to see the main file's account balances.
|
||||||
As a result, importing entries with balance assignments
|
As a result, importing entries with balance assignments
|
||||||
(eg from an institution that provides only balances and not posting amounts)
|
(eg from an institution that provides only balances and not posting amounts)
|
||||||
@ -40,5 +40,5 @@ please test it and send a pull request.)
|
|||||||
|
|
||||||
### Commodity display styles
|
### Commodity display styles
|
||||||
|
|
||||||
Imported amounts will be formatted according to the canonical [commodity styles](journal.html#commodity-display-style)
|
Imported amounts will be formatted according to the canonical [commodity styles](hledger.html#commodity-display-style)
|
||||||
(declared or inferred) in the main journal file.
|
(declared or inferred) in the main journal file.
|
||||||
@ -7,7 +7,7 @@ The print command displays full journal entries (transactions) from
|
|||||||
the journal file in date order, tidily formatted.
|
the journal file in date order, tidily formatted.
|
||||||
With --date2, transactions are sorted by secondary date instead.
|
With --date2, transactions are sorted by secondary date instead.
|
||||||
|
|
||||||
print's output is always a valid [hledger journal](/journal.html).
|
print's output is always a valid [hledger journal](/hledger.html).
|
||||||
It preserves all transaction information, but it does not preserve
|
It preserves all transaction information, but it does not preserve
|
||||||
directives or inter-transaction comments
|
directives or inter-transaction comments
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ Note, `-x`/`--explicit` will cause postings with a multi-commodity amount
|
|||||||
to be split into multiple single-commodity postings,
|
to be split into multiple single-commodity postings,
|
||||||
keeping the output parseable.
|
keeping the output parseable.
|
||||||
|
|
||||||
With `-B`/`--cost`, amounts with [transaction prices](/journal.html#transaction-prices)
|
With `-B`/`--cost`, amounts with [transaction prices](/hledger.html#transaction-prices)
|
||||||
are converted to cost using that price. This can be used for troubleshooting.
|
are converted to cost using that price. This can be used for troubleshooting.
|
||||||
|
|
||||||
With `-m`/`--match` and a STR argument, print will show at most one transaction: the one
|
With `-m`/`--match` and a STR argument, print will show at most one transaction: the one
|
||||||
|
|||||||
@ -271,7 +271,7 @@ If they're not doing what you expect, it's important to know exactly what they s
|
|||||||
#. they are [POSIX ERE][] (extended regular expressions)
|
#. they are [POSIX ERE][] (extended regular expressions)
|
||||||
#. they also support [GNU word boundaries][] (`\b`, `\B`, `\<`, `\>`)
|
#. they also support [GNU word boundaries][] (`\b`, `\B`, `\<`, `\>`)
|
||||||
#. they do not support [backreferences][]; if you write `\1`, it will match the digit `1`.
|
#. they do not support [backreferences][]; if you write `\1`, it will match the digit `1`.
|
||||||
Except when doing text replacement, eg in [account aliases](journal.html#regex-aliases),
|
Except when doing text replacement, eg in [account aliases](hledger.html#regex-aliases),
|
||||||
where [backreferences][] can be used in the replacement string to reference [capturing groups][] in the search regexp.
|
where [backreferences][] can be used in the replacement string to reference [capturing groups][] in the search regexp.
|
||||||
#. they do not support [mode modifiers][] (`(?s)`), character classes (`\w`, `\d`), or anything else not mentioned above.
|
#. they do not support [mode modifiers][] (`(?s)`), character classes (`\w`, `\d`), or anything else not mentioned above.
|
||||||
|
|
||||||
@ -368,11 +368,11 @@ You can specify multiple `-f` options, to read multiple files as one big journal
|
|||||||
There are some limitations with this:
|
There are some limitations with this:
|
||||||
|
|
||||||
- most directives do not affect sibling files
|
- most directives do not affect sibling files
|
||||||
- [balance assertions](journal.html#balance-assertions) will not see any account balances from previous files
|
- [balance assertions](hledger.html#balance-assertions) will not see any account balances from previous files
|
||||||
|
|
||||||
If you need either of those things, you can
|
If you need either of those things, you can
|
||||||
|
|
||||||
- use a single parent file which [includes](journal.html#including-other-files) the others
|
- use a single parent file which [includes](hledger.html#including-other-files) the others
|
||||||
- or concatenate the files into one before reading, eg: `cat a.journal b.journal | hledger -f- CMD`.
|
- or concatenate the files into one before reading, eg: `cat a.journal b.journal | hledger -f- CMD`.
|
||||||
|
|
||||||
## Strict mode
|
## Strict mode
|
||||||
@ -388,9 +388,9 @@ easy journal files without a lot of declarations:
|
|||||||
With the `-s`/`--strict` flag, additional checks are performed:
|
With the `-s`/`--strict` flag, additional checks are performed:
|
||||||
|
|
||||||
- Are all accounts posted to, declared with an `account` directive ?
|
- Are all accounts posted to, declared with an `account` directive ?
|
||||||
([Account error checking](journal.html#account-error-checking))
|
([Account error checking](hledger.html#account-error-checking))
|
||||||
- Are all commodities declared with a `commodity` directive ?
|
- Are all commodities declared with a `commodity` directive ?
|
||||||
([Commodity error checking](journal.html#commodity-error-checking))
|
([Commodity error checking](hledger.html#commodity-error-checking))
|
||||||
|
|
||||||
See also: <https://hledger.org/checking-for-errors.html>
|
See also: <https://hledger.org/checking-for-errors.html>
|
||||||
|
|
||||||
@ -675,7 +675,7 @@ or `hledger print cur:\\$`.
|
|||||||
: match dates within the specified period.
|
: match dates within the specified period.
|
||||||
PERIODEXPR is a [period expression](hledger.html#period-expressions) (with no report interval).
|
PERIODEXPR is a [period expression](hledger.html#period-expressions) (with no report interval).
|
||||||
Examples: `date:2016`, `date:thismonth`, `date:2000/2/1-2/15`, `date:lastweek-`.
|
Examples: `date:2016`, `date:thismonth`, `date:2000/2/1-2/15`, `date:lastweek-`.
|
||||||
If the `--date2` command line flag is present, this matches [secondary dates](journal.html#secondary-dates) instead.
|
If the `--date2` command line flag is present, this matches [secondary dates](hledger.html#secondary-dates) instead.
|
||||||
|
|
||||||
**`date2:PERIODEXPR`**
|
**`date2:PERIODEXPR`**
|
||||||
: match secondary dates within the specified period.
|
: match secondary dates within the specified period.
|
||||||
@ -684,11 +684,11 @@ If the `--date2` command line flag is present, this matches [secondary dates](jo
|
|||||||
: match (or display, depending on command) accounts at or above this depth
|
: match (or display, depending on command) accounts at or above this depth
|
||||||
|
|
||||||
**`note:REGEX`**
|
**`note:REGEX`**
|
||||||
: match transaction [notes](journal.html#payee-and-note)
|
: match transaction [notes](hledger.html#payee-and-note)
|
||||||
(part of description right of `|`, or whole description when there's no `|`)
|
(part of description right of `|`, or whole description when there's no `|`)
|
||||||
|
|
||||||
**`payee:REGEX`**
|
**`payee:REGEX`**
|
||||||
: match transaction [payee/payer names](journal.html#payee-and-note)
|
: match transaction [payee/payer names](hledger.html#payee-and-note)
|
||||||
(part of description left of `|`, or whole description when there's no `|`)
|
(part of description left of `|`, or whole description when there's no `|`)
|
||||||
|
|
||||||
**`real:, real:0`**
|
**`real:, real:0`**
|
||||||
@ -726,7 +726,7 @@ and usually one of those is all you need.
|
|||||||
## -B: Cost
|
## -B: Cost
|
||||||
|
|
||||||
The `-B/--cost` flag converts amounts to their cost or sale amount at transaction time,
|
The `-B/--cost` flag converts amounts to their cost or sale amount at transaction time,
|
||||||
if they have a [transaction price](journal.html#transaction-prices) specified.
|
if they have a [transaction price](hledger.html#transaction-prices) specified.
|
||||||
|
|
||||||
## -V: Value
|
## -V: Value
|
||||||
|
|
||||||
@ -763,9 +763,9 @@ in this order of preference
|
|||||||
|
|
||||||
1. A *declared market price* or *inferred market price*:
|
1. A *declared market price* or *inferred market price*:
|
||||||
A's latest market price in B on or before the valuation date
|
A's latest market price in B on or before the valuation date
|
||||||
as declared by a [P directive](journal.html#declaring-market-prices),
|
as declared by a [P directive](hledger.html#declaring-market-prices),
|
||||||
or (with the `--infer-value` flag)
|
or (with the `--infer-value` flag)
|
||||||
inferred from [transaction prices](journal.html#transaction-prices).
|
inferred from [transaction prices](hledger.html#transaction-prices).
|
||||||
<!-- (Latest by date, then parse order.) -->
|
<!-- (Latest by date, then parse order.) -->
|
||||||
<!-- (A declared price overrides an inferred price on the same date.) -->
|
<!-- (A declared price overrides an inferred price on the same date.) -->
|
||||||
|
|
||||||
@ -785,10 +785,10 @@ Amounts for which no applicable market price can be found, are not converted.
|
|||||||
## --infer-value: market prices from transactions
|
## --infer-value: market prices from transactions
|
||||||
|
|
||||||
Normally, market value in hledger is fully controlled by, and requires,
|
Normally, market value in hledger is fully controlled by, and requires,
|
||||||
[P directives](journal.html#declaring-market-prices) in your journal.
|
[P directives](hledger.html#declaring-market-prices) in your journal.
|
||||||
Since adding and updating those can be a chore,
|
Since adding and updating those can be a chore,
|
||||||
and since transactions usually take place at close to market value,
|
and since transactions usually take place at close to market value,
|
||||||
why not use the recorded [transaction prices](journal.html#transaction-prices)
|
why not use the recorded [transaction prices](hledger.html#transaction-prices)
|
||||||
as additional market prices (as Ledger does) ?
|
as additional market prices (as Ledger does) ?
|
||||||
We could produce value reports without needing P directives at all.
|
We could produce value reports without needing P directives at all.
|
||||||
|
|
||||||
@ -835,11 +835,11 @@ follows, in this order of preference:
|
|||||||
|
|
||||||
This means:
|
This means:
|
||||||
|
|
||||||
- If you have [P directives](journal.html#declaring-market-prices),
|
- If you have [P directives](hledger.html#declaring-market-prices),
|
||||||
they determine which commodities `-V` will convert, and to what.
|
they determine which commodities `-V` will convert, and to what.
|
||||||
|
|
||||||
- If you have no P directives, and use the `--infer-value` flag,
|
- If you have no P directives, and use the `--infer-value` flag,
|
||||||
[transaction prices](journal.html#transaction-prices) determine it.
|
[transaction prices](hledger.html#transaction-prices) determine it.
|
||||||
|
|
||||||
Amounts for which no valuation commodity can be found are not converted.
|
Amounts for which no valuation commodity can be found are not converted.
|
||||||
|
|
||||||
@ -1111,7 +1111,7 @@ Normally hledger sums amounts, and organizes them in a hierarchy, based on accou
|
|||||||
The `--pivot FIELD` option causes it to sum and organize hierarchy based on the value of some other field instead.
|
The `--pivot FIELD` option causes it to sum and organize hierarchy based on the value of some other field instead.
|
||||||
FIELD can be:
|
FIELD can be:
|
||||||
`code`, `description`, `payee`, `note`,
|
`code`, `description`, `payee`, `note`,
|
||||||
or the full name (case insensitive) of any [tag](journal.html#tags).
|
or the full name (case insensitive) of any [tag](hledger.html#tags).
|
||||||
As with account names, values containing `colon:separated:parts` will be displayed hierarchically in reports.
|
As with account names, values containing `colon:separated:parts` will be displayed hierarchically in reports.
|
||||||
|
|
||||||
`--pivot` is a general option affecting all reports; you can think of hledger transforming
|
`--pivot` is a general option affecting all reports; you can think of hledger transforming
|
||||||
@ -2113,7 +2113,7 @@ flag or `real:` query.
|
|||||||
|
|
||||||
Balance assertions compare the exactly calculated amounts,
|
Balance assertions compare the exactly calculated amounts,
|
||||||
which are not always what is shown by reports.
|
which are not always what is shown by reports.
|
||||||
Eg a [commodity directive](http://hledger.org/journal.html#declaring-commodities)
|
Eg a [commodity directive](http://hledger.org/hledger.html#declaring-commodities)
|
||||||
may limit the display precision, but this will not affect balance assertions.
|
may limit the display precision, but this will not affect balance assertions.
|
||||||
Balance assertion failure messages show exact amounts.
|
Balance assertion failure messages show exact amounts.
|
||||||
|
|
||||||
@ -2430,7 +2430,7 @@ Though not required, these declarations can provide several benefits:
|
|||||||
[strict mode]: hledger.html#strict-mode
|
[strict mode]: hledger.html#strict-mode
|
||||||
|
|
||||||
The simplest form is just the word `account` followed by a hledger-style
|
The simplest form is just the word `account` followed by a hledger-style
|
||||||
[account name](journal.html#account-names), eg this account directive declares the `assets:bank:checking` account:
|
[account name](hledger.html#account-names), eg this account directive declares the `assets:bank:checking` account:
|
||||||
|
|
||||||
```journal
|
```journal
|
||||||
account assets:bank:checking
|
account assets:bank:checking
|
||||||
@ -2467,7 +2467,7 @@ account assets:bank:checking ; same-line comment, note 2+ spaces before ;
|
|||||||
|
|
||||||
Same-line comments are not supported by Ledger, or hledger <1.13.
|
Same-line comments are not supported by Ledger, or hledger <1.13.
|
||||||
|
|
||||||
<!-- Account comments may include [tags](journal.html#tags), though we don't yet use them for anything. -->
|
<!-- Account comments may include [tags](hledger.html#tags), though we don't yet use them for anything. -->
|
||||||
|
|
||||||
### Account subdirectives
|
### Account subdirectives
|
||||||
|
|
||||||
@ -2505,7 +2505,7 @@ but typically not investments or receivables.)
|
|||||||
Generally, to make these reports work you should declare your
|
Generally, to make these reports work you should declare your
|
||||||
top-level accounts and their types,
|
top-level accounts and their types,
|
||||||
using [account directives](#declaring-accounts)
|
using [account directives](#declaring-accounts)
|
||||||
with `type:` [tags](journal.html#tags).
|
with `type:` [tags](hledger.html#tags).
|
||||||
|
|
||||||
The tag's value should be one of:
|
The tag's value should be one of:
|
||||||
`Asset`, `Liability`, `Equity`, `Revenue`, `Expense`, `Cash`,
|
`Asset`, `Liability`, `Equity`, `Revenue`, `Expense`, `Cash`,
|
||||||
@ -2870,7 +2870,7 @@ Or, it can be used as a data entry aid: describe recurring
|
|||||||
transactions, and every so often copy the output of `print --forecast`
|
transactions, and every so often copy the output of `print --forecast`
|
||||||
into the journal.
|
into the journal.
|
||||||
|
|
||||||
These transactions will have an extra [tag](journal.html#tags)
|
These transactions will have an extra [tag](hledger.html#tags)
|
||||||
indicating which periodic rule generated them:
|
indicating which periodic rule generated them:
|
||||||
`generated-transaction:~ PERIODICEXPR`.
|
`generated-transaction:~ PERIODICEXPR`.
|
||||||
And a similar, hidden tag (beginning with an underscore) which,
|
And a similar, hidden tag (beginning with an underscore) which,
|
||||||
@ -3434,13 +3434,13 @@ For more about the transaction parts they refer to, see the manual for hledger's
|
|||||||
#### Transaction field names
|
#### Transaction field names
|
||||||
|
|
||||||
`date`, `date2`, `status`, `code`, `description`, `comment` can be used to form the
|
`date`, `date2`, `status`, `code`, `description`, `comment` can be used to form the
|
||||||
[transaction's](journal.html#transactions) first line.
|
[transaction's](hledger.html#transactions) first line.
|
||||||
|
|
||||||
#### Posting field names
|
#### Posting field names
|
||||||
|
|
||||||
##### account
|
##### account
|
||||||
|
|
||||||
`accountN`, where N is 1 to 99, causes a [posting](journal.html#postings) to be generated,
|
`accountN`, where N is 1 to 99, causes a [posting](hledger.html#postings) to be generated,
|
||||||
with that account name.
|
with that account name.
|
||||||
|
|
||||||
Most often there are two postings, so you'll want to set `account1` and `account2`.
|
Most often there are two postings, so you'll want to set `account1` and `account2`.
|
||||||
@ -3465,7 +3465,7 @@ This is still supported
|
|||||||
because it keeps pre-hledger-1.17 csv rules files working,
|
because it keeps pre-hledger-1.17 csv rules files working,
|
||||||
and because it can be more succinct,
|
and because it can be more succinct,
|
||||||
and because it converts posting 2's amount to cost if there's a
|
and because it converts posting 2's amount to cost if there's a
|
||||||
[transaction price](journal.html#transaction-prices), which can be useful.
|
[transaction price](hledger.html#transaction-prices), which can be useful.
|
||||||
|
|
||||||
If you have an existing rules file using the unnumbered form, you
|
If you have an existing rules file using the unnumbered form, you
|
||||||
might want to use the numbered form in certain conditional blocks,
|
might want to use the numbered form in certain conditional blocks,
|
||||||
@ -3484,8 +3484,8 @@ N's amount. Or, `currency` with no number affects all postings.
|
|||||||
|
|
||||||
##### balance
|
##### balance
|
||||||
|
|
||||||
`balanceN` sets a [balance assertion](journal.html#balance-assertions) amount
|
`balanceN` sets a [balance assertion](hledger.html#balance-assertions) amount
|
||||||
(or if the posting amount is left empty, a [balance assignment](journal.html#balance-assignments))
|
(or if the posting amount is left empty, a [balance assignment](hledger.html#balance-assignments))
|
||||||
on posting N.
|
on posting N.
|
||||||
|
|
||||||
Also, for compatibility with hledger <1.17:
|
Also, for compatibility with hledger <1.17:
|
||||||
@ -3496,8 +3496,8 @@ You can adjust the type of assertion/assignment with the
|
|||||||
|
|
||||||
##### comment
|
##### comment
|
||||||
|
|
||||||
Finally, `commentN` sets a [comment](journal.html#comments) on the Nth posting.
|
Finally, `commentN` sets a [comment](hledger.html#comments) on the Nth posting.
|
||||||
Comments can also contain [tags](journal.html#tags), as usual.
|
Comments can also contain [tags](hledger.html#tags), as usual.
|
||||||
|
|
||||||
See TIPS below for more about setting amounts and currency.
|
See TIPS below for more about setting amounts and currency.
|
||||||
|
|
||||||
@ -3748,7 +3748,7 @@ decimal-mark ,
|
|||||||
```
|
```
|
||||||
|
|
||||||
hledger automatically accepts either period or comma as a decimal mark when parsing numbers
|
hledger automatically accepts either period or comma as a decimal mark when parsing numbers
|
||||||
(cf [Amounts](journal.html#amounts)).
|
(cf [Amounts](hledger.html#amounts)).
|
||||||
However if any numbers in the CSV contain digit group marks, such as thousand-separating commas,
|
However if any numbers in the CSV contain digit group marks, such as thousand-separating commas,
|
||||||
you should declare the decimal mark explicitly with this rule, to avoid misparsed numbers.
|
you should declare the decimal mark explicitly with this rule, to avoid misparsed numbers.
|
||||||
|
|
||||||
@ -3796,8 +3796,8 @@ include categorisation.rules
|
|||||||
|
|
||||||
Balance assertions generated by [assigning to balanceN](#posting-field-names)
|
Balance assertions generated by [assigning to balanceN](#posting-field-names)
|
||||||
are of the simple `=` type by default,
|
are of the simple `=` type by default,
|
||||||
which is a [single-commodity](https://hledger.org/journal.html#assertions-and-commodities),
|
which is a [single-commodity](https://hledger.org/hledger.html#assertions-and-commodities),
|
||||||
[subaccount-excluding](https://hledger.org/journal.html#assertions-and-subaccounts) assertion.
|
[subaccount-excluding](https://hledger.org/hledger.html#assertions-and-subaccounts) assertion.
|
||||||
You may find the subaccount-including variants more useful,
|
You may find the subaccount-including variants more useful,
|
||||||
eg if you have created some virtual subaccounts of checking to help with budgeting.
|
eg if you have created some virtual subaccounts of checking to help with budgeting.
|
||||||
You can select a different type of assertion with the `balance-type` rule:
|
You can select a different type of assertion with the `balance-type` rule:
|
||||||
@ -3915,7 +3915,7 @@ A posting amount can be set in one of these ways:
|
|||||||
|
|
||||||
- by assigning to `balanceN` (or `balance`) instead of the above,
|
- by assigning to `balanceN` (or `balance`) instead of the above,
|
||||||
setting the amount indirectly via a
|
setting the amount indirectly via a
|
||||||
[balance assignment](journal.html#balance-assignments).
|
[balance assignment](hledger.html#balance-assignments).
|
||||||
If you do this the default account name may be wrong, so you should set that explicitly.
|
If you do this the default account name may be wrong, so you should set that explicitly.
|
||||||
|
|
||||||
There is some special handling for an amount's sign:
|
There is some special handling for an amount's sign:
|
||||||
@ -4128,7 +4128,7 @@ In the docs below we'll assume it's time.
|
|||||||
|
|
||||||
A timedot file contains a series of day entries.
|
A timedot file contains a series of day entries.
|
||||||
A day entry begins with a non-indented hledger-style
|
A day entry begins with a non-indented hledger-style
|
||||||
[simple date](journal.html#simple-dates) (Y-M-D, Y/M/D, Y.M.D..)
|
[simple date](hledger.html#simple-dates) (Y-M-D, Y/M/D, Y.M.D..)
|
||||||
Any additional text on the same line is used as a transaction description for this day.
|
Any additional text on the same line is used as a transaction description for this day.
|
||||||
|
|
||||||
This is followed by optionally-indented timelog items for that day, one per line.
|
This is followed by optionally-indented timelog items for that day, one per line.
|
||||||
@ -4244,7 +4244,7 @@ Balance changes in 2016-02-01-2016-02-03:
|
|||||||
```
|
```
|
||||||
|
|
||||||
I prefer to use period for separating account components.
|
I prefer to use period for separating account components.
|
||||||
We can make this work with an [account alias](journal.html#rewriting-accounts):
|
We can make this work with an [account alias](hledger.html#rewriting-accounts):
|
||||||
|
|
||||||
```timedot
|
```timedot
|
||||||
2016/2/4
|
2016/2/4
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user