mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 18:29:36 +03:00
;doc: More valuation examples: drop obsolete explanation (precisiongeddon)
This commit is contained in:
parent
f4de65ab48
commit
c8484b5792
@ -5528,42 +5528,6 @@ $ hledger -f- print --value=2000-01-15
|
||||
|
||||
```
|
||||
|
||||
You may need to explicitly set a commodity's display style, when reverse prices are used.
|
||||
Eg this output might be surprising:
|
||||
```journal
|
||||
P 2000-01-01 A 2B
|
||||
|
||||
2000-01-01
|
||||
a 1B
|
||||
b
|
||||
```
|
||||
```shell
|
||||
$ hledger print -x -X A
|
||||
2000-01-01
|
||||
a 0
|
||||
b 0
|
||||
|
||||
```
|
||||
Explanation: because there's no amount or commodity directive specifying a display style
|
||||
for A, 0.5A gets the default style, which shows no decimal digits. Because the displayed
|
||||
amount looks like zero, the commodity symbol and minus sign are not displayed either.
|
||||
Adding a commodity directive sets a more useful display style for A:
|
||||
```journal
|
||||
P 2000-01-01 A 2B
|
||||
commodity 0.00A
|
||||
|
||||
2000-01-01
|
||||
a 1B
|
||||
b
|
||||
```
|
||||
```shell
|
||||
$ hledger print -X A
|
||||
2000-01-01
|
||||
a 0.50A
|
||||
b -0.50A
|
||||
|
||||
```
|
||||
|
||||
## Interaction of valuation and queries
|
||||
|
||||
When matching postings based on queries in the presence of valuation, the
|
||||
|
Loading…
Reference in New Issue
Block a user