From 7a139349681950036a0f90c7dcdaafae4941ebc2 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 17 Oct 2014 17:06:47 -0700 Subject: [PATCH] hledger-register-csv: print multiple commodities on one line (#206) When posting amounts or the running total contain more than one commodity, register-csv now prints them comma-separated on one line, instead of on multiple lines breaking the CSV output. This is may not be ideal for CSV consumers; alternatives include failing with an error, adding columns for additional commodities, ignoring all but one commodity. --- extra/hledger-register-csv.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/hledger-register-csv.hs b/extra/hledger-register-csv.hs index e6464f0b5..568d9a8fc 100755 --- a/extra/hledger-register-csv.hs +++ b/extra/hledger-register-csv.hs @@ -55,5 +55,5 @@ postingsReportItemAsCsvRecord (_, _, _, p, b) = [date,desc,acct,amt,bal] BalancedVirtualPosting -> (\s -> "["++s++"]") VirtualPosting -> (\s -> "("++s++")") _ -> id - amt = showMixedAmountWithoutPrice $ pamount p - bal = showMixedAmountWithoutPrice b + amt = showMixedAmountOneLineWithoutPrice $ pamount p + bal = showMixedAmountOneLineWithoutPrice b