;doc: improve --value-at docs
[ci skip]
This commit is contained in:
parent
2ffe7914be
commit
a63e582aca
@ -598,63 +598,32 @@ $ hledger -f- print --value-at=2000-01-15
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Reports supporting --value-at
|
### Effect of --value-at on reports
|
||||||
|
|
||||||
Currently all report/--value-at combinations are expected to do the
|
There are many possible combinations of --value-at and hledger's various reports.
|
||||||
right thing, or at least a reasonable thing.
|
Below is what we currently (aim to) do in each case.
|
||||||
Though, some of these combinations might not make sense.
|
You're not expected to remember all this - probably only a few of these will be useful in practice -
|
||||||
The table below shows the current status as far as we know it.
|
but when troubleshooting a report, look here.
|
||||||
("print", "register", "balance" mean all commands of those general
|
If you find problems - useless reports, misbehaving reports, or error
|
||||||
types, "-M" means any report interval, "Y" means supported):
|
messages being printed - please report them (with reproducible examples) eg at
|
||||||
|
|
||||||
| Report type | `--value-at` `transaction` | `--value-at` `period` | `--value-at` `DATE`/`now` |
|
|
||||||
|-----------------------|:--------------------------------:|:---------------------------:|:-------------------------------:|
|
|
||||||
| print | Y | Y | Y |
|
|
||||||
| register | Y | Y | Y |
|
|
||||||
| register -M | Y | Y | Y |
|
|
||||||
| register -H | Y | Y | Y |
|
|
||||||
| balance | Y | Y | Y |
|
|
||||||
| balance -MTA | Y | Y | Y |
|
|
||||||
| balance -MH | *not yet* | *not yet* | *not yet* |
|
|
||||||
| balance --budget | ? | ? | ? |
|
|
||||||
|
|
||||||
If you find problems (useless reports, misbehaving reports, or errors
|
|
||||||
being reported), please report them (with reproducible examples) eg at
|
|
||||||
[#329](https://github.com/simonmichael/hledger/issues/329).
|
[#329](https://github.com/simonmichael/hledger/issues/329).
|
||||||
|
|
||||||
Some more notes specific to the report types:
|
| Report type | `--value-at` `transaction` | `--value-at` `period` | `--value-at` `DATE`/`now` |
|
||||||
|
|------------------------------------------|-----------------------------------------------------------|--------------------------------------------------------------|-------------------------------------------|
|
||||||
#### print --value-at
|
| <br>**print** | | | |
|
||||||
|
| posting amounts | value at posting date | value at report end | value at DATE |
|
||||||
Posting amounts are converted to value, but balance assertion/balance assignment amounts are not.
|
| balance assertions/assignments | show unvalued | show unvalued | show unvalued |
|
||||||
|
| <br>**register** | | | |
|
||||||
#### register --value-at
|
| starting balance with -H | value at day before report start | value at day before report start | value at DATE |
|
||||||
|
| posting amounts | value at posting date | value at report end | value at DATE |
|
||||||
register --value-at
|
| posting amounts, multiperiod | value each posting at posting date then summarise | value each summary posting at period end | value each summary posting at DATE |
|
||||||
transaction: convert each posting to value at posting date ; with -H, convert starting balance to value at day before report start
|
| <br>**balance (bs, cf, is..)** | | | |
|
||||||
period: convert each posting to value at report end ; with -H, convert starting balance to value at day before report start
|
| starting balances with -H | sum of values of previous postings at their posting dates | value at day before report start of sum of previous postings | value at DATE of sum of previous postings |
|
||||||
date: convert each posting to value at date ; with -H, convert starting balance to value at date
|
| balances, simple balance report | sum of values of each posting at posting date | value at period end of sum of postings | value at DATE of sum of postings |
|
||||||
|
| balances, multiperiod report | sum of values of each posting at posting date | value at period end of sum of postings | value at DATE of sum of postings |
|
||||||
register -M --value-at
|
| column totals | sum/average of the displayed balances | value at period end of sum of postings | value at DATE of sum of postings |
|
||||||
transaction: convert each summary posting to value at posting date ; with -H, convert starting balance to value at day before report start
|
| row totals/averages, grand total/average | sum/average of the displayed balances | value at period end of sum/average of postings | value at DATE of sum/average of postings |
|
||||||
period: convert each summary posting to value at period end ; with -H, convert starting balance to value at day before report start
|
| budget amounts in --budget reports | ? | ? | ? |
|
||||||
date: convert each summary posting to value at date ; with -H, convert starting balance to value at date
|
|
||||||
|
|
||||||
"Day before report start" is a bit arbitrary.
|
|
||||||
|
|
||||||
In all cases, the running total/average is calculated from the above numbers.
|
|
||||||
|
|
||||||
#### balance --value-at
|
|
||||||
|
|
||||||
balance --value-at
|
|
||||||
transaction: convert each posting to value before summing
|
|
||||||
period: convert totals to value at period end
|
|
||||||
date: convert totals to value at date
|
|
||||||
|
|
||||||
balance -M --value-at
|
|
||||||
transaction: convert each posting to value before calculating table cell amounts
|
|
||||||
period: convert each table cell amount (balance change or ending balance) to its value at period end
|
|
||||||
date: convert each table cell amount to its value at date
|
|
||||||
|
|
||||||
|
|
||||||
## Combining -B and -V
|
## Combining -B and -V
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user