diff --git a/hledger/Hledger/Cli/Commands/Aregister.hs b/hledger/Hledger/Cli/Commands/Aregister.hs index 0d4bb222b..24c9a4b4d 100644 --- a/hledger/Hledger/Cli/Commands/Aregister.hs +++ b/hledger/Hledger/Cli/Commands/Aregister.hs @@ -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 diff --git a/hledger/test/aregister.test b/hledger/test/aregister.test index 2b7584685..88882e6cc 100644 --- a/hledger/test/aregister.test +++ b/hledger/test/aregister.test @@ -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