fix:areg: round all amounts to display precision again [#2407]

This broke in 1.32.
This commit is contained in:
Simon Michael 2025-06-12 16:49:14 -10:00
parent 8bda89c4ef
commit 001a0b9572
2 changed files with 10 additions and 1 deletions

View File

@ -114,7 +114,7 @@ aregister opts@CliOpts{rawopts_=rawopts,reportspec_=rspec} j = do
-- TODO: need to also pass the queries so we can choose which date to render - move them into the report ?
items = accountTransactionsReport rspec' j thisacctq
items' =
styleAmounts (journalCommodityStyles j) $
styleAmounts (journalCommodityStylesWith HardRounding j) $
(if empty_ ropts' then id else filter (not . mixedAmountLooksZero . fifth6)) $
reverse items
-- select renderer

View File

@ -121,3 +121,12 @@ Transactions in a and subaccounts:
# # 10. should show the transaction, with the january date (?)
# $ hledger -f- areg a date2:202102
# 2021-01-01 a 1 1
# ** 8. aregister rounds amounts to display precision (#2407)
<
commodity $1.00
2025-06-12
(a) $1.000
$ hledger -f - areg a
Transactions in a and subaccounts:
2025-06-12 a $1.00 $1.00