From de5d22ac2106977a6116a472f99c45e2272a98b7 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 13 Jan 2018 11:18:07 -0800 Subject: [PATCH] bal/bs/is/cf: drop short name, indent fields from multicolumn CSV --- hledger/Hledger/Cli/Commands/Balance.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hledger/Hledger/Cli/Commands/Balance.hs b/hledger/Hledger/Cli/Commands/Balance.hs index d346f0cb3..e546e1808 100644 --- a/hledger/Hledger/Cli/Commands/Balance.hs +++ b/hledger/Hledger/Cli/Commands/Balance.hs @@ -511,20 +511,20 @@ renderComponent1 opts (acctname, depth, total) (FormatField ljust min max field) -- | Render a multi-column balance report as CSV. multiBalanceReportAsCsv :: ReportOpts -> MultiBalanceReport -> CSV multiBalanceReportAsCsv opts (MultiBalanceReport (colspans, items, (coltotals,tot,avg))) = - ("account" : "short account" : "indent" : map showDateSpan colspans + ("account" : map showDateSpan colspans ++ (if row_total_ opts then ["total"] else []) ++ (if average_ opts then ["average"] else []) ) : - [T.unpack a : T.unpack a' : show i : + [T.unpack a : map showMixedAmountOneLineWithoutPrice (amts ++ (if row_total_ opts then [rowtot] else []) ++ (if average_ opts then [rowavg] else [])) - | (a,a',i, amts, rowtot, rowavg) <- items] + | (a, _, _, amts, rowtot, rowavg) <- items] ++ if no_total_ opts then [] - else [["totals", "", ""] + else [["totals"] ++ map showMixedAmountOneLineWithoutPrice ( coltotals ++ (if row_total_ opts then [tot] else [])