2012-06-29 22:33:45 +04:00
|
|
|
# filtering by transaction status
|
|
|
|
|
|
|
|
# 1. with --cleared, print shows cleared transactions only
|
2015-07-12 21:54:08 +03:00
|
|
|
hledger -f- print --cleared
|
2012-06-29 22:33:45 +04:00
|
|
|
<<<
|
|
|
|
2010/1/1 x
|
|
|
|
a 1
|
|
|
|
b
|
|
|
|
|
|
|
|
2010/1/2 * x
|
|
|
|
a 1
|
|
|
|
b
|
|
|
|
|
|
|
|
2010/1/3 *
|
|
|
|
a 1
|
|
|
|
b
|
|
|
|
>>>
|
|
|
|
2010/01/02 * x
|
|
|
|
a 1
|
|
|
|
b -1
|
|
|
|
|
|
|
|
2010/01/03 *
|
|
|
|
a 1
|
|
|
|
b -1
|
|
|
|
|
|
|
|
>>>=0
|
|
|
|
|
|
|
|
# 2. with --uncleared, shows uncleared transactions only
|
2015-07-12 21:54:08 +03:00
|
|
|
hledger -f- print --uncleared
|
2012-06-29 22:33:45 +04:00
|
|
|
<<<
|
|
|
|
2010/1/1 x
|
|
|
|
a 1
|
|
|
|
b
|
|
|
|
|
|
|
|
2010/1/2 * x
|
|
|
|
a 1
|
|
|
|
b
|
|
|
|
|
|
|
|
2010/1/3 *
|
|
|
|
a 1
|
|
|
|
b
|
|
|
|
>>>
|
|
|
|
2010/01/01 x
|
|
|
|
a 1
|
|
|
|
b -1
|
|
|
|
|
|
|
|
>>>=0
|
|
|
|
|
2014-09-08 05:27:49 +04:00
|
|
|
# 3. can also have per-posting cleared status
|
2015-07-12 21:54:08 +03:00
|
|
|
hledger -f- register --cleared
|
2012-06-29 22:33:45 +04:00
|
|
|
<<<
|
|
|
|
2012/1/1
|
|
|
|
a 1
|
|
|
|
*b 2
|
|
|
|
* c 4
|
|
|
|
d
|
|
|
|
>>>
|
2013-04-13 01:56:41 +04:00
|
|
|
2012/01/01 b 2 2
|
|
|
|
c 4 6
|
2012-06-29 22:33:45 +04:00
|
|
|
>>>= 0
|
|
|
|
|
|
|
|
|
2014-09-08 05:27:49 +04:00
|
|
|
# 4. also works with balance as shown, same as ledger. Hmm.
|
2015-07-12 21:54:08 +03:00
|
|
|
hledger -f- balance --uncleared
|
2012-06-29 22:33:45 +04:00
|
|
|
<<<
|
|
|
|
2012/1/1
|
|
|
|
a 1
|
|
|
|
*b 2
|
|
|
|
d
|
|
|
|
|
|
|
|
>>>
|
|
|
|
1 a
|
|
|
|
-3 d
|
|
|
|
--------------------
|
|
|
|
-2
|
|
|
|
>>>=0
|