bal: document and test --value-at with --budget (#329)
This commit is contained in:
parent
a8599d991e
commit
fb18019212
@ -610,22 +610,22 @@ If you find problems - useless reports, misbehaving reports, or error
|
|||||||
messages being printed - please report them (with reproducible examples) eg at
|
messages being printed - please report them (with reproducible examples) eg at
|
||||||
[#329](https://github.com/simonmichael/hledger/issues/329).
|
[#329](https://github.com/simonmichael/hledger/issues/329).
|
||||||
|
|
||||||
| Report type | `--value-at` `transaction` | `--value-at` `period` | `--value-at` `DATE`/`now` |
|
| Report type | `--value-at` `transaction` | `--value-at` `period` | `--value-at` `DATE`/`now` |
|
||||||
|------------------------------------|-----------------------------------------------------------|--------------------------------------------------------------|-------------------------------------------|
|
|------------------------------------|-----------------------------------------------------------|--------------------------------------------------------------|-------------------------------------------------|
|
||||||
| <br>**print** | | | |
|
| <br>**print** | | | |
|
||||||
| posting amounts | value at posting date | value at report end | value at DATE |
|
| posting amounts | value at posting date | value at report end | value at DATE |
|
||||||
| balance assertions/assignments | show unvalued | show unvalued | show unvalued |
|
| balance assertions/assignments | show unvalued | show unvalued | show unvalued |
|
||||||
| <br>**register** | | | |
|
| <br>**register** | | | |
|
||||||
| starting balance with -H | value at day before report start | value at day before report start | value at DATE |
|
| 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 |
|
| posting amounts | value at posting date | value at report end | value at DATE |
|
||||||
| posting amounts, multiperiod | value each posting at posting date then summarise | value each summary posting at period end | value each summary posting at DATE |
|
| posting amounts, multiperiod | value each posting at posting date then summarise | value each summary posting at period end | value each summary posting at DATE |
|
||||||
| running total/average | sum/average of the displayed values | sum/average of the displayed values | sum/average of the displayed values |
|
| running total/average | sum/average of the displayed values | sum/average of the displayed values | sum/average of the displayed values |
|
||||||
| <br>**balance (bs, cf, is..)** | | | |
|
| <br>**balance (bs, cf, is..)** | | | |
|
||||||
| 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 |
|
| 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 |
|
||||||
| 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, 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 |
|
| 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 |
|
||||||
| column/row/grand totals/averages | sum/average of the displayed values | value at period end of sum/average of postings | value at DATE of sum/average of postings |
|
| column/row/grand totals/averages | sum/average of the displayed values | value at period end of sum/average of postings | value at DATE of sum/average of postings |
|
||||||
| budget amounts in --budget reports | ? | ? | ? |
|
| budget amounts in --budget reports | budget-setting periodic txns are valued at posting date | budget-setting periodic txns are valued at period end | budget-setting periodic txns are valued at DATE |
|
||||||
|
|
||||||
### Some useful value reports
|
### Some useful value reports
|
||||||
|
|
||||||
@ -639,8 +639,8 @@ Here are some probably useful reports - please send suggestions if you find out
|
|||||||
|
|
||||||
## Combining -B and -V
|
## Combining -B and -V
|
||||||
|
|
||||||
Using -B/--cost together with -V/--value or --value-at is allowed.
|
Using -B/--cost together with -V/--value or --value-at is allowed, but probably not useful.
|
||||||
Let us know if you find a use for this.
|
(Let us know if you find a use for it.)
|
||||||
|
|
||||||
## Output destination
|
## Output destination
|
||||||
|
|
||||||
|
|||||||
@ -492,3 +492,65 @@ Ending balances (historical) in 2000q1:
|
|||||||
a || 5 B 5 B 5 B
|
a || 5 B 5 B 5 B
|
||||||
---++------------------------------------
|
---++------------------------------------
|
||||||
|| 5 B 5 B 5 B
|
|| 5 B 5 B 5 B
|
||||||
|
|
||||||
|
# balance --budget. The periodic transactions setting budget amounts
|
||||||
|
# are valued in the same way as ordinary transactions.
|
||||||
|
|
||||||
|
<
|
||||||
|
P 2000/01/01 A 1 B
|
||||||
|
P 2000/01/15 A 5 B
|
||||||
|
P 2000/02/01 A 2 B
|
||||||
|
P 2000/03/01 A 3 B
|
||||||
|
P 2000/04/01 A 4 B
|
||||||
|
|
||||||
|
~ monthly
|
||||||
|
(a) 2 A
|
||||||
|
|
||||||
|
2000/01/01
|
||||||
|
(a) 1 A
|
||||||
|
|
||||||
|
2000/02/01
|
||||||
|
(a) 1 A
|
||||||
|
|
||||||
|
2000/03/01
|
||||||
|
(a) 1 A
|
||||||
|
|
||||||
|
# 44. budget report, unvalued (for reference).
|
||||||
|
$ hledger -f- bal -M --budget
|
||||||
|
Budget performance in 2000q1:
|
||||||
|
|
||||||
|
|| Jan Feb Mar
|
||||||
|
===++============================================================
|
||||||
|
a || 1 A [ 50% of 2 A] 1 A [ 50% of 2 A] 1 A [ 50% of 2 A]
|
||||||
|
---++------------------------------------------------------------
|
||||||
|
|| 1 A [ 50% of 2 A] 1 A [ 50% of 2 A] 1 A [ 50% of 2 A]
|
||||||
|
|
||||||
|
# 45. budget report, valued at transaction dates.
|
||||||
|
$ hledger -f- bal -MTA --budget --value-at=t
|
||||||
|
Budget performance in 2000q1:
|
||||||
|
|
||||||
|
|| Jan Feb Mar Total Average
|
||||||
|
===++=====================================================================================================
|
||||||
|
a || 1 B [ 50% of 2 B] 2 B [ 50% of 4 B] 3 B [ 50% of 6 B] 6 B [ 50% of 12 B] 2 B [ 50% of 4 B]
|
||||||
|
---++-----------------------------------------------------------------------------------------------------
|
||||||
|
|| 1 B [ 50% of 2 B] 2 B [ 50% of 4 B] 3 B [ 50% of 6 B] 6 B [ 50% of 12 B] 2 B [ 50% of 4 B]
|
||||||
|
|
||||||
|
# 46. budget report, valued at period ends.
|
||||||
|
$ hledger -f- bal -MTA --budget --value-at=p
|
||||||
|
Budget performance in 2000q1:
|
||||||
|
|
||||||
|
|| Jan Feb Mar Total Average
|
||||||
|
===++=========================================================================================================
|
||||||
|
a || 5 B [ 50% of 10 B] 2 B [ 50% of 4 B] 3 B [ 50% of 6 B] 9 B [ 50% of 18 B] 3 B [ 50% of 6 B]
|
||||||
|
---++---------------------------------------------------------------------------------------------------------
|
||||||
|
|| 5 B [ 50% of 10 B] 2 B [ 50% of 4 B] 3 B [ 50% of 6 B] 9 B [ 50% of 18 B] 3 B [ 50% of 6 B]
|
||||||
|
|
||||||
|
# 47. budget report, valued at other date.
|
||||||
|
$ hledger -f- bal -MTA --budget --value-at=2000-01-15
|
||||||
|
Budget performance in 2000q1:
|
||||||
|
|
||||||
|
|| Jan Feb Mar Total Average
|
||||||
|
===++==========================================================================================================
|
||||||
|
a || 5 B [ 50% of 10 B] 5 B [ 50% of 10 B] 5 B [ 50% of 10 B] 15 B [ 50% of 30 B] 5 B [ 50% of 10 B]
|
||||||
|
---++----------------------------------------------------------------------------------------------------------
|
||||||
|
|| 5 B [ 50% of 10 B] 5 B [ 50% of 10 B] 5 B [ 50% of 10 B] 15 B [ 50% of 30 B] 5 B [ 50% of 10 B]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user