cli: Cli.Commands.Balance: use normal space for indentation in text output format
This commit is contained in:
parent
3e2685fe95
commit
e21a8e6d76
@ -710,7 +710,7 @@ balanceReportAsSpreadsheet opts (items, total) =
|
|||||||
setAccountAnchor
|
setAccountAnchor
|
||||||
(guard (rc==Value) >> balance_base_url_ opts)
|
(guard (rc==Value) >> balance_base_url_ opts)
|
||||||
(querystring_ opts) name $
|
(querystring_ opts) name $
|
||||||
cell $ renderBalanceAcct opts (name, dispName, dep) in
|
cell $ renderBalanceAcct opts nbsp (name, dispName, dep) in
|
||||||
addRowSpanHeader accountCell $
|
addRowSpanHeader accountCell $
|
||||||
case layout_ opts of
|
case layout_ opts of
|
||||||
LayoutBare ->
|
LayoutBare ->
|
||||||
@ -807,7 +807,7 @@ multiBalanceReportAsSpreadsheetParts ishtml opts@ReportOpts{..} (PeriodicReport
|
|||||||
where acctName = prrFullName row
|
where acctName = prrFullName row
|
||||||
anchorCell =
|
anchorCell =
|
||||||
setAccountAnchor balance_base_url_ querystring_ acctName $
|
setAccountAnchor balance_base_url_ querystring_ acctName $
|
||||||
accountCell $ renderPeriodicAcct opts row
|
accountCell $ renderPeriodicAcct opts nbsp row
|
||||||
totalrows =
|
totalrows =
|
||||||
if no_total_
|
if no_total_
|
||||||
then []
|
then []
|
||||||
@ -1153,7 +1153,7 @@ budgetReportAsTable ropts@ReportOpts{..} (PeriodicReport spans items totrow) =
|
|||||||
shownitems =
|
shownitems =
|
||||||
map (\i ->
|
map (\i ->
|
||||||
let
|
let
|
||||||
addacctcolumn = map (\(cs, cvals) -> (renderPeriodicAcct ropts i, cs, cvals))
|
addacctcolumn = map (\(cs, cvals) -> (renderPeriodicAcct ropts " " i, cs, cvals))
|
||||||
isunbudgetedrow = displayFull (prrName i) == unbudgetedAccountName
|
isunbudgetedrow = displayFull (prrName i) == unbudgetedAccountName
|
||||||
in addacctcolumn $ showrow isunbudgetedrow $ rowToBudgetCells i)
|
in addacctcolumn $ showrow isunbudgetedrow $ rowToBudgetCells i)
|
||||||
items
|
items
|
||||||
@ -1326,18 +1326,24 @@ budgetReportAsSpreadsheet
|
|||||||
querystring_ name (cell name)
|
querystring_ name (cell name)
|
||||||
|
|
||||||
|
|
||||||
renderBalanceAcct :: ReportOpts -> (AccountName, AccountName, Int) -> Text
|
nbsp :: Text
|
||||||
renderBalanceAcct opts (fullName, displayName, dep) =
|
nbsp = "\160"
|
||||||
|
|
||||||
|
renderBalanceAcct ::
|
||||||
|
ReportOpts -> Text -> (AccountName, AccountName, Int) -> Text
|
||||||
|
renderBalanceAcct opts space (fullName, displayName, dep) =
|
||||||
case accountlistmode_ opts of
|
case accountlistmode_ opts of
|
||||||
ALTree -> T.replicate ((dep - 1)*2) "\160" <> displayName
|
ALTree -> T.replicate ((dep - 1)*2) space <> displayName
|
||||||
ALFlat -> accountNameDrop (drop_ opts) fullName
|
ALFlat -> accountNameDrop (drop_ opts) fullName
|
||||||
|
|
||||||
-- FIXME. Have to check explicitly for which to render here, since
|
-- FIXME. Have to check explicitly for which to render here, since
|
||||||
-- budgetReport sets accountlistmode to ALTree. Find a principled way to do
|
-- budgetReport sets accountlistmode to ALTree. Find a principled way to do
|
||||||
-- this.
|
-- this.
|
||||||
renderPeriodicAcct :: ReportOpts -> PeriodicReportRow DisplayName a -> Text
|
renderPeriodicAcct ::
|
||||||
renderPeriodicAcct opts row =
|
ReportOpts -> Text -> PeriodicReportRow DisplayName a -> Text
|
||||||
renderBalanceAcct opts (prrFullName row, prrDisplayName row, prrDepth row)
|
renderPeriodicAcct opts space row =
|
||||||
|
renderBalanceAcct opts space
|
||||||
|
(prrFullName row, prrDisplayName row, prrDepth row)
|
||||||
|
|
||||||
|
|
||||||
-- tests
|
-- tests
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user