cli,csv: Fix --drop option in csv output format

This commit is contained in:
aragaer 2021-01-12 20:15:35 +03:00 committed by Simon Michael
parent 84bf42a9fc
commit 7bde3345b8

View File

@ -357,7 +357,7 @@ balance opts@CliOpts{rawopts_=rawopts,reportspec_=rspec} j = do
balanceReportAsCsv :: ReportOpts -> BalanceReport -> CSV balanceReportAsCsv :: ReportOpts -> BalanceReport -> CSV
balanceReportAsCsv opts (items, total) = balanceReportAsCsv opts (items, total) =
["account","balance"] : ["account","balance"] :
[[a, wbToText $ showMixedAmountB oneLine b] | (a, _, _, b) <- items] [[accountNameDrop (drop_ opts) a, wbToText $ showMixedAmountB oneLine b] | (a, _, _, b) <- items]
++ ++
if no_total_ opts if no_total_ opts
then [] then []
@ -450,7 +450,7 @@ multiBalanceReportAsCsv opts@ReportOpts{average_, row_total_}
++ ["Total" | row_total_] ++ ["Total" | row_total_]
++ ["Average" | average_] ++ ["Average" | average_]
) : ) :
[displayFull a : [displayName a :
map (wbToText . showMixedAmountB oneLine) map (wbToText . showMixedAmountB oneLine)
(amts (amts
++ [rowtot | row_total_] ++ [rowtot | row_total_]