all repos

clerk @ fc9cae13772b625a39129694607847c27edcf23a

missing tooling for ledger/hledger

clerk/journal/testdata/journals/actual-goal-budget.journal (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
journal: refactor compatibility test runner, 13 days ago
1
; source: hledger/examples/budgeting/goal-budget-1.journal
2
; A minimal "goal budget", where budget goals are defined by a periodic transaction rule.
3
4
; We forecast/plan to spend $500 on food each month in 2020:
5
~ monthly in 2020
6
  (expenses:food)  $500
7
8
; Some transactions:
9
10
2020-01-15
11
  expenses:food    $400
12
  assets:checking
13
14
2020-03-15
15
  expenses:food    $600
16
  assets:checking
17
18
; Some examples of the balance --budget report,
19
; which compares the actual (so far) and forecasted amounts.
20
; There are still some UX issues.
21
comment
22
23
; Since 1.19.99, columns shrink to fit and can vary in width.
24
; Note Jan is showing no budget goal here (since 1.16), because "~ monthly"
25
; generates transactions on the first of each month, but the report's 
26
; start date here is 1/15 (the earliest transaction date) so the 
27
; january budget goal transaction is excluded. 
28
$ hledger -f forecast-budget-1.journal bal --budget -M
29
Budget performance in 2020Q1:
30
31
               ||   Jan             Feb                   Mar 
32
===============++=============================================
33
 <unbudgeted>  || $-400  0               $-600                
34
 expenses:food ||  $400  0 [0% of $500]   $600 [120% of $500] 
35
---------------++---------------------------------------------
36
               ||     0  0 [0% of $500]      0 [  0% of $500] 
37
38
; You have to specify explicit report dates to work around, eg:
39
$ hledger -f forecast-budget-1.journal bal --budget -M date:q1
40
Budget performance in 2020Q1:
41
42
               ||                 Jan             Feb                   Mar 
43
===============++===========================================================
44
 <unbudgeted>  || $-400                0               $-600                
45
 expenses:food ||  $400 [80% of $500]  0 [0% of $500]   $600 [120% of $500] 
46
---------------++-----------------------------------------------------------
47
               ||     0 [ 0% of $500]  0 [0% of $500]      0 [  0% of $500] 
48
49
; adding -E expands the <unbudgeted> account name for some reason
50
$ hledger -f forecast-budget-1.journal bal --budget -ME
51
Budget performance in 2020Q1:
52
53
                              ||   Jan             Feb                   Mar 
54
==============================++=============================================
55
 <unbudgeted>:assets:checking || $-400  0               $-600                
56
 expenses:food                ||  $400  0 [0% of $500]   $600 [120% of $500] 
57
------------------------------++---------------------------------------------
58
                              ||     0  0 [0% of $500]      0 [  0% of $500]