;doc:journal:description/payee/note: clarify
This commit is contained in:
parent
de3209a2fb
commit
3f6c400ddb
@ -1038,16 +1038,34 @@ or reference number.
|
|||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
A transaction's description is the rest of the line following the date and status mark (or until a comment begins).
|
After the date, status mark and/or code fields, the rest of the line (or until a comment is begun with `;`) is the transaction's description.
|
||||||
Sometimes called the "narration" in traditional bookkeeping, it can be used for whatever you wish,
|
Here you can describe the transaction (called the "narration" in traditional bookkeeping),
|
||||||
or left blank. Transaction descriptions can be queried, unlike [comments](#transaction-comments).
|
or you can record a payee/payer name,
|
||||||
|
or you can leave it empty.
|
||||||
|
|
||||||
|
Transaction descriptions show up in [print](#print) output and in [register](#register) reports,
|
||||||
|
and can be listed with the [descriptions](#descriptions) command.
|
||||||
|
|
||||||
|
You can [query](#queries) by description with `desc:DESCREGEX`,
|
||||||
|
or [pivot](#pivoting) on description with `--pivot desc`.
|
||||||
|
|
||||||
### Payee and note
|
### Payee and note
|
||||||
|
|
||||||
You can optionally include a `|` (pipe) character in descriptions to subdivide the description
|
Sometimes people want a dedicated payee/payer field that can be queried and checked more strictly.
|
||||||
into separate fields for payee/payer name on the left (up to the first `|`) and an additional note
|
If you want that, you can write a `|` (pipe) character in the description.
|
||||||
field on the right (after the first `|`). This may be worthwhile if you need to do more precise
|
This divides it into a "payee" field on the left, and a "note" field on the right.
|
||||||
[querying](#queries) and [pivoting](#pivoting) by payee or by note.
|
(Either can be empty.)
|
||||||
|
|
||||||
|
You can query these with `payee:PAYEEREGEX` and `note:NOTEREGEX`,
|
||||||
|
list their values with the [payees](#payees) and [notes](#notes) commands,
|
||||||
|
or pivot on `payee` or `note`.
|
||||||
|
|
||||||
|
Note: in transactions with no `|` character, description, payee, and note all have the same value.
|
||||||
|
Once a `|` is added, they become distinct.
|
||||||
|
(If you'd like to change this behaviour, please propose it on the mail list.)
|
||||||
|
|
||||||
|
If you want more strict error checking, you can declare the valid payee names with `payee` directives, and then enforce these with `hledger check payees`.
|
||||||
|
Note: because of the above, for this you'll need to ensure every transaction description contains a `|` and therefore a checkable payee name (even if it's empty).
|
||||||
|
|
||||||
## Transaction comments
|
## Transaction comments
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user