lib: mark todo for multicolumn balance/bs (#518)
This commit is contained in:
parent
e50dede708
commit
646cdf34e2
@ -73,14 +73,14 @@ instance Show MultiBalanceReport where
|
|||||||
type ClippedAccountName = AccountName
|
type ClippedAccountName = AccountName
|
||||||
|
|
||||||
-- | Generates a single column BalanceReport like balanceReport, but uses
|
-- | Generates a single column BalanceReport like balanceReport, but uses
|
||||||
-- multiBalanceReport, so supports --historical. Does not support
|
-- multiBalanceReport, so supports --historical.
|
||||||
-- boring parent eliding yet.
|
-- TODO Does not support boring parent eliding or --flat yet.
|
||||||
singleBalanceReport :: ReportOpts -> Query -> Journal -> BalanceReport
|
singleBalanceReport :: ReportOpts -> Query -> Journal -> BalanceReport
|
||||||
singleBalanceReport opts q j = (rows', total)
|
singleBalanceReport opts q j = (rows', total)
|
||||||
where
|
where
|
||||||
MultiBalanceReport (_, rows, (totals, _, _)) = multiBalanceReport opts q j
|
MultiBalanceReport (_, rows, (totals, _, _)) = multiBalanceReport opts q j
|
||||||
rows' = [(a
|
rows' = [(a
|
||||||
,if tree_ opts then a' else a -- BalanceReport expects full account name here with --flat
|
,if flat_ opts then a else a' -- BalanceReport expects full account name here with --flat
|
||||||
,if tree_ opts then d-1 else 0 -- BalanceReport uses 0-based account depths
|
,if tree_ opts then d-1 else 0 -- BalanceReport uses 0-based account depths
|
||||||
, headDef nullmixedamt amts -- 0 columns is illegal, should not happen, return zeroes if it does
|
, headDef nullmixedamt amts -- 0 columns is illegal, should not happen, return zeroes if it does
|
||||||
) | (a,a',d, amts, _, _) <- rows]
|
) | (a,a',d, amts, _, _) <- rows]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user