;doc:journal: edits, Amount display format -> Amount display style (#1187)
Drop occasional use of "display format", prefer "display style". [ci skip]
This commit is contained in:
parent
9112e077ba
commit
86ffef1057
@ -900,11 +900,11 @@ checkBalanceAssignmentUnassignableAccountB p = do
|
|||||||
|
|
||||||
--
|
--
|
||||||
|
|
||||||
-- | Choose and apply a consistent display format to the posting
|
-- | Choose and apply a consistent display style to the posting
|
||||||
-- amounts in each commodity. Each commodity's format is specified by
|
-- amounts in each commodity. Each commodity's style is specified by a
|
||||||
-- a commodity format directive, or otherwise inferred from posting
|
-- commodity (or D) directive, or otherwise inferred from posting
|
||||||
-- amounts as in hledger < 0.28. Can return an error message
|
-- amounts. Can return an error message eg if inconsistent number
|
||||||
-- eg if inconsistent number formats are found.
|
-- formats are found.
|
||||||
journalApplyCommodityStyles :: Journal -> Either String Journal
|
journalApplyCommodityStyles :: Journal -> Either String Journal
|
||||||
journalApplyCommodityStyles j@Journal{jtxns=ts, jpricedirectives=pds} =
|
journalApplyCommodityStyles j@Journal{jtxns=ts, jpricedirectives=pds} =
|
||||||
case journalInferCommodityStyles j of
|
case journalInferCommodityStyles j of
|
||||||
|
|||||||
@ -471,11 +471,11 @@ commodity INR 9,99,99,999.00
|
|||||||
commodity 1 000 000.9455
|
commodity 1 000 000.9455
|
||||||
```
|
```
|
||||||
|
|
||||||
### Amount display format
|
### Amount display style
|
||||||
|
|
||||||
For each commodity, hledger chooses a consistent format to use when
|
For each commodity, hledger chooses a consistent format to use when
|
||||||
displaying amounts. (Except [price amounts](#prices), which are always
|
displaying amounts. (Except [price amounts](#prices), which are always
|
||||||
displayed as written). The display format is chosen as follows:
|
displayed as written). The display style is chosen as follows:
|
||||||
|
|
||||||
- If there is a [commodity directive](#declaring-commodities) for the commodity,
|
- If there is a [commodity directive](#declaring-commodities) for the commodity,
|
||||||
that format is used (see examples above).
|
that format is used (see examples above).
|
||||||
@ -488,12 +488,11 @@ displayed as written). The display format is chosen as follows:
|
|||||||
- Or if there are no such amounts in the journal, a default format is
|
- Or if there are no such amounts in the journal, a default format is
|
||||||
used (like `$1000.00`).
|
used (like `$1000.00`).
|
||||||
|
|
||||||
Price amounts, and amounts in `D` directives don't affect the amount
|
Transaction price amounts don't affect the amount display style
|
||||||
display format directly, but occasionally they can do so indirectly.
|
directly, but occasionally they can do so indirectly (eg when an
|
||||||
(Eg when D's default commodity is applied to a commodity-less amount,
|
posting's amount is inferred using a transaction price). If you find
|
||||||
or when an amountless posting is balanced using a price's commodity,
|
this causing problems, use a commodity directive to fix the display
|
||||||
or when -V is used.) If you find this causing problems, use a
|
style.
|
||||||
commodity directive to set the display format.
|
|
||||||
|
|
||||||
## Transaction prices
|
## Transaction prices
|
||||||
|
|
||||||
@ -885,7 +884,7 @@ The `commodity` directive has several functions:
|
|||||||
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).
|
||||||
|
|
||||||
3. It declares the [amount display format](#amount-display-format) to
|
3. It declares the [amount display style](#amount-display-style) to
|
||||||
use in output - decimal and digit group marks, number of decimal
|
use in output - decimal and digit group marks, number of decimal
|
||||||
places, symbol placement etc.
|
places, symbol placement etc.
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user