rename showLedgerAccounts to showLedgerAccountBalances
This commit is contained in:
parent
d507559056
commit
cf194e6b60
@ -18,7 +18,7 @@ ledgerAccountTree,
|
|||||||
addDataToAccountNameTree,
|
addDataToAccountNameTree,
|
||||||
printentries,
|
printentries,
|
||||||
printregister,
|
printregister,
|
||||||
showLedgerAccounts,
|
showLedgerAccountBalances,
|
||||||
showAccountTree,
|
showAccountTree,
|
||||||
isBoringInnerAccount,
|
isBoringInnerAccount,
|
||||||
isBoringInnerAccountName,
|
isBoringInnerAccountName,
|
||||||
@ -218,8 +218,8 @@ e
|
|||||||
g
|
g
|
||||||
@
|
@
|
||||||
-}
|
-}
|
||||||
showLedgerAccounts :: Ledger -> Int -> String
|
showLedgerAccountBalances :: Ledger -> Int -> String
|
||||||
showLedgerAccounts l maxdepth =
|
showLedgerAccountBalances l maxdepth =
|
||||||
concatMap
|
concatMap
|
||||||
(showAccountTree l)
|
(showAccountTree l)
|
||||||
(branches $ ledgerAccountTree l maxdepth)
|
(branches $ ledgerAccountTree l maxdepth)
|
||||||
|
|||||||
2
Tests.hs
2
Tests.hs
@ -378,5 +378,5 @@ test_cacheLedger =
|
|||||||
assertEqual' 15 (length $ Map.keys $ accounts $ cacheLedger ledger7 nullpats)
|
assertEqual' 15 (length $ Map.keys $ accounts $ cacheLedger ledger7 nullpats)
|
||||||
|
|
||||||
test_showLedgerAccounts =
|
test_showLedgerAccounts =
|
||||||
assertEqual' 4 (length $ lines $ showLedgerAccounts l7 1)
|
assertEqual' 4 (length $ lines $ showLedgerAccountBalances l7 1)
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ This module includes some helpers for working with your ledger in ghci. Examples
|
|||||||
> Ledger with 696 entries, 132 accounts
|
> Ledger with 696 entries, 132 accounts
|
||||||
> *Main> putStr $ drawTree $ treemap show $ accountnametree l
|
> *Main> putStr $ drawTree $ treemap show $ accountnametree l
|
||||||
> ...
|
> ...
|
||||||
> *Main> putStr $ showLedgerAccounts l 1
|
> *Main> putStr $ showLedgerAccountBalances l 1
|
||||||
> ...
|
> ...
|
||||||
> *Main> printregister l
|
> *Main> printregister l
|
||||||
> ...
|
> ...
|
||||||
@ -73,7 +73,7 @@ balance :: Command
|
|||||||
balance opts pats = parseLedgerAndDo opts pats printbalance
|
balance opts pats = parseLedgerAndDo opts pats printbalance
|
||||||
where
|
where
|
||||||
printbalance :: Ledger -> IO ()
|
printbalance :: Ledger -> IO ()
|
||||||
printbalance l = putStr $ showLedgerAccounts l depth
|
printbalance l = putStr $ showLedgerAccountBalances l depth
|
||||||
where
|
where
|
||||||
showsubs = (ShowSubs `elem` opts)
|
showsubs = (ShowSubs `elem` opts)
|
||||||
depth = case (pats, showsubs) of
|
depth = case (pats, showsubs) of
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user