-
-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imp:print: zero posting amounts are now shown with commodity & style
print now shows zero posting amounts with their original commodity symbol and the corresponding style (instead of stripping the symbol). If an inferred amount has multiple zeroes in different commodities, a posting is displayed for each of these. Possible breaking changes: showMixedAmountLinesB, showAmountB, showAmountPrice now preserve commodityful zeroes when rendering. This is intended to improve print output, but it seems possible it might also affect balance and register reports, though our tests show no change in those.
- Loading branch information
1 parent
35c0fd6
commit ff730f7
Showing
10 changed files
with
95 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,8 +96,8 @@ $ hledger -f- print | |
b B 0 | ||
$ hledger -f- print | ||
2020-01-01 | ||
a 0 | ||
b 0 | ||
a A 0 | ||
b B 0 | ||
|
||
>=0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
# test -B and #551 | ||
#hledger -f- print -B | ||
#<<< | ||
#2009/1/1 | ||
# assets:foreign currency €100 | ||
# assets:cash $-135 | ||
#>>> | ||
#2009/01/01 | ||
# assets:foreign currency $135 | ||
# assets:cash $-135 | ||
# | ||
#>>>2 | ||
#>>>= 0 | ||
# 1. print preserves the commodity symbol of zero amounts. | ||
< | ||
2023-01-01 | ||
(a) 0 A @ 0 B == 0 A @ 0 B | ||
|
||
$ hledger -f- print | ||
2023-01-01 | ||
(a) 0 A @ 0 B == 0 A @ 0 B | ||
|
||
>= | ||
|
||
# 2. The inferred balancing amount for zeros in multiple commodities | ||
# is preserved and shown accurately, with a posting for each commodity. | ||
< | ||
2023-01-01 | ||
a 0 A | ||
b 0 B | ||
z | ||
|
||
$ hledger -f- print -x | ||
2023-01-01 | ||
a 0 A | ||
b 0 B | ||
z 0 A | ||
z 0 B | ||
|
||
>= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters