From 29183e7dddc07faf699ec550ce417a542f42802a Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 10 Jan 2017 09:41:27 -0800 Subject: [PATCH] print: omit the last posting amount, as we used to #465, #442 This avoids printing invalid journal format for entries where an implicit amount has multiple commodities. --- hledger/Hledger/Cli/Print.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hledger/Hledger/Cli/Print.hs b/hledger/Hledger/Cli/Print.hs index 1a9a02092..d258bdc94 100644 --- a/hledger/Hledger/Cli/Print.hs +++ b/hledger/Hledger/Cli/Print.hs @@ -60,8 +60,11 @@ printEntries opts@CliOpts{reportopts_=ropts} j = do _ -> (entriesReportAsText, ropts) writeOutput opts $ render $ entriesReport ropts' q j +-- | Render journal entries (transactions) as a string, which should be valid journal format. entriesReportAsText :: EntriesReport -> String -entriesReportAsText items = concatMap showTransactionUnelided items +entriesReportAsText items = concatMap showtxn items + where + showtxn = showTransaction -- XXX -- tests_showTransactions = [