parent
0b2349c28f
commit
9112e077ba
@ -880,7 +880,7 @@ The `commodity` directive has several functions:
|
|||||||
1. It declares commodities which may be used in the journal.
|
1. It declares commodities which may be used in the journal.
|
||||||
This is currently not enforced, but can serve as documentation.
|
This is currently not enforced, but can serve as documentation.
|
||||||
|
|
||||||
2. It declares what decimal mark character to expect when parsing
|
2. It declares what decimal mark character (period or comma) to expect when parsing
|
||||||
input - useful to disambiguate international number formats in your
|
input - useful to disambiguate international number formats in your
|
||||||
data. (Without this, hledger will parse both `1,000` and `1.000`
|
data. (Without this, hledger will parse both `1,000` and `1.000`
|
||||||
as 1).
|
as 1).
|
||||||
@ -929,9 +929,10 @@ The `D` directive sets a default commodity, to be used for amounts without a com
|
|||||||
This commodity will be applied to all subsequent commodity-less amounts, or until the next `D` directive.
|
This commodity will be applied to all subsequent commodity-less amounts, or until the next `D` directive.
|
||||||
(Note, this is different from Ledger's `D`.)
|
(Note, this is different from Ledger's `D`.)
|
||||||
|
|
||||||
`D` also sets that commodity's display format, as a `commodity` directive would (for compatibility/historical reasons).
|
For compatibility/historical reasons, `D` also acts like a [`commodity` directive](#declaring-commodities),
|
||||||
If both directives are used, `commodity`'s format takes precedence.
|
setting the commodity's [display style](#amount-display-format) (for output) and decimal mark (for parsing input).
|
||||||
As with `commodity`, the amount must always be written with a decimal mark.
|
As with `commodity`, the amount must always be written with a decimal mark (period or comma).
|
||||||
|
If both directives are used, `commodity`'s style takes precedence.
|
||||||
|
|
||||||
The syntax is `D AMOUNT`. Eg:
|
The syntax is `D AMOUNT`. Eg:
|
||||||
```journal
|
```journal
|
||||||
@ -944,8 +945,6 @@ D $1,000.00
|
|||||||
b
|
b
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Market prices
|
### Market prices
|
||||||
|
|
||||||
The `P` directive declares a market price, which is
|
The `P` directive declares a market price, which is
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user