Skip to content

Commit

Permalink
tests: show auto postings' current commodity action (#913)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichael committed Oct 22, 2018
1 parent bcd1513 commit f583301
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions tests/print/auto.test
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,55 @@ $ hledger print -f- --auto
assets:bank:checking $-20

>=

# Rules will preserve a transaction price from the original amount.
<
= assets:billable:client1
assets:receivable:client1 *100
revenues:client1

2018/1/1
(assets:billable:client1) 0.50h @ $90

$ hledger -f- print --auto -x
2018/01/01
(assets:billable:client1) 0.50h @ $90
assets:receivable:client1 50.00h @ $90
revenues:client1 $-4500

>=

# Rules can set a new commodity in the generated amounts.
<
= assets:billable:client1
assets:receivable:client1 *$100
revenues:client1

2018/1/1
(assets:billable:client1) 0.50h

$ hledger -f- print --auto -x
2018/01/01
(assets:billable:client1) 0.50h
assets:receivable:client1 $50
revenues:client1 $-50

>=

# And/or a new transaction price.
<
= assets:billable:client1
assets:receivable:client1 *1.00 "Client1 Hours" @ $100.00
revenues:client1

2018/1/1
(assets:billable:client1) 0.50h @ $90

$ hledger -f- print --auto -x
2018/01/01
(assets:billable:client1) 0.50h @ $90
assets:receivable:client1 0.50 "Client1 Hours" @ $100.00
revenues:client1 $-50.00

>=

0 comments on commit f583301

Please sign in to comment.