cli: Cli.Commands.Balance.renderBalanceAcct: respect that depth is zero-based here (bugfix)
The depth in BalanceReportItem is zero-based, whereas prrDepth in PeriodicReportRow DisplayName is one-based.
This commit is contained in:
parent
6b0cca4fa8
commit
ccc605a6a0
@ -1333,7 +1333,7 @@ renderBalanceAcct ::
|
|||||||
ReportOpts -> Text -> (AccountName, AccountName, Int) -> Text
|
ReportOpts -> Text -> (AccountName, AccountName, Int) -> Text
|
||||||
renderBalanceAcct opts space (fullName, displayName, dep) =
|
renderBalanceAcct opts space (fullName, displayName, dep) =
|
||||||
case accountlistmode_ opts of
|
case accountlistmode_ opts of
|
||||||
ALTree -> T.replicate ((dep - 1)*2) space <> displayName
|
ALTree -> T.replicate (dep*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
|
||||||
@ -1343,7 +1343,7 @@ renderPeriodicAcct ::
|
|||||||
ReportOpts -> Text -> PeriodicReportRow DisplayName a -> Text
|
ReportOpts -> Text -> PeriodicReportRow DisplayName a -> Text
|
||||||
renderPeriodicAcct opts space row =
|
renderPeriodicAcct opts space row =
|
||||||
renderBalanceAcct opts space
|
renderBalanceAcct opts space
|
||||||
(prrFullName row, prrDisplayName row, prrDepth row)
|
(prrFullName row, prrDisplayName row, prrDepth row - 1)
|
||||||
|
|
||||||
|
|
||||||
-- tests
|
-- tests
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user