cli: Commands.Balance: remove lambda on ropts1 for balanceReport*
This is consistent with the calls to multiBalanceReport* and budgetReport*.
This commit is contained in:
parent
f6c98ec1d6
commit
fa58dc11f4
@ -413,15 +413,15 @@ balance opts@CliOpts{reportspec_=rspec} j = case balancecalc_ of
|
|||||||
_ -> do -- single period simple balance report
|
_ -> do -- single period simple balance report
|
||||||
let report = styleAmounts styles $ balanceReport rspec j -- simple Ledger-style balance report
|
let report = styleAmounts styles $ balanceReport rspec j -- simple Ledger-style balance report
|
||||||
render = case fmt of
|
render = case fmt of
|
||||||
"txt" -> \ropts1 -> TB.toLazyText . balanceReportAsText ropts1
|
"txt" -> TB.toLazyText . balanceReportAsText ropts
|
||||||
"csv" -> \ropts1 -> printCSV . balanceReportAsCsv ropts1
|
"csv" -> printCSV . balanceReportAsCsv ropts
|
||||||
"tsv" -> \ropts1 -> printTSV . balanceReportAsCsv ropts1
|
"tsv" -> printTSV . balanceReportAsCsv ropts
|
||||||
"html" -> \ropts1 -> (<>"\n") . L.renderText .
|
"html" -> (<>"\n") . L.renderText .
|
||||||
printHtml . map (map (fmap L.toHtml)) . balanceReportAsSpreadsheet ropts1
|
printHtml . map (map (fmap L.toHtml)) . balanceReportAsSpreadsheet ropts
|
||||||
"json" -> const $ (<>"\n") . toJsonText
|
"json" -> (<>"\n") . toJsonText
|
||||||
"fods" -> \ropts1 -> printFods IO.localeEncoding . Map.singleton "Hledger" . (,) (Just 1, Nothing) . balanceReportAsSpreadsheet ropts1
|
"fods" -> printFods IO.localeEncoding . Map.singleton "Hledger" . (,) (Just 1, Nothing) . balanceReportAsSpreadsheet ropts
|
||||||
_ -> error' $ unsupportedOutputFormatError fmt -- PARTIAL:
|
_ -> error' $ unsupportedOutputFormatError fmt -- PARTIAL:
|
||||||
writeOutputLazyText opts $ render ropts report
|
writeOutputLazyText opts $ render report
|
||||||
where
|
where
|
||||||
styles = journalCommodityStylesWith HardRounding j
|
styles = journalCommodityStylesWith HardRounding j
|
||||||
ropts@ReportOpts{..} = _rsReportOpts rspec
|
ropts@ReportOpts{..} = _rsReportOpts rspec
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user