hledger/examples/budgeting/forecast-budget-1.journal
2020-11-18 13:16:56 -08:00

56 lines
2.5 KiB
Plaintext

; A minimal "forecast budget", defined with a periodic transaction rule.
; We forecast/plan to spend $500 on food each month in 2020:
~ monthly in 2020
(expenses:food) $500
; Some transactions:
2020-01-15
expenses:food $400
assets:checking
2020-03-15
expenses:food $600
assets:checking
; Some examples of the balance --budget report,
; which compares the actual (so far) and forecasted amounts.
; There are some open bugs; here is output from several hledger versions:
comment
; the totals row has always been wrong (a bug)
$ hledger-1.15 -f examples/budgeting/budget1.journal bal --budget -M
Budget performance in 2020q1:
|| Jan Feb Mar
===============++=====================================================================
<unbudgeted> || $-400 0 $-600
expenses || $400 [ 80% of $500] 0 [ 0% of $500] $600 [ 120% of $500]
expenses:food || $400 [ 80% of $500] 0 [ 0% of $500] $600 [ 120% of $500]
---------------++---------------------------------------------------------------------
|| 0 [ 0% of $500] 0 [ 0% of $500] 0 [ 0% of $500]
; since 1.16, Jan is showing no info (a bug)
; since 1.19, the boring parent "expenses" is elided by default
$ hledger-1.19.1 -f examples/budgeting/budget1.journal bal --budget -M
Budget performance in 2020Q1:
|| Jan Feb Mar
===============++=====================================================================
<unbudgeted> || $-400 0 $-600
expenses:food || $400 0 [ 0% of $500] $600 [ 120% of $500]
---------------++---------------------------------------------------------------------
|| 0 0 [ 0% of $500] 0 [ 0% of $500]
; since 1.19.99, columns shrink to fit and can vary in width
$ hledger -f examples/budgeting/budget1.journal bal --budget -M
Budget performance in 2020Q1:
|| Jan Feb Mar
===============++=============================================
<unbudgeted> || $-400 0 $-600
expenses:food || $400 0 [0% of $500] $600 [120% of $500]
---------------++---------------------------------------------
|| 0 0 [0% of $500] 0 [ 0% of $500]