From 126bb44eecfdf86e53664a48afb198f08d066558 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 20 Nov 2020 16:53:08 -0800 Subject: [PATCH] ;examples: update some budget examples --- examples/budgeting/forecast-budget-1.journal | 57 ++++++++++---------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/examples/budgeting/forecast-budget-1.journal b/examples/budgeting/forecast-budget-1.journal index 38832be48..cf0e8fa65 100644 --- a/examples/budgeting/forecast-budget-1.journal +++ b/examples/budgeting/forecast-budget-1.journal @@ -16,35 +16,15 @@ ; 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: +; There are still some UX issues. 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 -===============++===================================================================== - || $-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 -===============++===================================================================== - || $-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 +; Since 1.19.99, columns shrink to fit and can vary in width. +; Note Jan is showing no budget goal here (since 1.16), because "~ monthly" +; generates transactions on the first of each month, but the report's +; start date here is 1/15 (the earliest transaction date) so the +; january budget goal transaction is excluded. +$ hledger -f forecast-budget-1.journal bal --budget -M Budget performance in 2020Q1: || Jan Feb Mar @@ -53,3 +33,26 @@ Budget performance in 2020Q1: expenses:food || $400 0 [0% of $500] $600 [120% of $500] ---------------++--------------------------------------------- || 0 0 [0% of $500] 0 [ 0% of $500] + +; You have to specify explicit report dates to work around, eg: +$ hledger -f forecast-budget-1.journal bal --budget -M date:q1 +Budget performance in 2020Q1: + + || Jan Feb Mar +===============++=========================================================== + || $-400 0 $-600 + 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] + +; adding -E expands the account name for some reason +$ hledger -f forecast-budget-1.journal bal --budget -ME +Budget performance in 2020Q1: + + || Jan Feb Mar +==============================++============================================= + :assets:checking || $-400 0 $-600 + expenses:food || $400 0 [0% of $500] $600 [120% of $500] +------------------------------++--------------------------------------------- + || 0 0 [0% of $500] 0 [ 0% of $500] +