;more budget-related cleanup
This commit is contained in:
parent
5bb9006b6c
commit
18f8f91520
@ -1,10 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# budget.sh < $LEDGER_FILE
|
|
||||||
# or hledger print ... | budget.sh
|
|
||||||
# https://github.com/simonmichael/hledger/issues/99#issuecomment-270796337
|
|
||||||
|
|
||||||
hledger-rewrite -f- expenses:food --add-posting '(budget:food) *-1' \
|
|
||||||
| hledger-rewrite -f- expenses:health --add-posting '(budget:health) *-1' \
|
|
||||||
| hledger-rewrite -f- expenses:home --add-posting '(budget:home) *-1' \
|
|
||||||
| hledger-rewrite -f- expenses:transport --add-posting '(budget:transport) *-1' \
|
|
||||||
| hledger-rewrite -f- 'expenses not:(food|health|home|transport)' --add-posting '(budget:misc) *-1'
|
|
||||||
@ -1,51 +0,0 @@
|
|||||||
budget report mockups
|
|
||||||
|
|
||||||
$ hledger bal ^expenses -M --depth 1 --average # add average & total columns
|
|
||||||
Change of balance (flow):
|
|
||||||
|
|
||||||
|| 2014/01/01-2014/01/31 2014/02/01-2014/02/28 2014/03/01-2014/03/31 average total
|
|
||||||
==========++============================================================================================
|
|
||||||
expenses || $3500.00 $3400.00 $4200.00 $3700.00 $11100.00
|
|
||||||
----------++--------------------------------------------------------------------------------------------
|
|
||||||
|| $3500.00 $3400.00 $4200.00 $3700.00 $11100.00
|
|
||||||
|
|
||||||
$ hledger bal ^expenses -M --depth 1 --budget-simple # assume a fixed budget
|
|
||||||
Change of balance (flow, with simple budget):
|
|
||||||
|
|
||||||
|| | 2014/01/01-2014/01/31 2014/02/01-2014/02/28 2014/03/01-2014/03/31 | average total
|
|
||||||
|| budget | actual over actual over actual over | over over
|
|
||||||
==========++=======================================================================================================
|
|
||||||
expenses || $4000 | $3500.00 $-500.00 $3400.00 $-600.00 $4200.00 $200.00 | $-300.00 $-900.00
|
|
||||||
----------++-------------------------------------------------------------------------------------------------------
|
|
||||||
|| $4000 | $3500.00 $-500.00 $3400.00 $-600.00 $4200.00 $200.00 | $-300.00 $-900.00
|
|
||||||
|
|
||||||
$ hledger bal ^expenses -M --depth 1 --budget # budget can change per period
|
|
||||||
Change of balance (flow, with budget):
|
|
||||||
|
|
||||||
|| 2014/01/01-2014/01/31 2014/02/01-2014/02/28 2014/03/01-2014/03/31 average total
|
|
||||||
|| budget actual over budget actual over budget actual over over over
|
|
||||||
==========++=========================================================================================================================
|
|
||||||
expenses || $4000 $3500.00 $-500.00 $4000 $3400.00 $-600.00 $4000 $4200.00 $200.00 $-300.00 $-900.00
|
|
||||||
----------++-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|| $4000 $3500.00 $-500.00 $4000 $3400.00 $-600.00 $4000 $4200.00 $200.00 $-300.00 $-900.00
|
|
||||||
|
|
||||||
$ hledger bal ^expenses -M --depth 1 --budget --cumulative
|
|
||||||
Ending balance (cumulative, with budget):
|
|
||||||
|
|
||||||
|| 2014/01/01-2014/01/31 2014/02/01-2014/02/28 2014/03/01-2014/03/31 average final
|
|
||||||
|| budget actual over budget actual over budget actual over over over
|
|
||||||
==========++==========================================================================================================================
|
|
||||||
expenses || $4000 $3500.00 $-500.00 $8000 $6900.00 $-1100.00 $12000 $11100.00 $-900.00 $-833.33 $-900.00
|
|
||||||
----------++--------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|| $4000 $3500.00 $-500.00 $8000 $6900.00 $-1100.00 $12000 $11100.00 $-900.00 $-833.33 $-900.00
|
|
||||||
|
|
||||||
$ hledger bal ^expenses -M --depth 1 --budget --historical # assume $10000 budget, $20000 expenses starting balances
|
|
||||||
Ending balance (historical, with budget):
|
|
||||||
|
|
||||||
|| 2014/01/01-2014/01/31 2014/02/01-2014/02/28 2014/03/01-2014/03/31 average final
|
|
||||||
|| budget actual over budget actual over budget actual over over over
|
|
||||||
==========++==========================================================================================================================
|
|
||||||
expenses || $14000 $23500.00 $9500.00 $18000 $26900.00 $8900.00 $22000 $31100.00 $9100.00 $9166.66 $9100.00
|
|
||||||
----------++--------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|| $14000 $23500.00 $9500.00 $18000 $26900.00 $8900.00 $22000 $31100.00 $9100.00 $9166.66 $9100.00
|
|
||||||
|
|
||||||
3
hie.yaml
3
hie.yaml
@ -43,3 +43,6 @@ cradle:
|
|||||||
component: "hledger-web:exe:hledger-web"
|
component: "hledger-web:exe:hledger-web"
|
||||||
- path: "hledger-web/test/"
|
- path: "hledger-web/test/"
|
||||||
component: "hledger-web:test:test"
|
component: "hledger-web:test:test"
|
||||||
|
|
||||||
|
- path: "bin/"
|
||||||
|
component: "hledger:lib"
|
||||||
|
|||||||
@ -530,5 +530,5 @@ Budget performance in 2019/01:
|
|||||||
This command also supports the
|
This command also supports the
|
||||||
[output destination](hledger.html#output-destination) and
|
[output destination](hledger.html#output-destination) and
|
||||||
[output format](hledger.html#output-format) options
|
[output format](hledger.html#output-format) options
|
||||||
The output formats supported are
|
The output formats supported are (in most modes):
|
||||||
`txt`, `csv`, `html`, and `json`.
|
`txt`, `csv`, `html`, and `json`.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user