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.
This commit is contained in:
Simon Michael 2017-01-10 09:41:27 -08:00
parent 4abd029bae
commit 29183e7ddd

View File

@ -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 = [