1
- # Add proportional income tax (from documentation)
2
- hledger print -f- --auto
3
- <<<
1
+ # Transaction modifier adding (unbalanced) tax postings.
2
+ # print. Auto-generated postings are inserted below the matched one.
3
+ <
4
+ = ^income
5
+ (liabilities:tax) *.33 ; income tax
6
+
4
7
2016/1/1 paycheck
5
8
income:remuneration $-100
6
9
income:donations $-15
@@ -10,9 +13,7 @@ hledger print -f- --auto
10
13
assets:cash $20
11
14
assets:bank
12
15
13
- = ^income
14
- (liabilities:tax) *.33 ; income tax
15
- >>>
16
+ $ hledger print -f- --auto
16
17
2016/01/01 paycheck
17
18
income:remuneration $-100
18
19
(liabilities:tax) $-33 ; income tax
@@ -24,62 +25,21 @@ hledger print -f- --auto
24
25
assets:cash $20
25
26
assets:bank
26
27
27
- >>>2
28
- >>>=0
28
+ >=
29
29
30
- hledger register -f- --auto
31
- <<<
32
- 2016/1/1 paycheck
33
- income:remuneration $-100
34
- income:donations $-15
35
- assets:bank
36
-
37
- 2016/1/1 withdraw
38
- assets:cash $20
39
- assets:bank
40
-
41
- = ^income
42
- (liabilities:tax) *.33 ; income tax
43
- >>>
30
+ # register
31
+ $ hledger register -f- --auto
44
32
2016/01/01 paycheck income:remuneration $-100 $-100
45
33
(liabilities:tax) $-33 $-133
46
34
income:donations $-15 $-148
47
35
(liabilities:tax) $-5 $-153
48
36
assets:bank $115 $-38
49
37
2016/01/01 withdraw assets:cash $20 $-18
50
38
assets:bank $-20 $-38
51
- >>>2
52
- >>>=0
53
-
54
- hledger register -f- --auto
55
- <<<
56
- = trigger
57
- (target) 10
39
+ >=
58
40
59
- 2018/1/1
60
- (trigger) 1
61
- (target) 1 = 11 ; this assertion would not fail, auto posting will be taken into account
62
- >>>
63
- 2018/01/01 (trigger) 1 1
64
- (target) 10 11
65
- (target) 1 12
66
- >>>2
67
- >>>=0
68
-
69
- hledger balance -f- --auto
70
- <<<
71
- 2016/1/1 paycheck
72
- income:remuneration $-100
73
- income:donations $-15
74
- assets:bank
75
-
76
- 2016/1/1 withdraw
77
- assets:cash $20
78
- assets:bank
79
-
80
- = ^income
81
- (liabilities:tax) *.33 ; income tax
82
- >>>
41
+ # balance
42
+ $ hledger balance -f- --auto
83
43
$115 assets
84
44
$95 bank
85
45
$20 cash
@@ -89,24 +49,38 @@ hledger balance -f- --auto
89
49
$-38 liabilities:tax
90
50
--------------------
91
51
$-38
92
- >>>2
93
- >>>=0
52
+ >=
94
53
95
- hledger print -f- --auto
96
- <<<
54
+ # Balance assertions see the generated postings.
55
+ <
56
+ = trigger
57
+ (target) 10
58
+
59
+ 2018/1/1
60
+ (trigger) 1
61
+ (target) 1 = 11 ; this assertion would not fail, auto posting will be taken into account
62
+
63
+ $ hledger register -f- --auto
64
+ 2018/01/01 (trigger) 1 1
65
+ (target) 10 11
66
+ (target) 1 12
67
+ >=
68
+
69
+ # Transaction modifier adding (balanced virtual) budget envelope postings.
70
+ <
97
71
= ^expenses:groceries
98
72
[budget:groceries] *-1
99
73
[assets:bank:checking] *1
100
74
101
75
2018/10/7 * MARKET
102
76
expenses:groceries:food
103
77
assets:bank:checking $-20
104
- >>>
78
+
79
+ $ hledger print -f- --auto
105
80
2018/10/07 * MARKET
106
81
expenses:groceries:food
107
82
[budget:groceries] $-20
108
83
[assets:bank:checking] $20
109
84
assets:bank:checking $-20
110
85
111
- >>>2
112
- >>>=0
86
+ >=
0 commit comments