Skip to content

Commit f583301

Browse files
committed
tests: show auto postings' current commodity action (#913)
1 parent bcd1513 commit f583301

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

tests/print/auto.test

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,55 @@ $ hledger print -f- --auto
8484
assets:bank:checking $-20
8585

8686
>=
87+
88+
# Rules will preserve a transaction price from the original amount.
89+
<
90+
= assets:billable:client1
91+
assets:receivable:client1 *100
92+
revenues:client1
93+
94+
2018/1/1
95+
(assets:billable:client1) 0.50h @ $90
96+
97+
$ hledger -f- print --auto -x
98+
2018/01/01
99+
(assets:billable:client1) 0.50h @ $90
100+
assets:receivable:client1 50.00h @ $90
101+
revenues:client1 $-4500
102+
103+
>=
104+
105+
# Rules can set a new commodity in the generated amounts.
106+
<
107+
= assets:billable:client1
108+
assets:receivable:client1 *$100
109+
revenues:client1
110+
111+
2018/1/1
112+
(assets:billable:client1) 0.50h
113+
114+
$ hledger -f- print --auto -x
115+
2018/01/01
116+
(assets:billable:client1) 0.50h
117+
assets:receivable:client1 $50
118+
revenues:client1 $-50
119+
120+
>=
121+
122+
# And/or a new transaction price.
123+
<
124+
= assets:billable:client1
125+
assets:receivable:client1 *1.00 "Client1 Hours" @ $100.00
126+
revenues:client1
127+
128+
2018/1/1
129+
(assets:billable:client1) 0.50h @ $90
130+
131+
$ hledger -f- print --auto -x
132+
2018/01/01
133+
(assets:billable:client1) 0.50h @ $90
134+
assets:receivable:client1 0.50 "Client1 Hours" @ $100.00
135+
revenues:client1 $-50.00
136+
137+
>=
138+

0 commit comments

Comments
 (0)